/* ==========================================================================
   Components — buttons, cards, forms, badges, tier indicator
   Each "component" maps to a future Liquid section/snippet in Dawn fork.
   ========================================================================== */

/* ----- Button ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-6);
  border: 2px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-base) var(--easing), color var(--t-base) var(--easing), border-color var(--t-base) var(--easing), transform var(--t-fast) var(--easing);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }
.btn-primary:hover { background: var(--c-ink-700); border-color: var(--c-ink-700); }
.btn-primary:focus-visible { outline-color: var(--c-yellow); }

.btn-secondary { background: transparent; color: var(--c-black); border-color: var(--c-black); }
.btn-secondary:hover { background: var(--c-black); color: var(--c-white); }

.btn-flavor { background: var(--c-flavor); color: var(--c-black); border-color: var(--c-flavor); }
.btn-flavor:hover { filter: brightness(0.92); }

.btn-ghost { background: transparent; color: var(--c-black); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--c-ink-700); }

/* White-outline button for use on dark surfaces. Inverts on hover (filled white, dark text). */
.btn-ghost-light { background: transparent; color: var(--c-white); border-color: var(--c-white); }
.btn-ghost-light:hover { background: var(--c-white); color: var(--c-black); }

/* Visually-disabled button. Use this class because the `disabled` HTML attribute is ignored on <a>. */
.btn[aria-disabled="true"], .btn.is-disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

.btn-block { width: 100%; }
.btn-lg { padding: var(--s-5) var(--s-8); font-size: var(--text-base); }
.btn-sm { padding: var(--s-2) var(--s-4); font-size: var(--text-xs); }

/* ----- Pill / badge ----- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  background: var(--c-surface-200);
  color: var(--c-ink-900);
}
.pill-yellow { background: var(--c-yellow); color: var(--c-black); }
.pill-flavor { background: var(--c-flavor); color: var(--c-black); }
.pill-flavor-soft { background: var(--c-flavor-soft); color: var(--c-ink-900); }
.pill-success { background: rgba(31, 122, 58, 0.12); color: var(--c-success); }
.pill-warning { background: rgba(168, 106, 0, 0.12); color: var(--c-warning); }
.pill-info { background: rgba(31, 79, 122, 0.12); color: var(--c-info); }
.pill-outline { background: transparent; border: 1px solid var(--c-border); }

/* Star for top-10 */
.pill-top10::before { content: '★'; }

/* ----- Card ----- */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform var(--t-base) var(--easing), box-shadow var(--t-base) var(--easing), border-color var(--t-base) var(--easing);
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-flavor); }
.card-soft { background: var(--c-surface-100); border-color: transparent; }
.card-flat { padding: 0; border: none; background: transparent; }

/* ----- Form ----- */
.form-row { margin-bottom: var(--s-5); }
.form-row-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row-grid { grid-template-columns: 1fr; } }

.label {
  display: block;
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  margin-bottom: var(--s-2);
  color: var(--c-ink-900);
}
.label-required::after { content: ' *'; color: var(--c-danger); }

.input, .select, .textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--c-white);
  border: 1px solid var(--c-ink-300);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--c-ink-900);
  transition: border-color var(--t-fast) var(--easing), box-shadow var(--t-fast) var(--easing);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-black);
  box-shadow: 0 0 0 3px var(--c-yellow);
}
.textarea { min-height: 110px; resize: vertical; }
.input-error { border-color: var(--c-danger); }

.help { display: block; margin-top: var(--s-2); font-size: var(--text-xs); color: var(--c-ink-500); }
.error { display: block; margin-top: var(--s-2); font-size: var(--text-xs); color: var(--c-danger); }

/* Form section heading */
.form-section { margin-bottom: var(--s-10); }
.form-section h3 { font-size: var(--text-xl); margin-bottom: var(--s-2); }
.form-section .form-section-meta { color: var(--c-ink-500); font-size: var(--text-sm); margin-bottom: var(--s-6); }

