/* ============================================================
   Nutrifarm Landing - Component & Layout Styles
   Mobile-first. Uses tokens from tokens.css.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../img/bg-main.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--dark-navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-head); line-height: var(--lh-tight); margin: 0 0 var(--sp-2); color: var(--text); }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p  { margin: 0 0 var(--sp-2); }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: var(--sp-2);
  background: var(--barn-red); color: var(--nutri-orange);
  padding: var(--sp-2) var(--sp-3); font-weight: 700;
  border-radius: var(--r-md); z-index: 10000;
}
.skip-link:focus { top: var(--sp-2); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* ---------- Layout container ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

/* ---------- Header (sticky slim) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,248,231,0.96);
  backdrop-filter: saturate(130%) blur(8px);
  -webkit-backdrop-filter: saturate(130%) blur(8px);
  border-bottom: 2px solid var(--barn-red);
  min-height: 48px;
  box-shadow: 0 1px 8px rgba(17,17,17,0.08);
}
.site-header .container {
  display: flex; align-items: center;
  gap: 8px;
  min-height: 48px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.site-header .brand { margin-right: auto; }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.site-footer .brand img { width: 64px; height: 64px; }
.brand-name {
  font-family: var(--font-head); font-weight: 800;
  font-size: 18px; color: var(--earth-brown);
  letter-spacing: -0.01em;
}
.nav-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  min-height: 36px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--earth-brown);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid var(--border-strong);
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.nav-chip:hover { background: var(--promo-yellow); }
.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--nutri-orange); color: var(--white);
  border-radius: var(--r-md);
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--barn-red); color: var(--promo-yellow);
  font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}
.cart-count[hidden] { display: none; }

/* Footer brand uses the original gap */
.site-footer .brand { gap: var(--sp-1); }
.site-footer .brand-name { font-size: var(--fs-h3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-1);
  min-height: var(--tap-cta);
  padding: 0 var(--sp-3);
  border-radius: var(--r-md);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-body);
  text-decoration: none;
  line-height: 1;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  cursor: pointer;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--nutri-orange);
  color: var(--white);
  box-shadow: var(--shadow-2);
}
.btn-primary:hover { background: #ffb83a; }

.btn-secondary {
  background: var(--surface);
  color: var(--barn-red);
  border: 3px solid var(--barn-red);
}

.btn-accent {
  background: var(--nutri-orange);
  color: var(--strong-black);
  box-shadow: var(--shadow-1);
}
.btn-accent:hover { background: #ffb83a; }

.btn-messenger {
  background: #0084FF;
  color: var(--white);
  box-shadow: var(--shadow-2);
}
.btn-messenger:hover { background: #0070d9; }
.btn-messenger svg { width: 24px; height: 24px; }

.btn-submit {
  min-height: var(--tap-submit);
  font-size: var(--fs-h3);
  width: 100%;
}

.btn-full { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(254,170,27,0.10), transparent 55%),
    linear-gradient(180deg, rgba(245,236,210,0.70) 0%, rgba(244,238,231,0.65) 100%);
  padding: var(--sp-5) 0 var(--sp-6);
  text-align: center;
}
.hero h1 {
  font-size: var(--fs-hero);
  color: var(--earth-brown);
  margin-bottom: var(--sp-3);
}
.hero .lede {
  font-size: var(--fs-body);
  color: var(--text-muted);
  margin: 0 auto var(--sp-4);
  max-width: 32ch;
}
.hero-ctas { display: grid; gap: var(--sp-2); }

.hero-help {
  margin: var(--sp-2) 0 0;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.hero-help a {
  color: #0084FF;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-help a:hover { color: #0070d9; }

/* ---------- Trust band ---------- */
.promo-band {
  background: linear-gradient(135deg, #1E2D5B 0%, #162346 100%);
  color: var(--white);
  padding: var(--sp-3) 0;
  border-top: 3px solid var(--premium-gold);
  border-bottom: 3px solid var(--premium-gold);
  text-align: center;
}

/* ---------- Promo bundle (countdown + panel wrap) ---------- */
.promo-section { padding: var(--sp-5) 0; background: transparent; }
.promo-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.promo-countdown {
  background: linear-gradient(135deg, #1E2D5B 0%, #162346 100%);
  color: var(--white);
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  padding: var(--sp-2) var(--sp-3);
  text-align: center;
  border-bottom: 3px solid var(--premium-gold);
}
.promo-countdown .label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--promo-yellow);
  letter-spacing: 0.08em;
}
.countdown-timer {
  display: inline-flex; gap: 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.countdown-unit {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(247,209,29,0.4);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  min-width: 58px;
  display: inline-flex; flex-direction: column; align-items: center;
  line-height: 1;
}
.countdown-unit .n { font-size: var(--fs-h3); color: var(--promo-yellow); }
.countdown-unit .u { font-size: 11px; color: var(--white); font-weight: 700; letter-spacing: 0.08em; margin-top: 3px; opacity: 0.85; }
.promo-countdown[hidden] { display: none; }

.trust-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
  list-style: none; padding: 0; margin: 0;
  text-align: left;
}
.trust-list li {
  display: flex; align-items: center; gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--fs-small);
}
.trust-list svg { flex: none; width: 28px; height: 28px; color: var(--premium-gold); }

/* ---------- Sections ---------- */
.section { padding: var(--sp-5) 0; background: rgba(244,238,231,0.75); }
.section-title {
  text-align: center;
  margin-bottom: var(--sp-4);
}
.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--bottle-amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-1);
}

/* ---------- Reasons grid ---------- */
.reasons {
  background: rgba(255,248,231,0.72);
}
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
.reason {
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  text-align: center;
  box-shadow: var(--shadow-1);
}
.reason svg { width: 40px; height: 40px; color: var(--nutri-orange); margin: 0 auto var(--sp-1); }
.reason h3 { font-size: var(--fs-body); margin-bottom: 4px; }
.reason p { font-size: var(--fs-small); color: var(--text-muted); margin: 0; }

/* ---------- Promo bundle panel ---------- */
.promo-panel {
  background: linear-gradient(135deg, var(--nutri-orange) 0%, var(--premium-gold) 100%);
  color: var(--strong-black);
  padding: var(--sp-4);
  text-align: center;
}
.promo-panel h2 { color: var(--earth-brown); }
.promo-panel .save-callout {
  display: inline-block;
  background: var(--barn-red);
  color: var(--promo-yellow);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-weight: 800;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-small);
  letter-spacing: 0.05em;
}
.promo-bullets {
  list-style: none;
  padding: 0;
  margin: var(--sp-2) auto var(--sp-3);
  max-width: 440px;
  display: grid;
  gap: 10px;
  text-align: left;
}
.promo-bullets li {
  background: rgba(255,255,255,0.65);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: var(--fs-body);
  color: var(--earth-brown);
}
.promo-bullets strong { color: var(--strong-black); }

