/* Mind Moon product page (/pack). Mobile first; tokens come from site.css. */

.pdp-head { min-height: 132px; }
.pdp-head .hill--back { height: 70px; }
.pdp-head .hill--front { height: 44px; }
.pdp-head-in { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 16px; padding-bottom: 56px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--on-night-2); }
.crumbs a { color: var(--on-night); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.crumbs a:hover { text-decoration: underline; }

.pdp { overflow-x: clip; }

/* ---------------------------------------------------------------- main: gallery + buy box */
.pdp-main { display: grid; gap: 28px; padding-top: 24px; padding-bottom: var(--space-8); }
.pdp-main > * { min-width: 0; }

.pdp-track { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: 0; padding: 8px 2px 18px; margin: 0 calc(var(--gutter) * -1);
  padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-slide { scroll-snap-align: center; min-width: 0; }

.pdp-frame { position: relative; overflow: hidden; border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--shadow-sheet); }
.pdp-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pdp-frame--cover, .pdp-frame--guide { aspect-ratio: 520 / 672; }
.pdp-frame--inside { aspect-ratio: 720 / 878; }
.pdp-frame img.crop-tight { transform: scale(1.035); transform-origin: 50% 0; }
.pdp-frame--guide img { object-position: top center; }

.pdp-thumbs { display: none; }
.pdp-thumb { appearance: none; border: 2px solid transparent; background: var(--sheet); padding: 0; border-radius: 8px; overflow: hidden;
  width: 100%; aspect-ratio: 520 / 672; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .2s, transform .2s var(--ease-paper); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pdp-thumb[aria-current="true"] { border-color: var(--moon-600); transform: translateY(-2px); }
.pdp-thumb:focus-visible { outline: 3px solid var(--moon-600); outline-offset: 2px; }

.pdp-buy { background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 24px 20px; }
.pdp-eyebrow { color: var(--moon-600); }
.pdp-buy h1 { margin-top: 10px; font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 1.6vw + 26px, 46px);
  line-height: 1.05; letter-spacing: -.025em; color: var(--ink); }
.pdp-lede { margin-top: 14px; font-size: var(--fs-body); line-height: 1.6; color: var(--ink-2); }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; }
.pdp-now { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.pdp-was { font-weight: 800; font-size: 22px; color: var(--ink-2); text-decoration-thickness: 2px; text-decoration-color: var(--moon-600); }
.pdp-note { font-weight: 700; font-size: 16px; color: var(--ink-2); }
.pdp-phases { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; font-weight: 700; font-size: 16px; line-height: 24px; }
.pdp-phases span { color: var(--ink-2); font-weight: 600; }
.pdp-form { margin-top: 22px; }
.pdp-btn { width: 100%; }
.pdp-secure { margin-top: 12px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.pdp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 2px dashed var(--moon-200); }
.pdp-facts li { display: flex; flex-direction: column; min-width: 0; background: var(--moon-100); border-radius: 14px; padding: 12px 14px; }
.pdp-facts b { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.1; color: var(--moon-700); }
.pdp-facts span { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink-2); }
.pdp-guarantee { margin-top: 18px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.pdp-guarantee a { color: var(--moon-700); font-weight: 800; }

/* ---------------------------------------------------------------- inside each book */
.pdp-inside, .pdp-spec { padding-block: var(--section-y); }
.pdp h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.024em; color: var(--ink); }
.pdp-sub { margin-top: 14px; max-width: 640px; font-size: var(--fs-body); line-height: 1.6; color: var(--ink-2); }

.book-tabs { display: flex; gap: 8px; margin: 28px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 8px; overflow-x: auto;
  scrollbar-width: none; }
.book-tabs::-webkit-scrollbar { display: none; }
.book-tab { appearance: none; flex: none; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 2px solid var(--moon-200);
  background: var(--sheet); font: 800 16px/20px var(--font-body); color: var(--ink); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; }
.book-tab[aria-selected="true"] { background: var(--night-800); border-color: var(--night-800); color: var(--on-night); }
.book-tab:focus-visible { outline: 3px solid var(--moon-600); outline-offset: 2px; }

.book-panel { margin-top: 20px; background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 20px; }
.book-panel[hidden] { display: none; }
.book-panel-head { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.book-panel-head > * { min-width: 0; }
.book-panel h3, .pdp-bonus h4, .term-card h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.15; color: var(--ink); }
.book-panel-head p { margin-top: 4px; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.book-meta { font-weight: 800; color: var(--moon-700) !important; }

.lv-cols { display: grid; gap: 22px; margin-top: 22px; }
.lv-col { min-width: 0; }
.lv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font: 800 17px/24px var(--font-display); color: var(--ink);
  padding-bottom: 10px; border-bottom: 2px solid var(--moon-100); }
