/* ============================================================
   STAARSTUFF, mobile-first design system
   Palette: warm ivory paper, espresso ink, honey accent, leaf
   green for status. Tab bar is dark glass per brand reference.
   Type: Fraunces (display) + system stack (UI/body).
   ============================================================ */

:root {
  /* Color tokens */
  --paper:      #FBF7EF;
  --paper-2:    #F4EDE0;   /* raised warm surface */
  --card:       #FFFFFF;
  --ink:        #2B2119;   /* espresso, not near-black */
  --ink-soft:   #6E6257;
  --ink-faint:  #A2968A;
  --line:       #E7DECF;
  --honey:      #96610A;   /* accent: prices, highlights */
  --honey-soft: #F3E3C4;
  --leaf:       #3E6B44;   /* status: in stock, success */
  --leaf-soft:  #E3EDE2;
  --danger:     #B23A2E;

  /* Tab bar (matches reference screenshot) */
  /* Tab bar: espresso glass, honey active, ivory badge. All brand palette. */
  --bar-bg:        rgba(40, 30, 22, 0.90);
  --bar-bg-solid:  #281E16;
  --tab-idle:      #A08E7B;   /* warm taupe, reads as dimmed ivory */
  --tab-active:    #E9B45F;   /* honey lifted for contrast on espresso */
  --tab-glow:      rgba(233, 180, 95, 0.16);
  --badge:         #FBF7EF;   /* ivory pill */
  --badge-ink:     #2B2119;

  /* Offer stack secondary text. Overridden on dark cards, see .bundle-body */
  --stack-muted:   #6E6257;
  --stack-line:    rgba(150, 97, 10, 0.16);

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(43, 33, 25, 0.06), 0 4px 14px rgba(43, 33, 25, 0.06);
  --shadow-2: 0 8px 30px rgba(43, 33, 25, 0.14);
  --shadow-sheet: 0 -12px 40px rgba(20, 15, 10, 0.22);

  /* Shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Layout */
  --gutter: 20px;
  --topbar-h: 56px;
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --content-max: 1120px;

  /* Motion (non-gesture transitions only; gestures use JS springs) */
  --press: 110ms cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Reset / base ---------- */

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

html {
  font: 100%/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

html.no-scroll, html.no-scroll body { overflow: hidden; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  /* Clear the fixed tab bar + iOS home indicator */
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }
img { background: var(--paper-2); }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea { font: inherit; color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 2px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

::selection { background: var(--honey-soft); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Sprite symbols carry bare shapes; each context sets fill/stroke via CSS. */
svg { stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }
.ic-line { fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Typography ---------- */

.display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 560;
  font-optical-sizing: auto;
}

h1, h2, h3, h4 { margin: 0; }

.t-hero {
  font-size: clamp(2.05rem, 8.2vw, 3.4rem);
  line-height: 1.06;               /* tight leading for large text */
  letter-spacing: -0.022em;        /* negative tracking as type grows */
}

.t-section {
  font-size: clamp(1.45rem, 5.6vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.014em;
}

.t-card {
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.006em;
  font-weight: 600;
}

.t-body { font-size: 1rem; line-height: 1.6; letter-spacing: 0; }

.t-small {
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.01em;          /* slight positive tracking at small sizes */
}

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.005em;
}
.price--accent { color: var(--honey); }
.price-was {
  font-weight: 450;
  color: var(--ink-faint);
  text-decoration: line-through;
  margin-left: 0.4em;
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2.4rem, 8vw, 4.5rem); }
.section--tight { padding-block: clamp(1.6rem, 5vw, 3rem); }
.section--tinted { background: var(--paper-2); }

.section-head { margin-bottom: clamp(1.1rem, 4vw, 1.8rem); }
.section-head p { margin: 0.5rem 0 0; max-width: 34rem; }

.stack-s > * + * { margin-top: 0.5rem; }
.stack-m > * + * { margin-top: 1rem; }

/* Horizontal snap rails (testimonials, best sellers, related) */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(76%, 300px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-inline: var(--gutter);
  padding-bottom: 8px;
  scrollbar-width: none;
  /* Full-bleed rail inside .wrap */
  margin-inline: calc(var(--gutter) * -1);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: center; }
.rail--wide { grid-auto-columns: min(86%, 360px); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0;
  transition: transform var(--press), background-color 160ms var(--ease-out),
              opacity 160ms var(--ease-out);
  user-select: none;
  touch-action: manipulation;
}
/* Feedback lives on the press, instantly */
.btn:active { transform: scale(0.965); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:active { background: #3a2d22; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-secondary:active { background: rgba(43, 33, 25, 0.05); }

.btn-honey { background: var(--honey); color: #FFF9EE; }

.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }

.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Small circular icon button, 44px minimum touch target */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  color: var(--ink);
  transition: transform var(--press), background-color 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.9); background: rgba(43, 33, 25, 0.07); }

.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--honey-soft);
  color: var(--honey);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.chip-tag--leaf { background: var(--leaf-soft); color: var(--leaf); }

/* ---------- Top bar (light glass, content scrolls under) ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(251, 247, 239, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
/* Scroll edge effect: soft shadow only once content is underneath */
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 -14px 0;
  height: 14px;
  background: linear-gradient(rgba(43, 33, 25, 0.10), transparent);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  pointer-events: none;
}
.topbar.is-scrolled::after { opacity: 1; }

.topbar-inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-logo { display: inline-flex; align-items: center; margin-right: auto; }
.topbar-logo img { height: 30px; width: auto; background: none; }

.topbar-nav { display: none; }

.topbar-cart { position: relative; flex-shrink: 0; }
.topbar-cart .dot {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 2px solid var(--paper);
  border-radius: var(--r-pill);
  background: var(--honey);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

main { padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ---------- Bottom tab bar (dark glass, per reference image) ---------- */

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(251, 247, 239, 0.10);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--tab-idle);
  transition: transform var(--press), color 150ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tab:active { transform: scale(0.88); }
.tab .ic { width: 26px; height: 26px; fill: currentColor; }

/* Active tab per body[data-page]: filled icon turns honey */
body[data-page="home"]    .tab[data-tab="home"],
body[data-page="shop"]    .tab[data-tab="shop"],
body[data-page="saved"]   .tab[data-tab="saved"],
body[data-page="cart"]    .tab[data-tab="cart"],
body[data-page="account"] .tab[data-tab="account"] { color: var(--tab-active); }

/* Soft honey capsule behind the active icon */
.tab::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 34px;
  margin: -17px 0 0 -23px;
  border-radius: var(--r-pill);
  background: var(--tab-glow);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out);
  pointer-events: none;
}
body[data-page="home"]    .tab[data-tab="home"]::before,
body[data-page="shop"]    .tab[data-tab="shop"]::before,
body[data-page="saved"]   .tab[data-tab="saved"]::before,
body[data-page="cart"]    .tab[data-tab="cart"]::before,
body[data-page="account"] .tab[data-tab="account"]::before { opacity: 1; transform: scale(1); }