/* File input styled */
.file-input {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4); border: 2px dashed var(--c-ink-300); border-radius: var(--r-md);
  background: var(--c-surface-100); cursor: pointer;
  transition: border-color var(--t-base) var(--easing);
}
.file-input:hover { border-color: var(--c-black); }

/* ----- Tier indicator ----- */
.tier {
  background: var(--c-surface-100);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}
.tier-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-2); }
.tier-row:last-child { margin-bottom: 0; }
.tier-label { font-family: var(--font-title); font-size: var(--text-sm); font-weight: var(--fw-bold); }
.tier-track { height: 6px; background: var(--c-ink-300); border-radius: var(--r-pill); overflow: hidden; }
.tier-fill { height: 100%; background: var(--c-flavor); transition: width var(--t-slow) var(--easing); }
.tier-savings { font-size: var(--text-xs); color: var(--c-ink-500); margin-top: var(--s-2); }

/* ----- Brand pillar icons ----- */
.icons-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.icon-pill {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--c-surface-200); color: var(--c-ink-900);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md);
  font-size: var(--text-xs); font-weight: var(--fw-semi);
  border: 1px solid var(--c-border);
}
.icon-pill::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-flavor);
  flex-shrink: 0;
}

/* ----- Quantity stepper ----- */
.qty {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--c-ink-300); border-radius: var(--r-md);
  background: var(--c-white);
  overflow: hidden;
}
.qty button {
  background: var(--c-white); border: none; padding: var(--s-3) var(--s-4);
  font-size: var(--text-base); font-weight: var(--fw-bold); cursor: pointer;
  transition: background var(--t-fast) var(--easing);
}
.qty button:hover { background: var(--c-surface-200); }
.qty input {
  width: 60px; text-align: center; border: none; padding: var(--s-3);
  font-size: var(--text-base); font-weight: var(--fw-bold);
  border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border);
}
.qty input:focus { outline: none; background: var(--c-flavor-soft); }

/* ----- Variant selector (segmented) ----- */
.variants {
  display: inline-flex;
  border: 2px solid var(--c-black);
  border-radius: var(--r-md);
  overflow: hidden;
}
.variant {
  padding: var(--s-3) var(--s-5);
  background: var(--c-white);
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  border: none; cursor: pointer;
  transition: background var(--t-fast) var(--easing), color var(--t-fast) var(--easing);
}
.variant + .variant { border-left: 2px solid var(--c-black); }
.variant.active { background: var(--c-black); color: var(--c-white); }
.variant:not(.active):hover { background: var(--c-surface-200); }

/* ----- Module card (dashboard) ----- */
.module {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
}
.module-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--c-border);
}
.module-head h3 {
  font-size: var(--text-sm); letter-spacing: var(--tracking-title);
  text-transform: uppercase; font-weight: var(--fw-bold);
  margin: 0;
}