.lv-head span:last-child { font: 700 15px/22px var(--font-body); color: var(--ink-2); }
.lv-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.lv-dot--crescent { box-shadow: inset -6px 0 0 0 var(--moon-600), inset 0 0 0 2px var(--moon-300); }
.lv-dot--half { background: linear-gradient(90deg, var(--moon-100) 50%, var(--moon-600) 50%); box-shadow: inset 0 0 0 2px var(--moon-600); }
.lv-dot--full { background: var(--moon-600); }
.act-list { counter-reset: act; }
.act-list li { counter-increment: act; position: relative; display: flex; flex-direction: column; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--moon-100); }
.act-list li::before { content: counter(act); position: absolute; left: 0; top: 11px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--moon-100); color: var(--moon-700); font: 800 13px/24px var(--font-body); text-align: center; }
.act-title { font-weight: 800; font-size: 16px; line-height: 22px; color: var(--ink); }
.act-type { font-size: 15px; line-height: 21px; color: var(--ink-2); }

/* ---------------------------------------------------------------- bonus */
.pdp-bonus { padding-block: var(--section-y); }
.bonus-list { display: grid; gap: 14px; margin-top: 24px; }
.bonus-row { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; background: var(--sheet);
  border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 14px 16px; }
.bonus-row > * { min-width: 0; }
.bonus-row p { margin-top: 4px; font-size: 16px; line-height: 23px; color: var(--ink-2); }

/* ---------------------------------------------------------------- spec */
.spec-grid { display: grid; gap: 24px; }
.spec-grid > * { min-width: 0; }
.spec { background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 6px 20px; }
.spec-row { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--moon-100); }
.spec-row:last-child { border-bottom: 0; }
.spec dt { font-weight: 800; font-size: 16px; line-height: 22px; color: var(--moon-700); }
.spec dd { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink); }

/* ---------------------------------------------------------------- terms */
.pdp-terms { display: grid; gap: 14px; padding-block: var(--section-y); }
.term-card { border: 2px dashed var(--moon-300); border-radius: var(--r-card); padding: 22px 20px; background: var(--paper); min-width: 0; }
.term-card p { margin-top: 10px; font-size: 16px; line-height: 25px; color: var(--ink-2); }
.term-card a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 800; color: var(--moon-700); }

/* ---------------------------------------------------------------- final */
.pdp-final { padding: var(--window-inset); }
.pdp-final-in { min-height: 340px; display: flex; align-items: center; }
.pdp-final .hill--back { height: 110px; }
.pdp-final .hill--front { height: 70px; }
.pdp-final-copy { position: relative; z-index: 5; text-align: center; padding-block: 56px 120px; }
.pdp-final h2 { color: var(--on-night); }
.pdp-final .buy-form { margin-top: 26px; display: inline-block; }


/* ---------------------------------------------------------------- sticky bar (phones) */
.pdp-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 20px;
  border-radius: var(--r-pill); background: var(--night-800); color: var(--on-night); box-shadow: var(--shadow-sheet-night);
  transform: translateY(140%); transition: transform .35s var(--ease-paper); }
.pdp-bar.on { transform: none; }
.pdp-bar-price b { font: 800 24px/1 var(--font-display); }
.pdp-bar-price s { margin-left: 6px; font-weight: 700; color: var(--on-night-2); }

@media (min-width: 640px) {
  .pdp-track { grid-auto-columns: 46%; }
  .lv-cols { grid-template-columns: repeat(3, 1fr); }
  .bonus-list { grid-template-columns: 1fr 1fr; }
  .pdp-terms { grid-template-columns: 1fr 1fr; }
  .book-panel { padding: 28px; }
  .book-panel-head { grid-template-columns: 100px 1fr; gap: 22px; }
}

@media (min-width: 1000px) {
  .pdp-head-in { padding-bottom: 60px; }
  .pdp-main { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; padding-top: 40px; }
  .pdp-track { display: block; margin: 0; padding: 0; overflow: visible; }
  .pdp-slide { display: none; }
  .pdp-slide.is-on { display: block; }
  .pdp-slide .pdp-frame { max-width: 520px; margin: 0 auto; box-shadow: var(--shadow-sheet), 0 40px 80px -40px rgb(23 20 61 / .35); }
  .pdp-thumbs { display: grid; grid-template-columns: repeat(11, 1fr); gap: 8px; margin-top: 18px; }
  .pdp-buy { position: sticky; top: 24px; padding: 36px 34px; }
  .spec-grid { grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
  .pdp-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-bar, .book-tab, .pdp-thumb { transition: none; }
}

/* light theme */
.book-tab[aria-selected="true"] { background: var(--moon-600); border-color: var(--moon-600); color: #fff; }
.pdp-bar { background: rgb(255 255 255 / .97); color: var(--ink); box-shadow: 0 0 0 1px var(--cream-line), 0 16px 34px -14px rgb(23 20 61 / .30); }
.pdp-bar-price s { color: var(--ink-2); }
.crumbs { color: var(--ink-2); }
.crumbs a { color: var(--ink); }
.pdp-facts li, .pdp-frame { }
.term-card { background: var(--sheet); border-color: var(--moon-200); }
.pdp-inside .book-panel, .spec { box-shadow: var(--shadow-card); }