.tab-badge {
  position: absolute;
  top: 8px;
  left: calc(50% + 5px);
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--badge);
  color: var(--badge-ink);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  pointer-events: none;
}
.tab-badge.bump { animation: badge-bump 260ms var(--ease-out); }
@keyframes badge-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(1.2rem, 5vw, 3rem); }

.hero-grid { display: grid; gap: 1.6rem; }

.hero-copy > .chip-tag { margin-bottom: 0.9rem; }
.hero-copy p { margin: 1rem 0 0; max-width: 32rem; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.4rem;
}

.hero-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .chip-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255, 253, 248, 0.92);
}

/* Single orchestrated page-load moment (hero only) */
.hero .reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 640ms var(--ease-out) forwards;
}
.hero .reveal:nth-child(2) { animation-delay: 70ms; }
.hero .reveal:nth-child(3) { animation-delay: 140ms; }
.hero .reveal:nth-child(4) { animation-delay: 210ms; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

.stat-strip {
  display: flex;
  gap: 6px;
  margin-top: 1.6rem;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
}
.stat-strip > div { flex: 1; min-width: 0; }
.stat-strip strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-strip span { font-size: 0.78rem; color: var(--ink-soft); }

/* ---------- Testimonials ---------- */

.quote-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-card .stars { color: var(--honey); display: flex; gap: 2px; }
.quote-card .stars svg { width: 15px; height: 15px; fill: currentColor; }
.quote-card blockquote { margin: 0; font-size: 0.9688rem; line-height: 1.5; }
.quote-card figcaption { font-size: 0.8125rem; color: var(--ink-soft); }
.quote-card .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.quote-head { display: flex; align-items: center; gap: 10px; }
.quote-head b { font-size: 0.9375rem; }

.quote-card--video { padding: 0; overflow: hidden; }
.quote-card--video video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.quote-card--video figcaption { padding: 12px 16px 14px; }

/* ---------- Problem / mechanism ---------- */

.truth-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 12px; }
.truth-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9688rem;
  line-height: 1.5;
}
.truth-list .mark {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #F6E4DE;
  color: var(--danger);
  margin-top: 1px;
}
.truth-list .mark svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.4; fill: none; }