/* ---------- Catalog ---------- */
.catalog {
  background: rgba(244,238,231,0.75);
}
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
.product-card {
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
  position: relative;
}
.product-card .accent-bar {
  height: 8px;
  background: var(--sku-color, var(--nutri-orange));
}
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-media .no-image {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: var(--fs-small);
  text-align: center;
  padding: var(--sp-3);
}
.product-badge {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  background: var(--barn-red);
  color: var(--promo-yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: var(--r-pill);
}
.product-badge.badge-promo { background: var(--nutri-orange); color: var(--strong-black); }
.product-badge.badge-new { background: var(--success); color: var(--white); }

.product-body {
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
  flex: 1;
}
.product-name {
  font-family: var(--font-head); font-weight: 800;
  font-size: var(--fs-h3);
  color: var(--text);
  margin: 0;
  line-height: 1.15;
}
.product-tagline {
  color: var(--text-muted);
  font-size: var(--fs-small);
  margin: 0;
}
.product-rating {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.product-rating .stars { color: var(--star); letter-spacing: 2px; font-size: 18px; }
.product-hook {
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 600;
  margin: 0;
}

/* Single-variant price block */
.price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--surface-alt);
  border-radius: var(--r-md);
  padding: 12px 16px;
  border: 2px solid var(--border);
}
.price-big {
  font-size: 28px;
  font-weight: 800;
  color: var(--strong-black);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.price-unit {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-weight: 600;
}

/* Variant tiers (e.g. scale sizes) */
.bundles {
  display: grid;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.bundle {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: var(--sp-2);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.bundle:hover { border-color: var(--border-strong); }
.bundle input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 24px; height: 24px;
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  position: relative;
  margin: 0;
  flex: none;
}
.bundle input[type="radio"]:checked {
  border-color: var(--nutri-orange);
}
.bundle input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--nutri-orange);
  border-radius: 50%;
}
.bundle:has(input:checked) {
  border-color: var(--nutri-orange);
  background: #FFF6E0;
}
.bundle-label {
  display: flex; flex-direction: column; gap: 2px;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text);
}
.bundle-label .save {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}
.bundle-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}
.bundle-best {
  position: absolute; top: -10px; right: 12px;
  background: var(--nutri-orange); color: var(--strong-black);
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  padding: 3px 8px; border-radius: var(--r-pill);
  border: 2px solid var(--surface);
}

