/* ═══════════════════ SINGLE PRODUCT — SECTION-SPECIFIC STYLES ═══════════════════
   Companion to js/product-sections.js + single-product.php.
   Enqueued only on is_product() (functions.php), after custom.css.

   Also carries the pieces no other stylesheet on this template has:
   .section-title/.section-sub/.eyebrow, .reveal, .stars and
   .reviews/.review-card. The .sup-card family (Complete your stack) is
   shared with Supplements and lives in custom.css; the cart drawer is in
   css/cart-drawer.css. */

/* ───────────── Shared typography / reveal ───────────── */
.section-title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 3.8vw, 54px); line-height: 1.06;
  letter-spacing: -0.02em; color: var(--ink); margin: 0; text-wrap: balance;
}
.section-sub {
  font-family: var(--sans); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; color: var(--ink-soft);
  margin: 16px 0 0; text-wrap: pretty;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Star rating — scoped to span.stars so it never touches WooCommerce's own
   p.stars (the review form's star picker). */
span.stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; letter-spacing: 1.5px; color: #cfcabf; }
span.stars::before { content: "\2605\2605\2605\2605\2605"; }
span.stars .stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--ink); }
span.stars .stars__fill::before { content: "\2605\2605\2605\2605\2605"; }

/* ═══════════════════ BREADCRUMB ═══════════════════ */
.crumb {
  width: min(1240px, 92vw); margin: 0 auto;
  padding: clamp(122px, 15vh, 158px) 0 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft);
}
.crumb a { color: var(--ink-soft); text-decoration: none; transition: color 0.18s ease; }
.crumb a:hover { color: var(--accent); }
.crumb span[aria-hidden] { color: var(--ink-faint); }
.crumb__current { color: var(--ink); font-weight: 500; }

/* WooCommerce notices. Add to Bag now opens the cart drawer, so these only
   show for errors (e.g. out of stock), or for the no-JS fallback form post. */
.pd-notices { width: min(1240px, 92vw); margin: 18px auto 0; }
.pd-notices:empty { display: none; }

/* ═══════════════════ SECTION 1 — PRODUCT DETAIL ═══════════════════ */
.pd { background: var(--bg); padding: clamp(28px, 4vh, 44px) 0 clamp(64px, 9vh, 108px); }
.pd__inner {
  width: min(1240px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.98fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 84px); align-items: start;
}

/* ── media column ── */
.pd__media { position: sticky; top: clamp(110px, 14vh, 150px); }
.pd__main {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; background: #f4f2ed;
  margin-bottom: 14px; overflow: hidden;
}
.pd__main img { width: 100%; height: 100%; object-fit: contain; padding: 10%; box-sizing: border-box; transition: opacity 0.2s ease; }
/*
 * Thumbs are buttons (click to swap the main image). The featured image is
 * the first thumb, so 4 columns.
 */
.pd__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pd__thumb {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; background: #f4f2ed; overflow: hidden;
  padding: 0; border: 1.5px solid transparent; cursor: pointer; transition: border-color 0.18s ease;
}
.pd__thumb:hover { border-color: var(--line); }
.pd__thumb.is-active { border-color: var(--accent); }
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── info column ── */
/* Badges: manual product_tag (yellow) + Sale (accent orange, same colours as
   .sup-card__tag--sale in custom.css). Both can show, side by side. */