/* ---------- Routine steps (a real sequence, numbers earn their place) ---------- */

.routine { display: grid; gap: 12px; margin-top: 1.4rem; counter-reset: step; }
.step-card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
}
.step-card .num {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}
.step-card h3 { font-size: 1.03rem; letter-spacing: -0.005em; }
.step-card .step-verb { color: var(--honey); font-weight: 650; font-size: 0.8125rem; }
.step-card p { margin: 6px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- Collections ---------- */

.collections { display: grid; gap: 12px; margin-top: 1.4rem; }
.collection-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 128px;
  border-radius: var(--r-md);
  overflow: hidden;
  padding: 16px;
  color: #FFF9EF;
  background: var(--ink);
  transition: transform var(--press);
  isolation: isolate;
}
.collection-card:active { transform: scale(0.98); }
.collection-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.collection-card::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(transparent 30%, rgba(24, 17, 11, 0.72));
}
.collection-card b { font-size: 1.15rem; letter-spacing: -0.01em; }
.collection-card span { display: block; font-size: 0.8125rem; opacity: 0.85; }

/* ---------- Product cards ---------- */

.product-card {
  background: var(--card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card .media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.product-card .media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 350ms var(--ease-out);
}
.product-card:active .media img { transform: scale(1.03); }

.save-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink-soft);
  box-shadow: var(--shadow-1);
  transition: transform var(--press), color 150ms;
}
.save-btn:active { transform: scale(0.85); }
.save-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.save-btn[aria-pressed="true"] { color: var(--badge); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; stroke: currentColor; }

.product-card .body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.product-card .cat { font-size: 0.75rem; color: var(--ink-faint); letter-spacing: 0.01em; }
.product-card .name { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.004em; }
.product-card .low { font-size: 0.75rem; color: var(--honey); font-weight: 600; }

.product-card .row {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-card .price { font-size: 1rem; }

.add-btn {
  min-height: 40px;
  min-width: 64px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--press), background-color 150ms;
}
.add-btn:active { transform: scale(0.92); }
.add-btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.add-btn.added { background: var(--leaf); }

/* ---------- Bundle offer ---------- */

