/* ==========================================================================
   NAD+ The One — product components
   Purchase options, trust row, science blocks, decline chart, sticky bar.
   Uses the tokens defined in site.css.
   ========================================================================== */

/* ---------- Price + rating row ---------- */

.product__price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-block: 1rem 1.5rem;
}
.product__price { font-family: var(--font-display); font-size: 2.25rem; font-weight: 300; line-height: 1; }
.product__rating { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }

/* ---------- Gallery dots (mobile) ---------- */

.gallery__dots { display: none; justify-content: center; gap: 0.6rem; margin-top: 1rem; }
.gallery__dots button {
  width: 7px; height: 7px; padding: 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--foreground) 25%, transparent);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.gallery__dots button[aria-current="true"] { background: var(--foreground); transform: scale(1.3); }

/* ---------- Purchase options ---------- */

.purchase { margin-top: 2.25rem; display: grid; gap: 0.75rem; }
.purchase__option {
  display: block;
  width: 100%;
  padding: 1.25rem 1.35rem;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.purchase__option:hover { border-color: color-mix(in oklab, var(--foreground) 45%, transparent); }
.purchase__option[aria-checked="true"] { border-color: var(--foreground); background: color-mix(in oklab, var(--secondary) 35%, var(--card)); }

.purchase__head { display: grid; grid-template-columns: 1.15rem 1fr auto; align-items: center; gap: 0.9rem; }
.purchase__dot { width: 1.15rem; height: 1.15rem; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--foreground) 45%, transparent); display: grid; place-items: center; }
.purchase__option[aria-checked="true"] .purchase__dot::after { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 999px; background: var(--foreground); }
.purchase__name { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; font-size: 0.9375rem; }
.purchase__price { font-size: 1rem; white-space: nowrap; }

.purchase__badge {
  display: inline-block;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--foreground);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.purchase__body { display: none; padding-left: 2.05rem; margin-top: 0.8rem; }
.purchase__option[aria-checked="true"] .purchase__body { display: block; }
.purchase__freq { font-size: 0.8125rem; color: var(--muted-foreground); }

.purchase__benefits { margin-top: 0.85rem; display: grid; gap: 0.55rem; }
.purchase__benefits li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.8125rem; color: var(--muted-foreground); line-height: 1.5; }
.purchase__benefits svg { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 0.3rem; fill: none; stroke: var(--primary); stroke-width: 2.5; }
.purchase__benefits strong { color: var(--foreground); font-weight: 400; }

/* ---------- Trust row ---------- */

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.25rem;
  padding-block: 1.75rem;
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  text-align: center;
}
.trust__icon {
  width: 2.5rem; height: 2.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--secondary) 55%, transparent);
  display: grid; place-items: center;
}
.trust__icon svg { width: 15px; height: 15px; fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trust h4 { font-size: 0.75rem; font-weight: 400; margin-bottom: 0.25rem; }
.trust p { font-size: 0.6875rem; color: var(--muted-foreground); line-height: 1.45; }

/* ---------- Centred icon cards (the science) ---------- */

.card--center { text-align: center; align-items: center; gap: 0.75rem; padding-block: 2.25rem; }
.card__icon {
  width: 3rem; height: 3rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--secondary) 45%, transparent);
  display: grid; place-items: center;
  margin-bottom: 0.35rem;
}
.card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card--center h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 300; }
.card--center p { flex: none; }

/* ---------- Decline stat + chart ---------- */

.decline { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .decline { grid-template-columns: 0.8fr 1.2fr; } }

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--primary);
}
.stat__label { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.5rem; }

.chart {
  position: relative;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
}
.chart__title { font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 1rem; }
.chart svg { width: 100%; height: auto; overflow: visible; display: block; }
.chart__grid { stroke: color-mix(in oklab, var(--border) 70%, transparent); stroke-width: 1; }
.chart__axis-text { font-family: var(--font-sans); font-size: 11px; fill: var(--muted-foreground); }
.chart__value-text { font-family: var(--font-sans); font-size: 11px; fill: var(--muted-foreground); }
.chart__line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart__dot { fill: var(--primary); stroke: var(--card); stroke-width: 2; transition: r 0.15s ease; }
.chart__hit { fill: transparent; cursor: pointer; }
.chart__source { margin-top: 1rem; font-size: 0.6875rem; color: var(--muted-foreground); font-style: italic; }
.chart__source strong { font-style: normal; font-weight: 400; color: var(--foreground); }