.product-actions {
  display: grid; gap: var(--sp-1);
}
.details-link {
  background: none; border: 0;
  color: var(--dark-navy);
  font-weight: 700;
  font-size: var(--fs-small);
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: var(--tap-min);
  cursor: pointer;
}

/* ---------- 3-step guide ---------- */
.steps {
  background: rgba(255,248,231,0.72);
}
.steps-list {
  display: grid; gap: var(--sp-3);
  list-style: none; padding: 0; margin: 0;
  counter-reset: step;
}
.step {
  display: flex; align-items: flex-start; gap: var(--sp-2);
}
.step-num {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--barn-red);
  color: var(--nutri-orange);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--fs-h2);
  display: inline-flex; align-items: center; justify-content: center;
}
.step-body h3 { margin-bottom: 4px; }
.step-body p { color: var(--text-muted); margin: 0; }

/* ---------- Testimonials ---------- */
.testimonials {
  background: rgba(245,236,210,0.75);
}
.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform var(--dur-slow) var(--ease);
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  padding: 0 var(--sp-2);
}
.quote-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  box-shadow: var(--shadow-1);
}
.quote-card .stars { color: var(--star); letter-spacing: 2px; font-size: 20px; margin-bottom: var(--sp-1); }
.quote-card blockquote {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
}
.quote-card .meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: var(--fs-small);
}
.quote-card .meta .name { font-weight: 800; color: var(--text); }
.quote-card .meta .loc { color: var(--text-muted); }

.carousel-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.carousel-btn {
  width: var(--tap-min); height: var(--tap-min);
  border-radius: 50%;
  background: var(--barn-red); color: var(--nutri-orange);
  display: inline-flex; align-items: center; justify-content: center;
}
.carousel-btn svg { width: 24px; height: 24px; }
.carousel-btn:disabled { opacity: 0.4; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--border-strong);
  padding: 0;
  cursor: pointer;
}
.carousel-dot[aria-current="true"] { background: var(--barn-red); }

