/* ==========================================================================
   YOPPY v7 components.css — new conversion components (trust bar, comparison
   table, social wall, reviews shell, buy block, recipes, mascot slots).
   --------------------------------------------------------------------------
   Loads on BOTH page families:
     - b2c.css pages   (index, our-story, recipes)
     - style.css pages (product, category, about, trade)
   Rules here are namespaced (.c-*, .mascot) and never restyle existing
   selectors. :root below only ADDS token names that exist in NEITHER
   stylesheet; shared-but-different tokens (--radius, --font-body, shadows)
   are never redefined — component radii are literal px for that reason.
   All spacing uses logical properties so Arabic RTL mirrors for free.
   ========================================================================== */

:root {
  --green-tint: rgba(13, 99, 52, 0.07);
  --green-chip: rgba(13, 99, 52, 0.2);
  --ink-muted: rgba(26, 26, 26, 0.62);
}

/* ======================================================================== */
/*  MASCOT SLOTS — one <img> per pose; swap the SVG files under              */
/*  /assets/mascot/ to reskin the character site-wide with zero page edits. */
/* ======================================================================== */
.mascot { display: block; height: auto; pointer-events: none; user-select: none; }

/* Hero pose: sits beside the hero chips on the red field (index) or in the
   story column (our-story). */
.mascot--hero { width: clamp(64px, 9vw, 96px); margin-block-start: 1.1rem; }

/* Crunch pose: PDP buy block corner. */
.mascot--crunch { width: clamp(64px, 8vw, 88px); }

/* Callout pose: beside section headings (why / comparison). */
.mascot--callout { width: clamp(60px, 7vw, 84px); }
html[dir="rtl"] .mascot--callout { transform: scaleX(-1); }

/* Peek pose: hangs over the footer's top edge. */
.mascot--peek {
  position: absolute;
  top: -46px;
  inset-inline-end: clamp(1.1rem, 6vw, 4rem);
  width: 92px;
  z-index: 1;
}
.site-footer { position: relative; }

/* Empty pose inside the cart drawer: injected via CSS so cart.js stays
   byte-identical (it renders <p class="cart-empty"> only). */
.cart-empty::before {
  content: "";
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 0.9rem;
  background: url("/assets/mascot/empty.svg") center / contain no-repeat;
}