.chart__tip {
  position: absolute;
  transform: translate(-50%, -130%);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.chart__tip.is-visible { opacity: 1; }

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

/* ---------- Media rows (benefit strips) ---------- */

.media-rows { display: grid; gap: 1.25rem; margin-top: clamp(2rem, 4vw, 3rem); }
.media-row {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 640px) { .media-row { grid-template-columns: 15rem 1fr; } }
.media-row img { width: 100%; height: 100%; min-height: 11rem; object-fit: cover; }
.media-row__body { padding: 1.75rem; display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.media-row__body h3 { font-size: 1.0625rem; font-weight: 400; }
.media-row__body p { font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground); }

/* ---------- Permanent buy bar ---------- */

.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  background: color-mix(in oklab, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
/* The bar is always on, so reserve room for it at the foot of the page. */
body.has-buybar { padding-bottom: 4.75rem; }
.sticky-bar__name { font-size: 0.875rem; }
.sticky-bar__price { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.1rem; }
.sticky-bar__btn {
  flex: 0 0 auto;
  width: 2.85rem; height: 2.85rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: grid; place-items: center;
  transition: background-color 0.2s ease;
}
.sticky-bar__btn:hover { background: color-mix(in oklab, var(--primary) 88%, #000); }
.sticky-bar__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pill link ---------- */

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid color-mix(in oklab, var(--border) 90%, transparent);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.8125rem;
  transition: border-color 0.2s ease;
}
.pill-link:hover { border-color: var(--foreground); }
.pill-link .pill-link__plus { font-size: 1rem; line-height: 1; color: var(--muted-foreground); }

/* ---------- Comparison table ---------- */

.compare { margin-top: clamp(2rem, 4vw, 3rem); overflow-x: auto; }
.compare table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-radius: var(--radius);
}
.compare th, .compare td {
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 300;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 45%, transparent);
}
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 400;
}
.compare tbody th { text-align: left; color: var(--muted-foreground); font-weight: 300; }

/* The product's own column carries a tint and heavier ink. */
.compare .is-ours { background: color-mix(in oklab, var(--secondary) 32%, transparent); }
.compare thead .is-ours { color: var(--foreground); }
.compare tbody td.is-ours { font-weight: 400; color: var(--foreground); }

.compare__yes, .compare__no { display: inline-block; width: 1rem; height: 1rem; }
.compare__yes svg { width: 100%; height: 100%; fill: none; stroke: var(--primary); stroke-width: 2.5; }
.compare__no svg { width: 100%; height: 100%; fill: none; stroke: color-mix(in oklab, var(--muted-foreground) 60%, transparent); stroke-width: 2; }

/* ---------- Timeline ---------- */

.timeline { margin-top: clamp(2rem, 4vw, 3rem); max-width: 44rem; }
.timeline__item { position: relative; padding: 0 0 2.25rem 2.25rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: 0.34rem; top: 1.4rem; bottom: 0;
  width: 1px;
  background: color-mix(in oklab, var(--border) 85%, transparent);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }

.timeline__marker {
  position: absolute;
  left: 0; top: 0.3rem;
  width: 0.75rem; height: 0.75rem;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: var(--background);
}
.timeline__marker::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: var(--primary);
}
.timeline__title { font-size: 1.125rem; font-weight: 400; margin-bottom: 0.6rem; }
.timeline__body { font-size: 0.9375rem; line-height: 1.75; color: var(--muted-foreground); }
.timeline__body strong { color: var(--foreground); font-weight: 400; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .trust { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; }
  .trust > div { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.9rem; align-items: center; }
  .trust__icon { margin: 0; }
  .gallery__dots { display: flex; }
  .gallery__thumbs { display: none; }
  .chart { padding: 1.25rem 1rem 1rem; }
  .product__price-row { margin-block: 0.75rem 1.25rem; }
}