.pd__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pd__tag {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  color: #6f5410; background: #f6e6a4;
}
.pd__tag--sale { color: #fff; background: var(--accent); }
.pd__name {
  font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 3vw, 42px);
  line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 12px; text-wrap: balance;
}
.pd__rating { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.pd__rating span.stars { font-size: 15px; }
.pd__rating a { font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.pd__rating a:hover { color: var(--accent); }
/* Format strip: Capsule · 2 daily · 60 per bottle · 30-day supply */
.pd__spec { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd__spec li {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
}
.pd__spec li b { font-weight: 600; color: var(--ink); }

/*
 * .pd__desc is a wrapper <div> (the description can hold more than one
 * paragraph), so the paragraph typography sits on its children.
 */
.pd__desc { margin: 0 0 26px; }
.pd__desc p {
  font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink-soft);
  margin: 0 0 0.8em; text-wrap: pretty;
}
.pd__desc p:last-child { margin-bottom: 0; }

/* purchase-option cards: one-time + Bundle of 3 */
.pd__options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.pd__option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left; cursor: pointer; color: var(--ink);
  padding: 15px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff;
  font-family: var(--sans); transition: border-color 0.18s ease, background 0.18s ease;
}
.pd__option:hover { border-color: rgba(239, 108, 35, 0.5); }
.pd__option.is-active { border-color: var(--accent); background: rgba(239, 108, 35, 0.05); }
.pd__option-left { display: flex; align-items: center; gap: 13px; }
.pd__option-dot {
  flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-faint);
  display: flex; align-items: center; justify-content: center; transition: border-color 0.18s ease;
}
.pd__option-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 0.18s ease; }
.pd__option-save {
  flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: #3fa45f;
  background: rgba(63, 164, 95, 0.12); padding: 4px 9px; border-radius: 999px; margin-left: 8px;
}
.pd__option.is-active .pd__option-dot { border-color: var(--accent); }
.pd__option.is-active .pd__option-dot::after { transform: scale(1); }
.pd__option-label { font-size: 15px; font-weight: 500; color: var(--ink); display: block; }
.pd__option-sub { font-size: 12.5px; color: var(--ink-soft); display: block; margin-top: 2px; }
.pd__option-price { flex: none; display: flex; align-items: baseline; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.pd__option-price del { font-size: 13px; font-weight: 500; color: var(--ink-faint); }

/* buy row */
.pd__buy { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.pd__qty {
  display: flex; align-items: center; flex: none;
  border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff;
}
.pd__qty button {
  width: 40px; height: 46px; border: 0; background: none; cursor: pointer; padding: 0;
  font-size: 17px; color: var(--ink); display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.pd__qty button:hover { background: #f4f2ed; }
.pd__qty input {
  width: 40px; height: 46px; padding: 0; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  border-radius: 0; background: #fff;
  text-align: center; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield;
}
.pd__qty input::-webkit-outer-spin-button, .pd__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd__add {
  flex: 1; font-family: var(--sans); font-size: 15.5px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 999px; height: 46px; padding: 0 20px; cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.pd__add:hover { background: #e2611c; transform: translateY(-1px); }
.pd__add:disabled { background: var(--ink-faint); cursor: not-allowed; transform: none; }
/* AJAX add in flight (product-sections.js) */
.pd__buy.is-adding .pd__add { opacity: 0.7; cursor: progress; transform: none; }
.pd__buy--wc { display: block; } /* non-simple products: WooCommerce's own form */

.pd__member-note { margin: 0 0 28px; }
.pd__member-note p { font-family: var(--sans); font-size: 13px; line-height: 1.55; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.pd__member-note a { color: var(--accent); font-weight: 500; }

/* trust chips */
.pd__trust { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.pd__trust-chip {
  display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft); padding: 8px 13px; border-radius: 999px; background: #f4f2ed;
}
.pd__trust-chip svg { width: 15px; height: 15px; flex: none; color: var(--accent); }

@media (max-width: 900px) {
  .pd__inner { grid-template-columns: 1fr; gap: 32px; }
  .pd__media { position: static; }
}

/* ═══════════════════ SECTION 2 — KEY BENEFITS + IDEAL FOR ═══════════════════ */
.why { background: #fff; padding: clamp(64px, 9vh, 108px) 0; }
.why__inner {
  width: min(1240px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start;
}
.why__inner--single { grid-template-columns: minmax(0, 860px); justify-content: center; }
.why__main .eyebrow { margin-bottom: 16px; }
.why__title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(28px, 3vw, 42px); line-height: 1.08;
  letter-spacing: -0.02em; color: var(--ink); margin: 0 0 clamp(24px, 3.4vh, 36px); text-wrap: balance;
}
.why__list {
  list-style: none; margin: 0; padding: 0; counter-reset: why;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3vw, 44px);
}
.why__list li {
  counter-increment: why; display: flex; gap: 14px; align-items: baseline;
  padding: 15px 0; border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: 15.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty;
}
.why__list li::before {
  content: counter(why, decimal-leading-zero); flex: none;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; color: var(--accent);
}
.fit {
  position: sticky; top: clamp(110px, 14vh, 150px);
  background: #f4f2ed; border-radius: 20px; padding: clamp(24px, 2.6vw, 34px);
}
.fit__title { font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 18px; }
.fit__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fit__list li { display: flex; align-items: flex-start; gap: 11px; font-family: var(--sans); font-size: 15px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.fit__list .tick {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: #3fa45f; color: #fff; display: flex; align-items: center; justify-content: center;
}
.fit__list .tick svg { width: 10px; height: 10px; display: block; }
@media (max-width: 900px) {
  .why__inner { grid-template-columns: 1fr; }
  .fit { position: static; }
}
@media (max-width: 600px) { .why__list { grid-template-columns: 1fr; } }

/* ═══════════════════ SECTION 3 — WHAT'S INSIDE ═══════════════════ */
.facts { background: #f4f2ed; padding: clamp(64px, 9vh, 108px) 0; }
.facts__inner {
  width: min(1240px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(36px, 5vw, 80px); align-items: start;
}
/* only one side filled in — label alone or copy alone */
.facts__inner--single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.facts__label {
  background: #fff; border: 2px solid var(--ink); border-radius: 4px; padding: 20px 22px 24px;
  font-family: var(--sans); color: var(--ink); max-width: 400px;
}
.facts__label h3 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; border-bottom: 8px solid var(--ink); padding-bottom: 8px;
}
.facts__serv { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--ink); }
.facts__servper { font-size: 13px; padding: 6px 0 8px; border-bottom: 4px solid var(--ink); }
.facts__cols { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; padding: 6px 0; border-bottom: 1px solid var(--ink); text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); }
.facts__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid rgba(12,12,13,0.16); }
.facts__row strong { font-weight: 600; }
.facts__row span:last-child { flex: none; color: var(--ink); font-size: 13.5px; font-weight: 500; }
/* the allergen <p> follows the rows, so :last-child never matches — last-of-type does */
.facts__row:last-of-type { border-bottom: 4px solid var(--ink); }
.facts__note { font-size: 10.5px; line-height: 1.5; color: var(--ink-soft); margin: 10px 0 0; }

.facts__copy { padding-top: 6px; }
.facts__copy .eyebrow { margin-bottom: 16px; }
.facts__copy h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 18px; text-wrap: balance; }
.facts__body p { font-family: var(--sans); font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 16px; max-width: 54ch; text-wrap: pretty; }
.facts__body p:last-child { margin-bottom: 0; }

/* "How to take it" (product_dosage) */
.dose {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 26px; max-width: 54ch;
  padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
}
.dose__icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(239, 108, 35, 0.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.dose__icon svg { width: 20px; height: 20px; }
.dose__label { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.dose__text { font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0; }

/* regulatory small print (Product Page Settings → pps_legal_note) */
.pd__legal { font-family: var(--sans); font-size: 12px; line-height: 1.55; color: var(--ink-faint); margin: 22px 0 0; max-width: 60ch; }

@media (max-width: 860px) {
  .facts__inner { grid-template-columns: 1fr; }
  .facts__label { max-width: none; }
}

/* ═══════════════════ SECTION 4 — GOOD TO KNOW ═══════════════════
   Also carries .faqs-section (so custom.js's accordion + FAQ reveal drive
   it); these two rules set this section's own background/padding over
   custom.css's .faqs-section defaults. */
.pd-good.faqs-section { background: var(--bg); padding: clamp(64px, 9vh, 108px) 0; }
.pd-good__inner { width: min(860px, 92vw); margin: 0 auto; }
.pd-good__head { text-align: center; margin-bottom: clamp(38px, 5.5vh, 60px); }
.faq-item__a-inner p { font-size: inherit; line-height: inherit; color: inherit; margin: 0 0 0.8em; }
.faq-item__a-inner p:last-child { margin-bottom: 0; }

/* ═══════════════════ SECTION 6 — REVIEWS ═══════════════════ */
.reviews { background: var(--bg); padding: clamp(64px, 9vh, 120px) 0; }
.reviews__inner { width: min(1240px, 92vw); margin: 0 auto; }
.reviews__head { text-align: center; margin: 0 auto clamp(40px, 5.5vh, 64px); }
.reviews__agg { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.reviews__agg span.stars { font-size: 15px; }
.reviews__agg b { color: var(--ink); font-weight: 700; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card { display: flex; flex-direction: column; gap: 14px; background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 2.4vw, 32px); box-shadow: 0 26px 60px -48px rgba(12,12,13,0.3); }
.review-card__quote { font-family: var(--sans); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.62; color: var(--ink); margin: 0; text-wrap: pretty; }
.review-card__who { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.review-card__name { font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink); }
.review-card__meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/*
 * "Write a review": a plain ghost button that opens WordPress's comment
 * form with WooCommerce's rating picker.
 */
.reviews__write { max-width: 640px; margin: clamp(36px, 5vh, 56px) auto 0; text-align: center; }
.reviews__write > summary { list-style: none; cursor: pointer; }
.reviews__write > summary::-webkit-details-marker { display: none; }
.reviews__write[open] > summary { margin-bottom: 26px; }
.reviews__form { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 3vw, 34px); }
.reviews__form .comment-respond { margin: 0; }
.reviews__form label { display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.reviews__form p { margin: 0 0 16px; }
.reviews__form input[type="text"],
.reviews__form input[type="email"],
.reviews__form textarea,
.reviews__form select {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
.reviews__form textarea { resize: vertical; min-height: 120px; }
.reviews__form .comment-form-rating { margin: 0 0 16px; }
.reviews__form p.stars a { color: var(--accent); }
.reviews__form .required { color: var(--accent); }
.reviews__form .form-submit { margin: 6px 0 0; }
.reviews__verify { font-family: var(--sans); font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ═══════════════════ SECTION 5 — COMPLETE YOUR STACK ═══════════════════ */
.bundle { background: #fff; padding: clamp(64px, 9vh, 108px) 0; }
.bundle__inner { width: min(1240px, 92vw); margin: 0 auto; }
.bundle__head { text-align: center; margin-bottom: clamp(38px, 5.5vh, 60px); }

/* .sup-grid / .sup-card: shared, in custom.css (also used by Supplements' Shop by Goal) */

/* ═══════════════════ STICKY BUY BAR ═══════════════════ */
/*
 * Rendered on wp_footer as a direct child of <body> (see single-product.php),
 * outside .site-container, so footer.css's `.site-container > div` rule
 * can't override position:fixed. z-index 90 is under the cart drawer
 * (100/101, css/cart-drawer.css).
 */
.pd-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90; margin: 0;
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  background: rgba(251, 250, 248, 0.92); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.pd-sticky.is-visible { transform: translateY(0); }
.pd-sticky__inner {
  width: min(1240px, 92vw); margin: 0 auto; padding: 12px 0;
  display: flex; align-items: center; gap: 16px;
}
.pd-sticky__media { width: 44px; height: 44px; border-radius: 10px; background: #f4f2ed; flex: none; overflow: hidden; }
.pd-sticky__media img { width: 100%; height: 100%; object-fit: contain; }
.pd-sticky__name { font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; }
.pd-sticky__price { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); flex: none; margin-left: auto; }
.pd-sticky__btn {
  flex: none; font-family: var(--sans); font-size: 14px; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer; white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}
.pd-sticky__btn:hover { background: #e2611c; transform: translateY(-1px); }
@media (max-width: 640px) { .pd-sticky__name { display: none; } }