.bundle-card {
  background: var(--ink);
  color: #F6EFE3;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.bundle-card .bundle-media { aspect-ratio: 16 / 10; }
.bundle-card .bundle-media img { width: 100%; height: 100%; object-fit: cover; }
.bundle-card .bundle-body { padding: 22px 20px 24px; }
.bundle-card h2 { color: #FFFDF8; }
.bundle-card .lede { margin: 0.6rem 0 0; color: rgba(246, 239, 227, 0.8); font-size: 0.9688rem; }

.bundle-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 10px; }
.bundle-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; }
.bundle-list svg { flex: none; width: 18px; height: 18px; stroke: #D8B36A; stroke-width: 2.2; fill: none; margin-top: 2px; }

.bundle-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 1.3rem;
}
.bundle-price-row .price { font-size: 1.7rem; color: #FFFDF8; }
.bundle-price-row .price-was { color: rgba(246, 239, 227, 0.55); }
.bundle-card .btn-honey { margin-top: 1rem; }
.bundle-note { margin: 0.8rem 0 0; font-size: 0.8125rem; color: rgba(246, 239, 227, 0.65); }

/* ---------- Timeline (What to expect) ---------- */

.timeline { display: grid; gap: 0; margin-top: 1.4rem; }
.phase {
  position: relative;
  padding: 0 0 1.6rem 30px;
}
.phase::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: -2px;
  width: 2px;
  background: var(--line);
}
.phase:last-child::before { display: none; }
.phase::after {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--honey);
  box-shadow: 0 0 0 4px var(--honey-soft);
}
.phase .when { font-size: 0.78rem; font-weight: 700; color: var(--honey); letter-spacing: 0.02em; }
.phase h3 { font-size: 1.05rem; margin-top: 2px; letter-spacing: -0.006em; }
.phase p { margin: 6px 0 0; font-size: 0.9375rem; color: var(--ink-soft); max-width: 30rem; }

/* ---------- Value props / loyalty ---------- */

.props { display: grid; gap: 12px; margin-top: 1.4rem; }
.prop {
  display: flex;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.prop .badge-ic {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--leaf-soft);
  color: var(--leaf);
}
.prop .badge-ic svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.prop h3 { font-size: 0.9688rem; }
.prop p { margin: 3px 0 0; font-size: 0.875rem; color: var(--ink-soft); }

.tier-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 1.2rem;
}
.tier {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-1);
  border-top: 3px solid var(--line);
}
.tier b { font-size: 0.9375rem; display: block; }
.tier span { font-size: 0.78rem; color: var(--ink-soft); }
.tier--bronze { border-top-color: #B0793F; }
.tier--silver { border-top-color: #9FA6AD; }
.tier--gold   { border-top-color: #CBA24A; }
.tier--vip    { border-top-color: var(--ink); }

/* ---------- Founder / guarantee ---------- */

.founder-quote {
  border-left: 3px solid var(--honey);
  padding: 4px 0 4px 18px;
  margin: 1.2rem 0 0;
}
.founder-quote p {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.1rem, 4.4vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -0.008em;
}
.founder-quote footer { margin-top: 0.9rem; font-size: 0.875rem; color: var(--ink-soft); }

.guarantee {
  background: var(--leaf-soft);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  display: grid;
  gap: 10px;
}
.guarantee .badge-ic {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--leaf);
  color: #F0F6EF;
}
.guarantee .badge-ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.guarantee h2 { color: #2C4A31; }
.guarantee p { margin: 0; color: #3C5641; font-size: 0.9688rem; max-width: 34rem; }

/* ---------- FAQ ---------- */

.faq { margin-top: 1rem; }
.acc {
  border-bottom: 1px solid var(--line);
}
.acc summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.9688rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg {
  flex: none;
  width: 18px; height: 18px;
  stroke: var(--ink-faint);
  stroke-width: 2;
  fill: none;
  transition: transform 220ms var(--ease-out);
}
.acc[open] summary svg { transform: rotate(180deg); }
.acc .acc-body {
  padding: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 40rem;
}
.acc[open] .acc-body { animation: acc-in 240ms var(--ease-out); }
@keyframes acc-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Newsletter ---------- */

.news-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-1);
}
.news-card p { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.9375rem; max-width: 30rem; }
.news-form { display: grid; gap: 10px; margin-top: 1.1rem; }
.news-form input[type="email"] {
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 1rem;
}
.news-form input[type="email"]:focus-visible { outline-offset: 0; border-color: var(--honey); outline: none; }
.news-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.1rem;
  color: var(--leaf);
  font-weight: 600;
  font-size: 0.9375rem;
}
.news-done svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; }

/* ---------- Footer ---------- */