/* ======================================================================== */
/*  TRUST BAR — verified claims only, cream band between hero and marquee.  */
/* ======================================================================== */
.c-trust { background: var(--cream, #FBF4E4); padding-block: 1rem; }
.c-trust-row {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-block: 0.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.c-trust-row::-webkit-scrollbar { display: none; }
.c-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
  padding: 0.5rem 0.9rem;
  background: var(--white, #ffffff);
  border: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink, #1A1A1A);
  white-space: nowrap;
}
.c-chip svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--green, #0D6334); }
@media (min-width: 1024px) {
  .c-trust-row { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

/* ======================================================================== */
/*  COMPARISON TABLE — real <table>, verified claims vs hedged generic.     */
/* ======================================================================== */
.c-compare-panel {
  background: var(--white, #ffffff);
  border: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(26, 26, 26, 0.08));
}
.c-compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.c-compare-table th,
.c-compare-table td {
  padding: 0.85rem 0.9rem;
  text-align: start;
  border-block-start: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  vertical-align: top;
}
/* Row-label icons: tiny geometric marks, ink like the label text. */
.c-compare-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-block-start: 1px;
  color: var(--ink, #1A1A1A);
  opacity: 0.75;
}
.c-compare-table tbody th > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
}
.c-compare-table thead th { border-block-start: none; }
.c-compare-table thead th {
  font-family: var(--font-display, "Anton", sans-serif);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Row label column */
.c-compare-table tbody th { font-weight: 800; color: var(--ink, #1A1A1A); width: 34%; }
/* YOPPY column: the green tint is painted in per row by a clip-path wipe
   (assets/js/compare-motion.js adds .is-painted). CRITICAL: only the tint
   is animated; the cell TEXT is never opacity-gated, so the comparison
   stays fully legible in any rendering context (no-JS, bots, hidden tabs).
   Static fallback: rows are pre-painted until the JS arms the wipe. */
.c-compare-table .is-yoppy {
  position: relative;
  background: none;
  color: #0a4f29;
  font-weight: 700;
}
.c-compare-table .is-yoppy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green-tint);
  z-index: 0;
  clip-path: inset(0 0 0 0);
  transition: clip-path 450ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.c-compare-table .is-yoppy > * { position: relative; z-index: 1; }
/* Armed state (JS, motion available): tint starts wiped out, paints in. */
.c-compare-panel.wipe-armed tr:not(.is-painted) .is-yoppy::before { clip-path: inset(0 100% 0 0); }
html[dir="rtl"] .c-compare-panel.wipe-armed tr:not(.is-painted) .is-yoppy::before { clip-path: inset(0 0 0 100%); }
.c-compare-table thead .is-yoppy { color: #0D6334; }
.c-compare-table thead .is-yoppy::before { transition: none; } /* header tint stays put */
.c-compare-panel.wipe-armed thead tr:not(.is-painted) .is-yoppy::before { clip-path: inset(0 0 0 0); }
.c-compare-table .is-generic { color: var(--ink-muted); }

/* The mascot referee: hops down the YOPPY column stamping each row as it
   paints, then bites down on the final row (signature moment). Positioned
   by compare-motion.js against the panel; decorative only. */
.compare-mascot {
  position: absolute;
  top: 0;
  left: 0; /* JS sets transform; left/top stay 0 for clean translate math */
  width: clamp(34px, 9vw, 52px);
  height: auto;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(26, 26, 26, 0.25));
}
.compare-crumb {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink, #1A1A1A);
  z-index: 4;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .c-compare-table .is-yoppy::before { transition: none; }
}
.c-compare-yes { display: inline-flex; align-items: center; gap: 0.35rem; }
.c-compare-yes svg { width: 14px; height: 14px; flex: 0 0 14px; }
@media (max-width: 480px) {
  .c-compare-table { font-size: 0.8rem; }
  .c-compare-table th, .c-compare-table td { padding: 0.7rem 0.55rem; }
  .c-compare-table thead th { font-size: 0.92rem; }
}
.c-compare-note { margin: 0.9rem 0 0; font-size: 0.78rem; color: var(--ink-muted); }

/* Heading row with the callout mascot beside it */
.c-head-with-mascot { display: flex; align-items: flex-end; gap: 1rem; justify-content: space-between; }
.c-head-with-mascot .section-head { margin-bottom: 0; }
.c-head-with-mascot { margin-bottom: 2.2rem; }

/* ======================================================================== */
/*  PDP BUY BLOCK (product.html, style.css page family)                     */
/* ======================================================================== */
.c-buy-wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}
.c-buy {
  background: var(--white, #ffffff);
  border: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  border-radius: 20px;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(26, 26, 26, 0.08));
  padding: clamp(1.3rem, 4vw, 2rem);
  display: grid;
  gap: 1rem;
}
.c-buy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.c-buy-price {
  font-family: var(--font-display, "Anton", sans-serif);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1;
  color: var(--ink, #1A1A1A);
}
.c-buy-per { display: block; margin-top: 0.4rem; font-family: var(--font-body, sans-serif); font-size: 0.9rem; font-weight: 600; color: var(--ink-muted); }
.c-buy-ship { font-size: 0.88rem; font-weight: 700; color: #0a4f29; margin: 0; }
.c-buy-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.c-buy-chips .c-chip { font-size: 0.68rem; padding: 0.38rem 0.7rem; }
.c-buy .btn { width: 100%; }
/* Add-to-cart label swap (same pattern as index.html cards) */
.c-buy .add-btn .added-label { display: none; }
.c-buy .add-btn.is-added .added-label { display: inline; }
.c-buy .add-btn.is-added .default-label { display: none; }
@media (min-width: 640px) { .c-buy .btn { width: auto; min-width: 260px; } }

/* Per-SKU flavor story (static baked copy, unhidden by mockup.js) */
.c-flavor-story { margin: 0; color: var(--ink-muted); line-height: 1.6; }
.c-flavor-story[hidden] { display: none; }

/* Corporate divider band on the dual-purpose PDP */
.c-biz-divider {
  margin-block-start: clamp(2.5rem, 7vh, 4rem);
  padding: 1rem clamp(1.1rem, 4vw, 2.5rem);
  background: rgba(26, 26, 26, 0.045);
  border-block: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}

/* ======================================================================== */
/*  RECIPES SCAFFOLD — honest coming-soon shells                            */
/* ======================================================================== */
.c-recipe-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .c-recipe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .c-recipe-grid { grid-template-columns: repeat(3, 1fr); } }
.c-recipe-card {
  background: var(--white, #ffffff);
  border: 1px solid var(--line, rgba(26, 26, 26, 0.12));
  border-radius: 26px;
  overflow: hidden;
}
.c-recipe-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-soft, #fdf9ef); }
.c-recipe-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.35); opacity: 0.75; }
.c-recipe-body { padding: 1.1rem 1.2rem 1.3rem; }
.c-recipe-body h3 {
  font-family: var(--font-display, "Anton", sans-serif);
  font-weight: 400;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
.c-recipe-body p { margin: 0; font-size: 0.88rem; color: var(--ink-muted); }
.c-recipe-soon {
  display: inline-block;
  margin-block-start: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px dashed rgba(26, 26, 26, 0.3);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ======================================================================== */
/*  FOOTER EXTRAS                                                           */
/* ======================================================================== */
/* Payment badges reuse the existing .pay-row / .pay-badge styles already
   defined in b2c.css; nothing new needed here. */