/* ----- Disclosure (twirl) ----- */
.disclosure {
  border-top: 1px solid var(--c-border);
}
.disclosure summary {
  list-style: none;
  padding: var(--s-5) 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after {
  content: '+';
  font-size: var(--text-2xl); font-weight: var(--fw-light);
  transition: transform var(--t-base) var(--easing);
}
.disclosure[open] summary::after { content: '−'; }
.disclosure[open] > *:not(summary) { padding-bottom: var(--s-6); }

/* ----- Notice / banner ----- */
.notice {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: var(--c-flavor-soft);
  border-left: 3px solid var(--c-flavor);
}
.notice-info { background: rgba(31, 79, 122, 0.06); border-left-color: var(--c-info); }
.notice-warn { background: rgba(168, 106, 0, 0.08); border-left-color: var(--c-warning); }

/* ----- Logo (placeholder script) ----- */
.logo-script {
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
}
.logo-mark svg { width: 100%; height: 100%; }

/* ----- Header logo (full Buttermints wordmark + leaf) ----- */
.header-logo {
  height: 84px;
  width: auto;
  display: block;
}
.footer-logo {
  height: 120px;
  width: auto;
  display: block;
}
@media (max-width: 768px) {
  .header-logo { height: 60px; }
  .footer-logo { height: 90px; }
}

/* ----- Trust strip (home page "As seen on" + Find a Distributor) ----- */
.trust-strip {
  background: var(--c-black);
  color: var(--c-white);
  padding: var(--s-8) 0;
}
.trust-strip .trust-label {
  color: var(--c-white);
}
.trust-strip .trust-logo {
  color: var(--c-white);
  font-family: var(--font-title);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
}
.trust-strip .trust-cta {
  margin-left: auto;
  color: var(--c-white);
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-decoration: underline;
  text-decoration-color: var(--c-yellow);
  text-underline-offset: 4px;
}
.trust-strip .trust-cta:hover { text-decoration-color: var(--c-white); }

/* ----- Wholesale portal bar (top of every page — clarifies this isn't retail) ----- */
.wholesale-bar {
  background: var(--c-black);
  color: var(--c-white);
  padding: var(--s-2) 0;
  font-size: var(--text-xs);
  text-align: center;
  letter-spacing: 0.05em;
}
.wholesale-bar strong {
  color: var(--c-white);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  margin-right: var(--s-3);
}
.wholesale-bar a {
  color: var(--c-white);
  text-decoration: underline;
  margin-left: var(--s-2);
}
.wholesale-bar a:hover { text-decoration: none; }
/* white version for use on dark backgrounds — apply by adding the .on-dark class */
.header-logo.on-dark, .footer-logo.on-dark {
  filter: brightness(0) invert(1);
}

/* ----- State-based section visibility (PDP guest vs logged-in) ----- */
body.is-guest [data-state="logged-in-only"] { display: none !important; }
body.is-logged-in [data-state="guest-only"] { display: none !important; }

/* In guest mode the PDP's lower section-tight has very little content (only Reviews
   + Instagram) and ends with a hard yellow guest-cta. Collapse the bottom padding
   so the yellow CTA flows directly into the footer with no white gap. */
body.is-guest section.section-tight { padding-bottom: 0; }

/* Yellow guest CTA should butt directly against the dark footer — kill the
   default footer margin-top in guest mode. */
body.is-guest .footer { margin-top: 0; }

/* ----- Guest CTA — full-width pre-footer conversion block ----- */
.guest-cta {
  background: var(--c-yellow);
  color: var(--c-black);
  padding: var(--s-20) 0;
  text-align: center;
}
.guest-cta .eyebrow {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  margin-bottom: var(--s-4);
}
.guest-cta h2 {
  font-family: var(--font-title);
  font-size: var(--text-3xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--s-5);
  max-width: 880px;
  margin-left: auto; margin-right: auto;
}
.guest-cta .lead {
  font-size: var(--text-lg);
  line-height: var(--lh-normal);
  max-width: 720px;
  margin: 0 auto var(--s-8);
}
.guest-cta .cta-row {
  display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap;
  margin-bottom: var(--s-6);
}
.guest-cta .marketplace-line {
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
}
.guest-cta .marketplace-line a {
  color: var(--c-black);
  text-decoration: underline;
}

/* ----- About this flavor — full-bleed flavor-color hero with illustration ----- */
.about-flavor {
  background: var(--c-flavor);
  padding: var(--s-16) 0;
  /* Text color picks itself via JS that toggles --c-text-on-flavor */
  color: var(--c-text-on-flavor, var(--c-black));
}
/* No grid — illustration floats into the text and text wraps around it (magazine layout) */
.about-flavor .eyebrow {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  opacity: 0.7;
  margin-bottom: var(--s-3);
}
.about-flavor .flavor-name {
  font-family: var(--font-title);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--s-5);
  letter-spacing: -0.02em;
}
.about-flavor .description {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  margin: 0;
}

/* Floated illustration — wraps with the text. Uses shape-outside for organic flow. */
.about-flavor .about-illustration {
  float: right;
  width: 50%;
  max-width: 440px;
  margin: 0 0 var(--s-4) var(--s-8);
  shape-outside: circle(50% at 50% 50%);
  shape-margin: var(--s-3);
  filter:
    drop-shadow(0 16px 28px rgba(0, 0, 0, 0.22))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}