.footer {
  padding: 2.4rem 0 1.6rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.footer-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 0.9063rem;
  color: var(--ink-soft);
}
.footer-links a:active { color: var(--ink); }
.footer small {
  display: block;
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.footer .wa-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--leaf);
  min-height: 44px;
}
.footer .wa-line svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* ============================================================
   SHOP PAGE
   ============================================================ */

.shop-tools {
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  z-index: 30;
  background: rgba(251, 247, 239, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 8px 0 10px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.search-field svg {
  position: absolute;
  left: 15px;
  width: 18px; height: 18px;
  stroke: var(--ink-faint);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 43px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 1rem;
}
.search-field input:focus { border-color: var(--honey); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1.5px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: transform var(--press), background-color 150ms, color 150ms, border-color 150ms;
}
.chip:active { transform: scale(0.94); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.result-count { margin: 12px 0 2px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.featured-banner {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 12px;
  margin-top: 12px;
}
.featured-banner img {
  width: 108px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.featured-banner .chip-tag { margin-bottom: 6px; }
.featured-banner h2 { font-size: 1.1rem; letter-spacing: -0.008em; }
.featured-banner .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.empty-state {
  text-align: center;
  padding: 3.4rem 1rem;
}
.empty-state .badge-ic {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink-faint);
}
.empty-state .badge-ic svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.empty-state h2 { font-size: 1.2rem; }
.empty-state p { color: var(--ink-soft); margin: 6px auto 18px; max-width: 24rem; font-size: 0.9375rem; }

/* ============================================================
   PRODUCT PAGE
   ============================================================ */

.gallery-wrap { position: relative; margin-inline: calc(var(--gutter) * -1); }
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  scroll-snap-align: center;
}
.gallery-dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.gallery-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: background 150ms, transform 150ms;
}
.gallery-dots i.on { background: #fff; transform: scale(1.2); }
.gallery-wrap .save-btn { top: 12px; right: calc(var(--gutter) + 0px); width: 44px; height: 44px; }

.pdp-head { padding-top: 18px; }
.pdp-head .cat { font-size: 0.8125rem; color: var(--ink-faint); }
.pdp-head h1 { font-size: clamp(1.5rem, 6.4vw, 2rem); line-height: 1.12; letter-spacing: -0.014em; margin-top: 2px; }
.pdp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}
.pdp-meta .price { font-size: 1.35rem; }
.pdp-desc { margin: 14px 0 0; color: var(--ink-soft); font-size: 0.9688rem; max-width: 36rem; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  overflow: hidden;
}
.qty button {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: transform var(--press), background-color 120ms;
}
.qty button:active { transform: scale(0.86); background: var(--paper-2); }
.qty button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.qty output {
  min-width: 34px;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.buy-box { display: grid; gap: 12px; margin-top: 18px; }
.buy-box .qty-row { display: flex; align-items: center; gap: 12px; }
.buy-box .qty-row .t-small { color: var(--ink-soft); }

.trust-row {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.trust-row div { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; }
.trust-row svg { flex: none; width: 18px; height: 18px; stroke: var(--leaf); stroke-width: 1.8; fill: none; }

.pdp-accs { margin-top: 22px; border-top: 1px solid var(--line); }

.review-empty {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 20px;
  text-align: center;
}
.review-empty p { margin: 4px 0 14px; color: var(--ink-soft); font-size: 0.9375rem; }

/* Sticky buy bar sits directly above the tab bar */
.buybar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(251, 247, 239, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid rgba(43, 33, 25, 0.07);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 320ms var(--ease-out), visibility 0s linear 320ms;
}
.buybar.on { transform: none; visibility: visible; transition: transform 320ms var(--ease-out); }
.buybar .price { font-size: 1.1rem; }
.buybar .btn { flex: 1; }
body.has-buybar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px); }

/* ============================================================
   CART PAGE + MINI-CART SHEET
   ============================================================ */

.ship-progress {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 14px 16px;
}
.ship-progress .msg { font-size: 0.9063rem; font-weight: 550; }
.ship-progress .msg b { color: var(--honey); }
.ship-progress .msg.done { color: var(--leaf); display: flex; align-items: center; gap: 8px; }
.ship-progress .msg.done svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.ship-progress .track {
  margin-top: 10px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  overflow: hidden;
}
.ship-progress .fill {
  height: 100%;
  width: 0%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--honey), #C68A2E);
  transition: width 480ms var(--ease-out);
}

.cart-list { display: grid; gap: 10px; margin-top: 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 12px;
}
.cart-item img {
  width: 84px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.cart-item .info { display: flex; flex-direction: column; min-width: 0; }
.cart-item .name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.cart-item .unit { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 2px; }
.cart-item .controls {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cart-item .qty button { width: 38px; height: 38px; }
.cart-item .line-price { font-weight: 650; font-variant-numeric: tabular-nums; }
.cart-item .remove {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 0.8125rem;
  font-weight: 550;
}
.cart-item .remove:active { color: var(--danger); }
.cart-item .remove svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.9; fill: none; }

.summary {
  margin-top: 16px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px 16px;
  display: grid;
  gap: 10px;
}
.summary .row { display: flex; justify-content: space-between; font-size: 0.9375rem; color: var(--ink-soft); }
.summary .row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.summary output { font-variant-numeric: tabular-nums; font-weight: inherit; }

/* Scrim + draggable sheet (mini cart) */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(24, 17, 11, 0.44);
  opacity: 0;
  visibility: hidden;
  transition: visibility 0s linear 300ms;
}
.scrim.on { visibility: visible; transition: none; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 61;
  max-height: min(82dvh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-sheet);
  padding-bottom: calc(var(--safe-b) + 8px);
  transform: translateY(110%);
  visibility: hidden;
  touch-action: none;
  will-change: transform;
}
.sheet.on { visibility: visible; }

.sheet-grab {
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
  cursor: grab;
}
.sheet-handle {
  width: 40px; height: 5px;
  border-radius: var(--r-pill);
  background: var(--line);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px var(--gutter) 10px;
}
.sheet-head h2 { font-size: 1.15rem; letter-spacing: -0.01em; }
.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px var(--gutter) 12px;
  touch-action: pan-y;
}
.sheet-body .cart-list { margin-top: 4px; }
.sheet-foot {
  padding: 12px var(--gutter) 4px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.sheet-foot .sub-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 650;
}
.sheet-foot .sub-row span:first-child { font-weight: 500; color: var(--ink-soft); font-size: 0.9375rem; }
.sheet-foot .cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-empty { text-align: center; padding: 2.2rem 1rem 2.6rem; color: var(--ink-soft); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  z-index: 70;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(32, 26, 20, 0.94);
  color: #F6EFE3;
  font-size: 0.9063rem;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* never intercept taps aimed at content behind it */
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out),
              visibility 0s linear 260ms;
}
.toast button { pointer-events: auto; }
.toast.on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}
.toast button {
  color: #E9C67F;
  font-weight: 700;
  font-size: 0.9063rem;
  min-height: 32px;
  white-space: nowrap;
}