/* ---------- Messenger CTA panel ---------- */
.messenger-panel {
  background: rgba(245,236,210,0.9);
  color: var(--barn-red);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
  box-shadow: var(--shadow-2);
  border: 2px solid var(--border-strong);
}
.messenger-panel h2 { color: var(--barn-red); }
.messenger-panel p { color: var(--text); }
.messenger-panel .btn {
  margin-top: var(--sp-2);
  background: #0084FF;
  color: var(--white);
}
.messenger-panel .btn:hover { background: #0070d9; }

/* ---------- Cart + Order form ---------- */
.cart-section {
  background: var(--surface);
}
.cart-empty {
  text-align: center;
  padding: var(--sp-4) 0;
  color: var(--text-muted);
}
.cart-items { list-style: none; padding: 0; margin: 0 0 var(--sp-3); display: grid; gap: var(--sp-2); }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.cart-item img {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-alt);
}
.cart-item-body {
  display: flex; flex-direction: column; gap: 4px;
}
.cart-item-name { font-weight: 800; font-size: var(--fs-small); margin: 0; }
.cart-item-tier { font-size: 14px; color: var(--text-muted); }
.cart-item-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.qty-control { display: inline-flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 40px; height: 40px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 20px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.qty-val { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-remove {
  background: none; border: 0;
  color: var(--error);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px;
  min-height: var(--tap-min);
}
.cart-item-total { font-weight: 800; font-variant-numeric: tabular-nums; }

.shipping-progress {
  background: var(--surface-alt);
  border-radius: var(--r-md);
  padding: var(--sp-2);
  margin-bottom: var(--sp-3);
  text-align: center;
}
.shipping-progress .bar {
  height: 10px;
  background: var(--border);
  border-radius: var(--r-pill);
  margin-top: var(--sp-1);
  overflow: hidden;
}
.shipping-progress .bar > span {
  display: block; height: 100%;
  background: var(--success);
  transition: width var(--dur-slow) var(--ease);
}
.shipping-progress.met {
  background: #E6F3EB;
  border: 2px solid var(--success);
  color: var(--success);
  font-weight: 800;
}

/* Bonus / freebie panel */
.bonus-panel {
  display: grid;
  gap: 8px;
  margin-bottom: var(--sp-3);
}
.bonus-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-body);
}
.bonus-line > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bonus-icon {
  font-size: 24px;
  line-height: 1;
}
.bonus-earned {
  background: #FFF6D6;
  border: 2px solid var(--promo-yellow);
  color: var(--earth-brown);
}
.bonus-earned strong { color: var(--strong-black); font-size: var(--fs-body); }
.bonus-note { font-size: var(--fs-small); color: var(--text-muted); }
.bonus-select-wrap { margin-top: 6px; }
.bonus-select {
  width: 100%;
  min-height: var(--tap-min);
  padding: 10px 14px;
  font-size: var(--fs-small);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--earth-brown);
  background: var(--white);
  border: 2px solid var(--premium-gold);
  border-radius: var(--r-md);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23432716' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.bonus-select:focus {
  outline: 3px solid var(--dark-navy);
  outline-offset: 2px;
}
.bonus-teaser {
  background: var(--surface-alt);
  border: 2px dashed var(--border);
  color: var(--text-muted);
  font-size: var(--fs-small);
  text-align: center;
}

.cart-totals {
  background: var(--surface-alt);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  display: grid; gap: 6px;
  font-size: var(--fs-body);
}
.cart-totals .row { display: flex; justify-content: space-between; }
.cart-totals .row.grand {
  font-size: var(--fs-h3);
  font-weight: 800;
  border-top: 2px solid var(--border-strong);
  padding-top: var(--sp-1);
  margin-top: var(--sp-1);
}
.cart-totals .row span:last-child { font-variant-numeric: tabular-nums; }

/* Order form */
.order-form {
  display: grid; gap: var(--sp-3);
  background: var(--surface);
}
.field { display: grid; gap: 6px; }
.field label {
  font-weight: 800;
  font-size: var(--fs-small);
  color: var(--text);
}
.field label .req { color: var(--error); margin-left: 2px; }
.field input, .field select, .field textarea {
  min-height: var(--tap-cta);
  padding: 12px 14px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-body);
  color: var(--text);
  width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--nutri-orange);
  box-shadow: var(--focus-ring);
}
.field .hint { font-size: 14px; color: var(--text-muted); }
.field .error {
  font-size: var(--fs-small);
  color: var(--error);
  font-weight: 700;
}
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: var(--error);
  background: #FEF2F2;
}
.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }

.d2d-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  padding: var(--sp-2);
  margin-bottom: var(--sp-2);
  border-radius: var(--r-md);
  background: #FEF2F2;
  border: 2px solid var(--error);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--error);
  font-weight: 700;
}
.d2d-warning svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--error);
}

.form-status {
  padding: var(--sp-3);
  border-radius: var(--r-md);
  font-weight: 700;
  text-align: center;
}
.form-status[data-state="error"] {
  background: #FEF2F2;
  color: var(--error);
  border: 2px solid var(--error);
}
.form-status[data-state="success"] {
  background: #E6F3EB;
  color: var(--success);
  border: 2px solid var(--success);
}
.form-status[hidden] { display: none; }