@media (max-width: 700px) {
  .about-flavor .about-illustration {
    float: none;
    margin: 0 auto var(--s-5);
    max-width: 300px;
    display: block;
    shape-outside: none;
  }
}
/* Clear the float at the end of the description so it contributes to the section height */
.about-flavor .description::after {
  content: '';
  display: block;
  clear: both;
}
/* Flavor specimen — a "stage" treatment, no card frame.
   The illustration is the hero. A soft halo gives it lift; a small Buttermints
   leaf-mark stamp + script flavor caption add intentional brand polish without
   competing with the artwork. Each flavor's illustration carries its own
   personality, so the framing intentionally restrains itself. */
.about-flavor .specimen {
  position: relative;
  text-align: center;
  padding: var(--s-6) var(--s-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  margin: 0 auto;
  max-width: 480px;
}
/* Soft luminous halo behind the illustration — gives the artwork a subtle "stage"
   without a hard card outline. Tinted to whichever side is more readable. */
.about-flavor .specimen::before {
  content: '';
  position: absolute;
  inset: 8% -2% 18%;
  background: radial-gradient(
    ellipse at 50% 45%,
    var(--c-text-on-flavor, #fff) 0%,
    transparent 65%
  );
  opacity: 0.32;
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}
.about-flavor .specimen-illustration {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 16px 28px rgba(0, 0, 0, 0.22))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}
@media (max-width: 800px) {
  .about-flavor .specimen { max-width: 360px; }
  .about-flavor .specimen-illustration { max-width: 320px; }
}
/* Caption below the illustration — leaf mark + flavor name in script + small stamp */
.about-flavor .specimen-caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  color: var(--c-text-on-flavor, var(--c-black));
}
.about-flavor .specimen-mark {
  width: 28px; height: 28px;
  opacity: 0.55;
  display: block;
}
/* On dark flavor backgrounds (white text), invert the leaf-mark to white. */
.about-flavor:has([style*="color: rgb(255, 255, 255)"]) .specimen-mark,
body[data-text-on-flavor="white"] .about-flavor .specimen-mark {
  filter: brightness(0) invert(1);
}
.about-flavor .specimen-name {
  font-family: var(--font-script);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
/* Below caption: a small typeset stamp with flavor № and Pantone — restrained, intentional */
.about-flavor .specimen-stamp {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.about-flavor .specimen-stamp .dot {
  width: 4px; height: 4px;
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
}

/* ----- Reviews block — "Shop Talk", dark + typography-led, distinct from IG below ----- */
.reviews-block {
  background: var(--c-ink-900);
  color: var(--c-white);
  padding: var(--s-20) 0;
  margin: 0;
}
.reviews-block .reviews-header {
  text-align: center;
  margin-bottom: var(--s-12);
}
.reviews-block .reviews-stars {
  color: var(--c-white);
  font-size: var(--text-2xl);
  letter-spacing: 0.15em;
  margin-bottom: var(--s-3);
}
.reviews-block .reviews-title {
  font-family: var(--font-title);
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--s-3);
  line-height: var(--lh-tight);
}
.reviews-block .reviews-meta {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-subtitle);
}
.reviews-featured {
  position: relative;
  max-width: 820px;
  margin: 0 auto var(--s-12);
  padding: var(--s-10) var(--s-8);
  background: var(--c-ink-700);
  border-left: 6px solid var(--c-flavor);
  font-family: var(--font-body);
}
.reviews-featured .quote-mark {
  position: absolute;
  top: -32px; left: var(--s-6);
  font-family: var(--font-script);
  font-size: 8rem;
  color: var(--c-flavor);
  line-height: 1;
}
.reviews-featured p {
  font-size: var(--text-2xl);
  line-height: var(--lh-snug);
  margin: 0 0 var(--s-6) 0;
  font-weight: var(--fw-regular);
}
.reviews-featured footer {
  display: flex; flex-direction: column; gap: var(--s-1);
  font-style: normal;
}
.reviews-featured .reviewer-name {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
}
.reviews-featured .reviewer-meta {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
}
.reviews-featured .reviewer-source {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--c-white);
  margin-top: var(--s-2);
  font-weight: var(--fw-bold);
}
.reviews-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5);
  max-width: 820px; margin: 0 auto;
}
@media (max-width: 640px) { .reviews-grid { grid-template-columns: 1fr; } }
.reviews-card {
  padding: var(--s-6);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
}
.reviews-card .reviews-stars { font-size: var(--text-base); margin-bottom: var(--s-3); }
.reviews-card p {
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  margin-bottom: var(--s-4);
}
.reviews-card .reviewer-name {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  display: block;
}
.reviews-card .reviewer-meta {
  color: rgba(255,255,255,0.55);
  font-size: var(--text-xs);
}