/* ============================================================
   ACCOUNT + WISHLIST
   ============================================================ */

.account-hero {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 22px 18px;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.account-hero .avatar-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink-faint);
}
.account-hero .avatar-circle svg { width: 28px; height: 28px; fill: currentColor; }
.account-hero p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

.menu-list {
  margin-top: 16px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.menu-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 120ms;
}
.menu-list a:last-child { border-bottom: 0; }
.menu-list a:active { background: var(--paper-2); }
.menu-list .badge-ic {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.menu-list .badge-ic svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.menu-list .label { flex: 1; font-weight: 550; font-size: 0.9375rem; }
.menu-list .label span { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-faint); }
.menu-list .chev { width: 16px; height: 16px; stroke: var(--ink-faint); stroke-width: 2; fill: none; transform: rotate(-90deg); }

.rewards-card {
  margin-top: 16px;
  background: var(--ink);
  color: #F6EFE3;
  border-radius: var(--r-md);
  padding: 18px 16px;
}
.rewards-card .track {
  margin-top: 12px;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(246, 239, 227, 0.18);
  overflow: hidden;
}
.rewards-card .fill { height: 100%; width: 0%; background: #D8B36A; border-radius: var(--r-pill); }
.rewards-card .t-small { color: rgba(246, 239, 227, 0.7); margin-top: 8px; display: block; }

/* ============================================================
   ACCESSIBILITY PREFERENCES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero .reveal { opacity: 1; transform: none; animation: none; }
  /* The sheet cross-fades instead of sliding (handled in JS too) */
  .sheet { transition: opacity 200ms ease; }
  .buybar { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar, .shop-tools, .buybar { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tabbar { background: var(--bar-bg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #C9BCA4; --ink-soft: #4E4237; }
  .topbar { border-bottom: 1px solid var(--line); }
  .tabbar { border-top-color: rgba(255, 255, 255, 0.35); }
}

/* ============================================================
   LARGER SCREENS (progressive enhancement from mobile)
   ============================================================ */

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .collections { grid-template-columns: repeat(3, 1fr); }
  .tier-row { grid-template-columns: repeat(4, 1fr); }
  .props { grid-template-columns: repeat(3, 1fr); }
  .news-form { grid-template-columns: 1fr auto; }
  .sheet { left: auto; right: 16px; bottom: 0; width: 420px; border-radius: 22px 22px 0 0; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }

  /* Desktop: tab bar retires, top nav takes over */
  .tabbar { display: none; }
  body { padding-bottom: 3rem; }
  body.has-buybar { padding-bottom: 3rem; }
  .buybar { display: none; }
  .toast { bottom: 28px; }
  .sheet { padding-bottom: 12px; }

  .topbar-nav {
    display: flex;
    gap: 4px;
    margin-right: 8px;
  }
  .topbar-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: var(--r-pill);
    font-size: 0.9375rem;
    font-weight: 550;
    color: var(--ink-soft);
    transition: background-color 140ms, color 140ms;
  }
  .topbar-nav a:hover { background: rgba(43, 33, 25, 0.06); color: var(--ink); }

  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3rem; }
  .hero-media { aspect-ratio: 4 / 4.4; }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .rail { grid-auto-columns: 280px; }
  .rail--wide { grid-auto-columns: 360px; }
  .routine { grid-template-columns: repeat(3, 1fr); }
  .step-card { grid-template-columns: 1fr; gap: 10px; }

  .bundle-card { display: grid; grid-template-columns: 1fr 1fr; }
  .bundle-card .bundle-media { aspect-ratio: auto; height: 100%; }
  .bundle-card .bundle-media img { height: 100%; }

  .cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
  .cart-layout .summary { position: sticky; top: calc(var(--topbar-h) + 24px); margin-top: 14px; }

  .pdp-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .gallery-wrap { margin-inline: 0; border-radius: var(--r-lg); overflow: hidden; }
  .gallery-wrap .save-btn { right: 12px; }

  .footer-links { grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 28px; }

  .btn:hover { opacity: 0.92; }
  .product-card { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
}

/* ==========================================================================
   OFFER SYSTEM
   Value stack, purchase-plan selector, order bump, referral card.
   Added to turn the catalogue into an offer. See HANDOFF.md.
   ========================================================================== */

.offer-card {
  border: 1px solid var(--honey-soft);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  padding: clamp(1.1rem, 4vw, 1.8rem);
  box-shadow: var(--shadow-1);
}
.offer-card .chip-tag { margin-bottom: 0.7rem; }

.stack {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--stack-line);
}

/* The bundle card body sits on espresso, so the stack inherits light values
   there instead of the dark ones used on ivory surfaces. */
.bundle-body {
  --stack-muted: rgba(246, 239, 227, 0.74);
  --stack-line: rgba(246, 239, 227, 0.20);
}
.stack li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--stack-line);
  font-size: 0.98rem;
}
.stack li svg {
  width: 18px;
  height: 18px;
  align-self: center;
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2.4;
}
.stack .stack-val {
  color: var(--stack-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stack li b { font-weight: 650; }
.stack .is-bonus .stack-name::before {
  content: "Bonus";
  display: inline-block;
  margin-right: 7px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--honey-soft);
  color: var(--honey);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.stack-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0.8rem 0 0;
  font-size: 0.98rem;
  color: var(--stack-muted);
}
.stack-total .stack-val { text-decoration: line-through; }

.offer-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0.5rem 0 0.2rem;
}
.offer-price .price { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; }
.offer-save {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--leaf-soft);
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 700;
}
.offer-note { margin: 0.75rem 0 0; font-size: 0.86rem; color: var(--stack-muted, var(--ink-soft)); }

