/* ═══════════════════════════════════════════════════════
   inr500 — SHARED BASE STYLES
   Reset, top strip, nav, buttons.
   Tokens (colors, type, shape, dark mode) live in tokens.css.
   Loaded on every page before the page-specific stylesheet.
   ═══════════════════════════════════════════════════════ */

@import url('./tokens.css');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ff-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ── LAYOUT WRAPPER (page CSS may override max-width) ── */
.wrap {
  max-width: 1100px;
  margin: auto;
  padding: 0 24px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--paper);
}

.nav-inner {
  max-width: 1320px;
  margin: auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--tagz);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.logo-text em {
  color: var(--tagz);
  font-style: normal;
}

.nav-links {
  display: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--tagz);
}

.nav-ctas {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 380px) {
  .nav-inner {
    gap: 8px;
    padding-inline: 12px;
  }

  .nav-ctas {
    gap: 4px;
  }

  .nav-ctas > .btn {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .acct-icon-btn {
    width: 36px !important;
    flex-shrink: 0;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 22px;
  min-height: 44px;
  border-radius: var(--r);
  transition: all 0.3s var(--ease-bounce);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn-tagz {
  background: var(--tagz);
  color: #1F1C20;
  box-shadow: 0 4px 12px rgba(11,110,79, 0.2);
}

.btn-tagz:hover {
  /* lighten, don't darken: dark text keeps AA on a lighter orange */
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11,110,79, 0.35);
}

.btn-wa {
  background: #25D366;
  color: var(--dark);
}

.btn-wa:hover {
  background: #1FAD54;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  font-size: 16px;
  padding: 16px;
}

/* ── SHARED FOOTER (bottom strip present on every page) ── */
footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  font-size: 12px;
}

.footer-bottom-l {
  font-family: var(--ff-head);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer-bottom-r {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-bottom-r a {
  font-family: var(--ff-head);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-left: 0;
}

.footer-bottom-r a:hover {
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ── RICH FOOTER (brand column, marketplace links, WhatsApp CTA) ── */
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
  font-weight: 400;
  max-width: 100%;
}

.footer-address {
  font-size: 12px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

.footer-address strong {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.footer-marketplaces {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.footer-mp-pill {
  font-family: var(--ff-head);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 12px;
  transition: all 0.2s var(--ease);
}

.footer-mp-pill:hover {
  border-color: var(--tagz);
  color: #fff;
  background: rgba(11,110,79, 0.1);
}

.footer-col h4 {
  font-family: var(--ff-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.footer-col a:hover {
  color: #fff;
  transform: translateX(4px);
}

.wa-footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: var(--r);
  padding: 12px 20px;
  margin-top: 24px;
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 700;
  color: #25D366;
  transition: all 0.3s var(--ease);
}

.wa-footer:hover {
  background: rgba(37, 211, 102, 0.2);
  transform: translateY(-2px);
}

.wa-footer svg {
  width: 18px;
  height: 18px;
  fill: #25D366;
}

@media (min-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
  }

  .footer-brand p {
    max-width: 320px;
  }
}

/* ═══════════════════════════════════════════════════════════
   CART — badge, drawer, "Add to Cart" button state
   Injected by js/cart-ui.js on every page that loads it.
   ═══════════════════════════════════════════════════════════ */

/* .add-btn elements are converted from <a> to <button> by
   cart-ui.js — reset the button chrome the browser adds. */
button.add-btn {
  font-family: var(--ff-head);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

button.add-btn.is-added {
  background: var(--green-lt);
  color: var(--green);
  border-color: rgba(22, 163, 74, .3);
}

/* ── Header cart button + badge ── */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--paper);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s var(--ease-bounce);
  flex-shrink: 0;
}

.cart-btn:hover {
  border-color: var(--tagz);
  color: var(--tagz);
  transform: translateY(-1px);
}

.cart-btn svg {
  width: 18px;
  height: 18px;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--tagz);
  color: #fff;
  font-family: var(--ff-head);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* ── Drawer ── */
.cart-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 23, 20, .45);
  opacity: 0;
  transition: opacity .25s var(--ease);
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--cream);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
}

.cart-drawer-root.open {
  pointer-events: auto;
}

.cart-drawer-root.open .cart-overlay {
  opacity: 1;
}

.cart-drawer-root.open .cart-drawer {
  transform: translateX(0);
}

body.cart-open-lock {
  overflow: hidden;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--paper);
  flex-shrink: 0;
}

.cart-drawer-title {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}

.cart-drawer-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--warm);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-drawer-close svg {
  width: 12px;
  height: 12px;
}