/* ----- Sticky add-to-cart bar (logged-in PDP only). Slides up from bottom when the
   static buyer block in the hero goes off-screen. Hides again when it returns. */
.sticky-cart {
  position: fixed;
  left: 0; right: 0;
  bottom: -160px; /* hide below viewport */
  background: var(--c-white);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  padding: var(--s-4) 0;
  opacity: 0;
  transition: bottom var(--t-slow) var(--easing), opacity var(--t-base) var(--easing);
  z-index: 100;
  pointer-events: none;
}
.sticky-cart.visible {
  bottom: 0;
  opacity: 1;
  pointer-events: auto;
}
.sticky-cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--s-6);
}
.sticky-cart-product {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
  flex: 1;
}
.sticky-thumb {
  width: 48px; height: 48px;
  background: var(--c-flavor-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sticky-thumb img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.sticky-text { min-width: 0; }
.sticky-name {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-meta {
  font-size: var(--text-xs);
  color: var(--c-ink-500);
  margin-top: 2px;
}
.sticky-meta strong { color: var(--c-black); font-weight: var(--fw-bold); }

/* Compact tier-progress component for the sticky bar (desktop only) */
.sticky-tier-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  max-width: 260px;
  flex-shrink: 0;
  padding: 0 var(--s-4);
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  align-self: stretch;
  justify-content: center;
}
.sticky-tier-progress .label {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--c-ink-500);
  display: flex; justify-content: space-between; gap: var(--s-2);
}
.sticky-tier-progress .label strong { color: var(--c-black); }
.sticky-tier-progress .track {
  height: 5px;
  background: var(--c-ink-300);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.sticky-tier-progress .fill {
  height: 100%;
  background: var(--c-flavor);
  transition: width var(--t-slow) var(--easing);
}
.sticky-tier-progress .next {
  font-size: 10px;
  color: var(--c-ink-500);
  line-height: 1.2;
}
@media (max-width: 900px) {
  .sticky-tier-progress { display: none; }
}
.sticky-tier-pill {
  display: inline-block;
  padding: 2px 8px;
  margin-left: var(--s-2);
  background: var(--c-flavor);
  color: var(--c-text-on-flavor, var(--c-black));
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  vertical-align: 1px;
}

/* Sticky pack-size toggle (half-case / case) */
.sticky-pack {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  height: 40px;
  overflow: hidden;
}
.sticky-pack-btn {
  appearance: none;
  background: var(--c-white);
  border: none;
  padding: 0 var(--s-3);
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  color: var(--c-ink-500);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.sticky-pack-btn + .sticky-pack-btn { border-left: 1px solid var(--c-border); }
.sticky-pack-btn:hover { color: var(--c-black); }
.sticky-pack-btn.active {
  background: var(--c-black);
  color: var(--c-white);
}
.sticky-cart-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
}
.qty.qty-sm {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  height: 40px;
}
.qty.qty-sm button {
  width: 36px; height: 100%;
  background: none; border: none; cursor: pointer;
  font-size: var(--text-base);
  color: var(--c-ink-700);
}
.qty.qty-sm input {
  width: 40px; text-align: center; border: none;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  background: none;
}
.qty.qty-sm input:focus { outline: none; }

@media (max-width: 700px) {
  .sticky-cart-inner { padding: 0 var(--s-4); gap: var(--s-3); }
  .sticky-meta { display: none; }
  .sticky-cart-actions .qty.qty-sm { display: none; }
  .sticky-thumb { width: 40px; height: 40px; }
}

/* ----- Collapsible container summary (used for product-facts, buyer-info, media sections) ----- */
.container-collapse > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--c-ink-500);
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  outline: none;
}
.container-collapse > summary::-webkit-details-marker { display: none; }
.container-collapse > summary::marker { display: none; content: ''; }
.container-collapse > summary:hover { color: var(--c-black); }
.container-collapse > summary:focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: 4px;
  border-radius: var(--r-sm);
}
/* Chevron — sits at the right of the summary */
.container-collapse > summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-base) var(--easing);
  margin-left: var(--s-3);
  flex-shrink: 0;
}
.container-collapse[open] > summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
/* When collapsed, give the summary the same eyebrow margin we'd had with <p>; expanded gets default */
.container-collapse > summary { margin-bottom: var(--s-3); }
.container-collapse:not([open]) > summary { margin-bottom: 0; }