/* Success panel */
.success-panel {
  background: var(--surface);
  border: 3px solid var(--success);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
}
.success-panel svg { width: 64px; height: 64px; color: var(--success); margin: 0 auto var(--sp-2); }
.success-panel h2 { color: var(--success); }
.success-panel .order-id {
  display: inline-block;
  background: var(--surface-alt);
  border: 2px solid var(--border-strong);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-family: var(--font-head);
  font-weight: 800;
  margin: var(--sp-2) 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Floating cart pill ---------- */
.floating-cart {
  position: fixed;
  right: var(--sp-2);
  bottom: var(--sp-2);
  background: var(--barn-red);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 10px 14px 10px 18px;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  box-shadow: var(--shadow-3);
  z-index: 80;
  transform: translateY(120%);
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur) var(--ease);
  opacity: 0;
  pointer-events: none;
  font-weight: 800;
}
.floating-cart.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.floating-cart .fc-count {
  background: var(--nutri-orange); color: var(--strong-black);
  border-radius: var(--r-pill);
  min-width: 28px; height: 28px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.floating-cart .fc-total { font-variant-numeric: tabular-nums; }
.floating-cart .fc-dismiss {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,17,17,0.6);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease);
}
.modal-backdrop.open .modal { transform: translateY(0); }
@media (min-width: 520px) {
  .modal-backdrop { align-items: center; padding: var(--sp-3); }
  .modal { border-radius: var(--r-lg); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { margin: 0; font-size: var(--fs-h3); }
.modal-close {
  width: var(--tap-min); height: var(--tap-min);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-alt);
}
.modal-close svg { width: 24px; height: 24px; }
.modal-body { padding: var(--sp-3); }

.modal-section { margin-bottom: var(--sp-3); }
.modal-section h4 {
  font-size: var(--fs-body);
  margin: 0 0 var(--sp-1);
  color: var(--earth-brown);
}
.indications-list { padding-left: var(--sp-3); margin: 0; }
.indications-list li { margin-bottom: 6px; }
.dosage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.dosage-table th, .dosage-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.dosage-table th {
  background: var(--surface-alt);
  font-weight: 800;
  color: var(--earth-brown);
}
.modal-note {
  background: var(--soft-beige);
  border-left: 4px solid var(--premium-gold);
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  margin-top: var(--sp-2);
}

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(245,236,210,0.78);
  color: var(--text);
  padding: var(--sp-5) 0 var(--sp-3);
  text-align: center;
  border-top: 3px solid var(--barn-red);
}
.site-footer .brand-name { color: var(--barn-red); }
.site-footer p { color: var(--text-muted); font-size: var(--fs-small); }
.footer-links {
  display: grid; gap: var(--sp-1);
  margin: var(--sp-3) 0;
}
.footer-link {
  color: var(--barn-red);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 0 var(--sp-3);
  border: 2px solid var(--barn-red);
  border-radius: var(--r-md);
  font-weight: 700;
  text-decoration: none;
}
.footer-link:hover { background: rgba(107,58,46,0.08); }
.footer-link svg { width: 20px; height: 20px; }
.copyright {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.footer-legal {
  font-size: var(--fs-small);
  margin: var(--sp-3) 0 0;
}
.footer-legal a {
  color: var(--barn-red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal a + a { margin-left: 10px; }

/* ---------- Policy pages (privacy, refund, shipping, terms) ---------- */
.policy {
  background: rgba(255,248,231,0.95);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-3);
  margin: var(--sp-4) 0;
  box-shadow: var(--shadow-1);
  border: 2px solid var(--border-strong);
}
.policy h1 { font-size: 26px; color: var(--earth-brown); margin-bottom: var(--sp-2); }
.policy h2 { font-size: 19px; color: var(--barn-red); margin-top: var(--sp-3); margin-bottom: var(--sp-1); }
.policy p, .policy li { font-size: 15px; line-height: 1.6; color: var(--text); }
.policy ul { padding-left: var(--sp-3); margin: 0 0 var(--sp-2); }
.policy li { margin-bottom: 4px; }
.policy .meta { font-size: 12px; color: var(--text-muted); margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 2px solid var(--border); }
.policy .back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--barn-red); font-weight: 800;
  font-size: 14px;
  text-decoration: none; margin-bottom: var(--sp-2);
}
.policy .back:hover { text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Scroll lock ---------- */
body.scroll-locked { overflow: hidden; }

/* Anchor targets clear the sticky header */
#catalog, #orderSection, #countdown { scroll-margin-top: 60px; }

/* ---------- Responsive: tablet+ ---------- */
@media (min-width: 520px) {
  :root { --content-max: 640px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list { grid-template-columns: repeat(3, 1fr); justify-items: center; }
  .trust-list li { justify-content: center; }
}
@media (min-width: 780px) {
  :root { --content-max: 900px; }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}