.cart-drawer-close:hover {
  background: var(--tagz-lt);
  color: var(--tagz);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.cart-empty {
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 60px 12px;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper);
}

.cart-line:last-child {
  border-bottom: none;
}

.cart-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--paper);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

.cart-thumb.is-ph {
  color: var(--ink-3);
}

.cart-thumb-ph {
  width: 22px;
  height: 22px;
}

.cart-line-body {
  flex: 1;
  min-width: 0;
}

.cart-line-name {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.cart-line-total {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  flex-shrink: 0;
}

.cart-line-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}

.cart-line-remove svg {
  width: 11px;
  height: 11px;
}

.cart-line-remove:hover {
  background: var(--tagz-lt);
  color: var(--tagz);
}

.cart-drawer-foot {
  flex-shrink: 0;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--paper);
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.cart-foot-note {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: 12px;
}

.cart-checkout-btn {
  text-decoration: none;
}

@media (max-width: 420px) {
  .cart-drawer {
    width: 100vw;
  }
}

/* ── MOBILE MENU ──
   nav-links is hidden below 768px (see @media(min-width:768px) above)
   with nothing replacing it — this hamburger + dropdown panel fills
   that gap so NFC Check / Programmer / About / Track Order stay
   reachable on phones. Wired up in js/component-loader.js right
   after the header is injected. */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--paper);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .2s, color .2s;
}

.menu-toggle:hover {
  border-color: var(--tagz);
  color: var(--tagz);
}

.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-burger {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-nav-panel {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  background: var(--cream);
  border-top: 1px solid transparent;
  transition: max-height .3s var(--ease), border-color .3s;
}

.mobile-nav-panel.open {
  max-height: 420px;
  border-top-color: var(--paper);
}

.mobile-nav-panel a {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--paper);
}

.mobile-nav-panel a:active,
.mobile-nav-panel a:hover {
  color: var(--tagz);
  background: var(--tagz-lt);
}

/* The nav CTA is a button, not a nav link: the generic link colour above
   was overriding .btn-tagz and leaving greige-on-orange (~1.7:1). */
.mobile-nav-panel a.btn {
  color: #1F1C20;
  border-bottom: 0;
}
.mobile-nav-panel a.btn:active,
.mobile-nav-panel a.btn:hover {
  color: #1F1C20;
  background: var(--tagz);
}

@media (min-width: 768px) {
  .mobile-nav-panel {
    display: none;
  }
}

/* Footer: compact lists on phones */
@media (max-width: 767px) {
  .footer-col ul { columns: 2; column-gap: 16px; }
  .footer-col li { margin-bottom: 0; break-inside: avoid; }
  .footer-col a { padding: 8px 0; line-height: 1.3; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE-FIRST HARDENING
   Small-screen ergonomics applied site-wide: never blow up body
   text on rotate, keep every tappable control at a comfortable
   ≥44px, and let the sticky chrome clear notches / home bars.
   ═══════════════════════════════════════════════════════════ */

html {
  -webkit-text-size-adjust: 100%; /* iOS: don't inflate text when rotating to landscape */
  text-size-adjust: 100%;
}

@media (max-width: 767px) {
  a,
  button,
  input,
  select,
  textarea,
  [role="button"] {
    touch-action: manipulation; /* kill the 300ms double-tap zoom delay */
  }

  /* Footer + breadcrumb links are inline text by default (≈18-37px tall);
     lift them to a real touch target. */
  .footer-col a,
  .footer-bottom-r a,
  .footer-mp-pill,
  p[style*="margin:20px 0 0"] a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-mp-pill { padding-block: 6px; }

  p[style*="margin:20px 0 0"] { line-height: 1.2; }
  p[style*="margin:20px 0 0"] a { padding-inline: 2px; }
}