/* ----- Product details outer container (matches buyer-info-block + media-section pattern) ----- */
.product-facts-block {
  background: var(--c-surface-100);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-8) var(--s-6);
  margin-top: var(--s-10);
  position: relative;
}
.product-facts-block::before {
  content: '';
  position: absolute;
  top: 0; left: var(--s-6); right: var(--s-6);
  height: 3px;
  background: var(--c-flavor);
  border-radius: 0 0 4px 4px;
}
@media (max-width: 700px) {
  .product-facts-block { padding: var(--s-6) var(--s-4); }
}

/* ----- Product facts (Ingredients / Nutrition / Shelf+Storage) — 2-column layout, no twirl ----- */
.product-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-10);
  padding: 0;
  margin: 0;
}
@media (max-width: 700px) {
  .product-facts { grid-template-columns: 1fr; gap: var(--s-6); }
}
.product-facts-col {
  min-width: 0;
}
.product-facts-h {
  font-family: var(--font-title);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  margin: 0 0 var(--s-3) 0;
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--c-black);
  display: inline-block;
}

/* ----- Buyer info block (wraps the buyer-PDP tabs to visually separate from product facts) ----- */
.buyer-info-block {
  background: var(--c-surface-100);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-8) var(--s-6) var(--s-10);
  margin-top: var(--s-10);
  position: relative;
}
.buyer-info-block::before {
  /* Flavor-color accent at the top edge — signals this is a different "zone" */
  content: '';
  position: absolute;
  top: 0; left: var(--s-6); right: var(--s-6);
  height: 3px;
  background: var(--c-flavor);
  border-radius: 0 0 4px 4px;
}
.buyer-info-block .buyer-info-eyebrow {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--c-ink-500);
  margin: 0 0 var(--s-3) 0;
}
@media (max-width: 700px) {
  .buyer-info-block { padding: var(--s-6) var(--s-4) var(--s-8); }
}

/* ----- Marketing media section — buyer asset download library ----- */
.media-section {
  margin-top: var(--s-6);
  padding: var(--s-8) var(--s-6) var(--s-10);
  background: var(--c-surface-100);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  position: relative;
}
.media-section::before {
  content: '';
  position: absolute;
  top: 0; left: var(--s-6); right: var(--s-6);
  height: 3px;
  background: var(--c-flavor);
  border-radius: 0 0 4px 4px;
}
.media-section h2.media-title {
  font-family: var(--font-title);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--s-2) 0;
}
.media-section .media-lead {
  color: var(--c-ink-700);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  max-width: 640px;
  margin: 0 0 var(--s-8) 0;
}
/* Media table — list-style download library (replaces former grid of cards) */
.media-table {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.media-row {
  display: grid;
  grid-template-columns: 1.6fr 2.4fr 110px 130px;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.media-row:last-child { border-bottom: none; }
.media-row:not(.media-row-head):hover {
  background: var(--c-flavor-soft);
  text-decoration: none;
}
.media-row.placeholder {
  opacity: 0.55;
  pointer-events: none;
}
.media-row-head {
  background: var(--c-surface-200);
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-title);
  color: var(--c-ink-500);
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}
.media-row-head:hover { background: var(--c-surface-200); }
.media-row-name {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}
.media-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 22px;
  padding: 0 6px;
  background: var(--c-black);
  color: var(--c-white);
  border-radius: var(--r-sm);
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  flex-shrink: 0;
}
.media-row-desc {
  font-size: var(--text-sm);
  color: var(--c-ink-700);
  line-height: var(--lh-normal);
}
.media-row-size {
  font-family: var(--font-mono, ui-monospace, "SF Mono", monospace);
  font-size: var(--text-sm);
  color: var(--c-ink-500);
}
.media-row-action {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  text-align: right;
  color: var(--c-black);
}
.media-row.placeholder .media-row-action { color: var(--c-ink-500); }

