/* TOGOPEPTIDE — PDP Finesse (Cluster 03)
   Adds: best-value highlight, savings indicator, micro-tooltip, TOC sidebar
   + active highlight, FAQ expand-all, research signals pill row, trust strip,
   storage advice card, buy-button progressive disclosure, RUO disclaimer,
   compound-stack card, h1 entrance animation, wishlist heart.

   Touches only PDP. Light + dark mode supported via existing CSS tokens
   (--color-bg-elevated, --color-text, --color-text-muted, --color-border,
   --color-accent). Respects prefers-reduced-motion. */

/* ── 89: Best-value highlight on chip ── */
.variant-chip[data-best-value="true"]{
  outline:0;
  box-shadow:none;
}
.variant-chip[data-best-value="true"] .variant-chip__label{
  border-color:color-mix(in srgb, var(--color-accent, #e01b1b) 42%, var(--color-border, rgba(255,255,255,0.12))) !important;
  box-shadow:
    inset 2px 0 0 color-mix(in srgb, var(--color-accent, #e01b1b) 72%, transparent),
    0 1px 2px rgba(0,0,0,0.10) !important;
}
.variant-chip{position:relative}

/* ── 90: Savings indicator on non-best variants ── */
.variant-chip__save{
  display:block;font-size:11px;color:#22c55e;margin-top:4px;
  font-variant-numeric:tabular-nums;line-height:1.2;
}
[data-theme="light"] .variant-chip__save{color:#15803d}

/* ── 91: Hover micro-tooltip ── */
.variant-chip__tooltip{
  display:none;
  position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(2px);
  background:var(--color-bg-elevated, #161616);
  color:var(--color-text, #fff);
  border:1px solid var(--color-border, rgba(255,255,255,0.12));
  border-radius:8px;padding:8px 10px;
  font-size:12px;line-height:1.45;white-space:nowrap;
  box-shadow:0 8px 24px rgba(0,0,0,0.3);
  opacity:0;pointer-events:none;
  transition:opacity 160ms ease, transform 160ms ease;
  z-index:60;
}
.variant-chip__tooltip::after{
  content:"";position:absolute;top:100%;left:50%;transform:translateX(-50%);
  border:5px solid transparent;border-top-color:var(--color-bg-elevated, #161616);
}
.variant-chip:hover .variant-chip__tooltip,
.variant-chip:focus-within .variant-chip__tooltip{
  display:inline-flex;
  opacity:1;transform:translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .variant-chip__tooltip{transition:none}
}
@media (hover: none){
  .variant-chip__tooltip{display:none}
}

/* ── 102/103: Inline "Jump to" pill-bar + scroll-spy active state ──
   Replaces the previous floating sidebar (.pdp-toc-host) which sat
   at position:absolute right:20px on viewports 1100-1499px and
   overlapped main content. New design: compact horizontal bar in
   normal flow at the top of main, scrollable on narrow screens,
   never overlaps. */
.pdp-jumpbar{
  display:flex;align-items:center;gap:10px;
  margin:8px 0 24px;
  padding:8px 12px;
  background:var(--color-bg-elevated, #0f0f0f);
  border:1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius:999px;
  font-size:13px;line-height:1.2;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.pdp-jumpbar::-webkit-scrollbar{display:none}
.pdp-jumpbar__label{
  flex-shrink:0;
  font-size:11px;text-transform:uppercase;letter-spacing:0.08em;
  color:var(--color-text-muted, #a0a0a0);font-weight:600;
  padding-left:6px;
}
.pdp-jumpbar__list{
  list-style:none;padding:0;margin:0;
  display:flex;gap:4px;flex-wrap:nowrap;
}
.pdp-jumpbar__item{margin:0;flex-shrink:0}
.pdp-jumpbar__link{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;
  padding:6px 12px;
  border-radius:999px;
  color:var(--color-text-muted, #a0a0a0);text-decoration:none;
  white-space:nowrap;
  transition:color 140ms ease, background 140ms ease;
}
.pdp-jumpbar__link:hover{
  color:var(--color-text, #fff);
  background:rgba(255,255,255,0.05);
}
[data-theme="light"] .pdp-jumpbar__link:hover{background:rgba(0,0,0,0.05)}
.pdp-jumpbar__link[data-active="true"]{
  color:var(--color-text, #fff);
  background:color-mix(in srgb, var(--color-accent, #e01b1b) 14%, transparent);
}
[data-theme="light"] .pdp-jumpbar__link[data-active="true"]{
  color:var(--color-text, #1a1a1a);
}
@media (max-width: 540px){
  .pdp-jumpbar__label{display:none}
}
@media (prefers-reduced-motion: reduce){
  .pdp-jumpbar__link{transition:none}
}

/* Legacy floating-sidebar styles fully removed — old .pdp-toc /
   .pdp-toc-host classes no longer rendered by togo-pdp-finesse.js v=2. */

/* ── 107: FAQ accordion + expand-all ── */
.pdp-faq-toolbar{
  display:flex;justify-content:flex-end;margin:0 0 var(--space-3, 12px);
}
.pdp-faq-toolbar__btn{
  background:transparent;border:1px solid var(--color-border, rgba(255,255,255,0.12));
  color:var(--color-text, #fff);
  padding:6px 12px;border-radius:6px;font-size:12px;font-weight:500;
  cursor:pointer;transition:border-color 140ms ease, background 140ms ease;
}
.pdp-faq-toolbar__btn:hover{
  border-color:var(--color-accent, #e01b1b);
  background:color-mix(in srgb, var(--color-accent, #e01b1b) 8%, transparent);
}
#compound-faq-grid .card{cursor:pointer}
#compound-faq-grid .card[data-collapsed="true"] .card__body-text{display:none}
#compound-faq-grid .card .card__title{
  position:relative;padding-right:24px;
}
#compound-faq-grid .card .card__title::after{
  content:"−";position:absolute;right:0;top:0;
  font-weight:400;color:var(--color-text-muted, #a0a0a0);
  transition:transform 160ms ease;
}
#compound-faq-grid .card[data-collapsed="true"] .card__title::after{
  content:"+";
}
@media (prefers-reduced-motion: reduce){
  #compound-faq-grid .card .card__title::after{transition:none}
}

/* ── 110: Research signals pill row ── */
.pdp-signals{
  list-style:none;padding:0;margin:var(--space-3, 12px) 0 var(--space-4, 16px);
  display:flex;flex-wrap:wrap;gap:6px;
}
.pdp-signals li{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;border-radius:999px;
  font-size:11.5px;font-weight:500;line-height:1.3;
  background:rgba(255,255,255,0.04);
  border:1px solid var(--color-border, rgba(255,255,255,0.1));
  color:var(--color-text-muted, #a0a0a0);
}
[data-theme="light"] .pdp-signals li{
  background:rgba(0,0,0,0.03);
}
.pdp-signals li svg{
  width:12px;height:12px;flex-shrink:0;
  color:var(--color-accent, #e01b1b);opacity:0.85;
}
.pdp-signals li[data-tone="ok"]{
  color:#22c55e;border-color:rgba(34,197,94,0.3);
  background:rgba(34,197,94,0.08);
}
.pdp-signals li[data-tone="ok"] svg{color:#22c55e;opacity:1}
[data-theme="light"] .pdp-signals li[data-tone="ok"]{
  color:#166534;background:rgba(34,197,94,0.12);
  border-color:rgba(22,101,52,0.28);
}
[data-theme="light"] .pdp-signals li[data-tone="ok"] svg{color:#166534}

/* ── 118: Storage advice card ── */
.pdp-storage-advice{
  display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;margin-top:var(--space-3, 12px);
}
.pdp-storage-advice__cell{
  padding:12px 14px;
  background:var(--color-bg-elevated, #0f0f0f);
  border:1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius:10px;
}
.pdp-storage-advice__label{
  display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:0.1em;
  color:var(--color-text-muted, #a0a0a0);margin-bottom:4px;font-weight:600;
}
.pdp-storage-advice__value{
  display:block;font-size:13.5px;color:var(--color-text, #fff);line-height:1.45;
}

/* ── 122: Research-use disclaimer below buy-button ── */
.pdp-ruo-disclaimer{
  margin:10px 0 0;padding:10px 12px;
  font-size:12px;line-height:1.5;color:var(--color-text-muted, #a0a0a0);
  background:rgba(245,158,11,0.06);
  border-left:3px solid #f59e0b;border-radius:0 6px 6px 0;
}
[data-theme="light"] .pdp-ruo-disclaimer{
  background:rgba(245,158,11,0.08);
  color:#7a4f0c;
}
.pdp-ruo-disclaimer strong{color:var(--color-text, #fff);font-weight:600}
[data-theme="light"] .pdp-ruo-disclaimer strong{color:#5b3a08}
.pdp-ruo-disclaimer.is-emphasized{
  background:rgba(245,158,11,0.14);
  border-left-width:4px;
  animation:pdp-ruo-pulse 480ms ease-out 1;
}
@keyframes pdp-ruo-pulse{
  0%{transform:scale(1)}
  40%{transform:scale(1.02)}
  100%{transform:scale(1)}
}
@media (prefers-reduced-motion: reduce){
  .pdp-ruo-disclaimer.is-emphasized{animation:none}
}

/* ── 123: Per-compound related stack card ── */
.pdp-stack-card{
  display:flex;align-items:center;gap:14px;
  margin-top:var(--space-3, 12px);
  padding:14px 16px;
  background:var(--color-bg-elevated, #0f0f0f);
  border:1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius:12px;
  text-decoration:none;color:var(--color-text, #fff);
  transition:border-color 160ms ease, transform 160ms ease;
}
.pdp-stack-card:hover{
  border-color:color-mix(in srgb, var(--color-accent, #e01b1b) 50%, transparent);
  transform:translateY(-1px);
}
.pdp-stack-card__icon{
  flex-shrink:0;width:38px;height:38px;border-radius:9px;
  background:color-mix(in srgb, var(--color-accent, #e01b1b) 14%, transparent);
  display:grid;place-items:center;color:var(--color-accent, #e01b1b);
}
.pdp-stack-card__body{flex:1;min-width:0}
.pdp-stack-card__eyebrow{
  display:block;font-size:11px;text-transform:uppercase;letter-spacing:0.08em;
  color:var(--color-text-muted, #a0a0a0);margin-bottom:2px;
}
.pdp-stack-card__title{
  display:block;font-size:14.5px;font-weight:600;margin:0;
  color:var(--color-text, #fff);
}
.pdp-stack-card__cta{
  flex-shrink:0;font-size:12px;font-weight:700;color:#ff8a8a;
  white-space:nowrap;
}
html[data-theme="light"] .pdp-stack-card__cta{color:#9f1239}
@media (prefers-reduced-motion: reduce){
  .pdp-stack-card{transition:none}
}

/* ── 124: H1 entrance animation ── */
@media (prefers-reduced-motion: no-preference){
  body[data-page="compound"] #compound-title{
    animation:pdp-h1-rise 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  body[data-page="compound"] #compound-lead{
    animation:pdp-h1-rise 280ms cubic-bezier(0.22, 1, 0.36, 1) 60ms both;
  }
}
@keyframes pdp-h1-rise{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

/* ── 96: Wishlist heart on PDP ── */
.pdp-heart{
  position:absolute;top:14px;right:14px;z-index:5;
  width:38px;height:38px;border-radius:50%;
  background:rgba(20,20,20,0.78);
  border:1px solid rgba(255,255,255,0.14);
  color:#fff;display:grid;place-items:center;cursor:pointer;
  transition:transform 160ms ease, background 160ms ease, border-color 160ms ease;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
[data-theme="light"] .pdp-heart{
  background:rgba(255,255,255,0.85);
  border-color:rgba(0,0,0,0.1);
  color:#1a1a1a;
}
.pdp-heart:hover{transform:scale(1.06)}
.pdp-heart svg{width:18px;height:18px;transition:fill 160ms ease}
.pdp-heart[aria-pressed="true"]{
  background:color-mix(in srgb, var(--color-accent, #e01b1b) 88%, transparent);
  border-color:var(--color-accent, #e01b1b);
  color:#fff;
}
.pdp-heart[aria-pressed="true"] svg{fill:#fff}
.compound-hero__media{position:relative}
@media (prefers-reduced-motion: reduce){
  .pdp-heart{transition:none}
  .pdp-heart:hover{transform:none}
}

/* ── 119: Buy-button progressive disclosure ── */
#add-to-cart-btn[data-state="adding"]{opacity:0.85;cursor:wait}
#add-to-cart-btn[data-state="added"]{
  background:#22c55e;border-color:#22c55e;color:#fff;
}
#add-to-cart-btn .pdp-cart-spinner{
  display:inline-block;width:12px;height:12px;
  border:2px solid currentColor;border-top-color:transparent;border-radius:50%;
  margin-right:6px;vertical-align:-2px;
  animation:pdp-spin 720ms linear infinite;
}
@keyframes pdp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){
  #add-to-cart-btn .pdp-cart-spinner{animation:none}
}

/* ── 117: Trust strip — already exists as .pdp-trust-row, no changes needed ── */