/* ---------- Purchase plan selector ---------- */

.plans { display: grid; gap: 10px; margin: 0 0 0.9rem; }

.plan {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), background 150ms var(--ease-out), transform var(--press);
}
.plan:active { transform: scale(0.985); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan .dot-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-faint);
  display: grid;
  place-items: center;
  transition: border-color 150ms var(--ease-out);
}
.plan .dot-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--honey);
  transform: scale(0);
  transition: transform 180ms var(--ease-out);
}
.plan:has(input:checked) { border-color: var(--honey); background: var(--honey-soft); }
.plan:has(input:checked) .dot-radio { border-color: var(--honey); }
.plan:has(input:checked) .dot-radio::after { transform: scale(1); }
.plan:has(input:focus-visible) { outline: 2px solid var(--honey); outline-offset: 2px; }
.plan-name { display: block; font-weight: 620; }
.plan-sub { display: block; font-size: 0.83rem; color: var(--ink-soft); margin-top: 2px; }
.plan-price { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-price small { display: block; font-weight: 500; font-size: 0.76rem; color: var(--leaf); }
.plan-tag {
  position: absolute;
  top: -9px;
  right: 12px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--leaf);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Order bump ---------- */

.order-bump {
  display: grid;
  grid-template-columns: 24px 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0.9rem;
  margin: 1rem 0;
  border: 1.5px dashed var(--honey);
  border-radius: var(--r-md);
  background: var(--honey-soft);
  cursor: pointer;
  transition: transform var(--press);
}
.order-bump:active { transform: scale(0.99); }
.order-bump input { position: absolute; opacity: 0; pointer-events: none; }
.order-bump .box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--honey);
  background: #fff;
  display: grid;
  place-items: center;
}
.order-bump .box svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; opacity: 0; }
.order-bump:has(input:checked) .box { background: var(--honey); }
.order-bump:has(input:checked) .box svg { opacity: 1; }
.order-bump img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.order-bump b { display: block; font-size: 0.96rem; }
.order-bump span { display: block; font-size: 0.84rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Referral ---------- */

.referral {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1.1rem, 4vw, 1.6rem);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--leaf-soft), var(--paper-2));
  border: 1px solid rgba(62, 107, 68, 0.22);
  text-align: center;
}
.referral .badge-ic { margin: 0 auto; }
.referral p { margin: 0; color: var(--ink-soft); }
.referral .btn { margin-top: 0.6rem; justify-self: center; }

/* ---------- Guarantee, strengthened ---------- */

.guarantee-terms {
  list-style: none;
  margin: 0.9rem auto 0;
  padding: 0;
  max-width: 34rem;
  text-align: left;
  display: grid;
  gap: 8px;
}
.guarantee-terms li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.guarantee-terms svg { width: 17px; height: 17px; margin-top: 3px; fill: none; stroke: var(--leaf); stroke-width: 2.4; }

@media (min-width: 640px) {
  .stack li { font-size: 1rem; }
}

/* ---------- Form controls & Checkout layout ---------- */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px rgba(150, 97, 10, 0.12);
  outline: none;
}

.form-control[readonly], .form-control[disabled] {
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: not-allowed;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6257' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

.checkout-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 20px;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 540px) {
  .payment-options {
    grid-template-columns: 1fr 1fr;
  }
}

.payment-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.payment-option-card:hover {
  border-color: var(--honey-soft);
}

.payment-option-card input[type="radio"] {
  accent-color: var(--honey);
  margin-top: 3px;
}

.payment-option-card:has(input[type="radio"]:checked) {
  border-color: var(--honey);
  background: #FFFDF9;
}