@media (max-width: 700px) {
  .media-row {
    grid-template-columns: 1fr auto;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
  }
  .media-row-head { display: none; }
  .media-row-desc { grid-column: 1 / -1; font-size: var(--text-xs); }
  .media-row-size { grid-column: 1 / -1; font-size: var(--text-xs); }
}

.media-footnote {
  margin-top: var(--s-6);
  font-size: var(--text-sm);
  color: var(--c-ink-500);
}
.media-footnote a { color: var(--c-black); font-weight: var(--fw-bold); }

/* ----- Tabbed component (used on buyer PDP for buyer/trade info sections) ----- */
.tabs {
  margin-top: var(--s-10);
  border-bottom: 1px solid var(--c-border);
}
.tab-list {
  display: flex;
  gap: var(--s-1);
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}
.tab-button {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: var(--s-3) var(--s-5);
  font-family: var(--font-title);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  color: var(--c-ink-500);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--t-base) var(--easing), border-color var(--t-base) var(--easing);
}
.tab-button:hover { color: var(--c-ink-900); }
.tab-button.active {
  color: var(--c-black);
  border-bottom-color: var(--c-black);
}
.tab-panels { padding-top: var(--s-6); }
/* Mobile: simple show/hide so each panel only takes its own height */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Desktop: stack all panels in one grid cell so the container is sized to the
   tallest panel. Switching tabs no longer changes the page height — the footer
   stays put. Inactive panels are visibility-hidden (still occupying space). */
@media (min-width: 700px) {
  .tab-panels {
    display: grid;
    grid-template-areas: "stack";
  }
  .tab-panel {
    grid-area: stack;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--easing);
  }
  .tab-panel.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}
.tab-panel h3 {
  font-family: var(--font-title);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  margin: var(--s-6) 0 var(--s-3);
}
.tab-panel h3:first-child { margin-top: 0; }

/* SKU table (in Pack & SKUs tab) */
.sku-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.sku-table th, .sku-table td {
  padding: var(--s-3) var(--s-2);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: middle;
}
.sku-table th {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-subtitle);
  text-transform: uppercase;
  color: var(--c-ink-500);
}
.sku-table .sku-cell, .sku-table .upc-cell {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace);
  font-size: var(--text-sm);
  color: var(--c-black);
}
.sku-table .upc-cell { color: var(--c-ink-700); }
.sku-table tr.muted td { color: var(--c-ink-500); font-style: italic; }

/* ----- Always-visible info block (used on guest PDP for Reviews + Instagram) ----- */
.info-block {
  margin: var(--s-12) 0;
}
.info-block .block-title {
  font-family: var(--font-title);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--s-5);
}
.review-quote {
  border-left: 3px solid var(--c-flavor);
  padding: var(--s-3) 0 var(--s-3) var(--s-5);
  margin-bottom: var(--s-5);
}
.ig-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}
.ig-tile {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl);
  border: 1px solid var(--c-border);
}
@media (max-width: 640px) {
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Channel card (Multiple Ways to Buy section — consistent layout across all 3) ----- */
.channel-grid {
  align-items: stretch;
  grid-auto-rows: 1fr; /* force equal-height rows so all 3 cards match */
}
.channel-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.channel-card:hover {
  border-color: var(--c-black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.channel-card.recommended {
  border-color: var(--c-black);
  border-width: 2px;
  padding: calc(var(--s-6) - 1px); /* keep inner space identical despite thicker border */
}
.channel-pill { margin: 0; min-height: 28px; }
.channel-title {
  font-family: var(--font-title);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  margin: 0;
  line-height: var(--lh-snug);
  min-height: 3.4em; /* consistent height across cards (2 lines) */
  display: flex;
  align-items: flex-start;
}
.channel-desc {
  color: var(--c-ink-700);
  margin: 0;
  flex: 1; /* push the CTA to the bottom regardless of description length */
}
.channel-cta {
  width: 100%;
  margin-top: auto; /* sticks button to bottom */
}
@media (max-width: 700px) {
  .channel-title { min-height: 0; }
}

/* ----- Pillar card (badge + title + text, used on home brand pillars section) ----- */
.pillar-card {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-5);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.pillar-card.pillar-dark {
  background: var(--c-black);
  border-color: var(--c-black);
  color: var(--c-white);
}
.pillar-card.pillar-dark .pillar-text {
  color: rgba(255, 255, 255, 0.75);
}
.pillar-badge {
  width: 96px; height: 96px;
  object-fit: contain;
  margin-bottom: var(--s-4);
}
.pillar-title {
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-lg);
  display: block;
  margin-bottom: var(--s-2);
}
.pillar-text {
  color: var(--c-ink-700);
  font-size: var(--text-sm);
  margin: 0;
}

/* Top row: 3 columns, equal width */
.pillar-grid-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
/* Bottom row: 4 columns, smaller individual cards but combined to same total width as top */
.pillar-grid-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
@media (max-width: 900px) {
  .pillar-grid-top { grid-template-columns: 1fr; }
  .pillar-grid-bottom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .pillar-grid-bottom { grid-template-columns: 1fr; }
}

/* Compact variant for the bottom 4 */
.pillar-card-sm {
  padding: var(--s-5) var(--s-4);
}
.pillar-badge-sm {
  width: 64px; height: 64px;
  margin-bottom: var(--s-3);
}
.pillar-title-sm {
  font-size: var(--text-base);
}
.pillar-text-sm {
  font-size: var(--text-xs);
  line-height: var(--lh-snug);
}

/* ----- Step number circles (How wholesale works section) ----- */
.step-number {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: var(--c-black);
  color: var(--c-white);
  border-radius: var(--r-pill);
  margin-bottom: var(--s-4);
  font-family: var(--font-title);
  font-weight: var(--fw-bold);
  font-size: var(--text-xl);
}

/* ----- Brand pillar badges (real circular stamps from BSG) ----- */
.brand-badges {
  display: flex; flex-wrap: wrap;
  gap: var(--s-5);
  align-items: center; justify-content: center;
  padding: var(--s-6) 0;
}
.brand-badges img {
  height: 88px; width: 88px;
  object-fit: contain;
}
.brand-badges-sm img {
  height: 56px; width: 56px;
}
.brand-badges-section {
  background: var(--c-surface-100);
  padding: var(--s-10) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.brand-badges-section .label {
  text-align: center;
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--c-ink-500);
  margin-bottom: var(--s-4);
}

/* ----- Pouch placeholder visual (PDP/cards before real photos) ----- */
.pouch {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, var(--c-kraft-light) 0%, var(--c-kraft-light) 55%, var(--c-flavor) 55%, var(--c-flavor) 100%);
}
.pouch-script {
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
}
.pouch-flavor {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  white-space: nowrap;
}
.pouch-flavor::before { content: '— '; }
.pouch-flavor::after { content: ' —'; }
.pouch-tag {
  position: absolute; top: var(--s-3); left: var(--s-3);
  background: var(--c-flavor); padding: var(--s-1) var(--s-2);
  font-size: 10px; font-weight: var(--fw-bold); letter-spacing: 0.1em; text-transform: uppercase;
}
