/* Glossom store · view: pdp (owned by the foundation). Ported from directions/3-pick-your-stack.
   Shared components (photo card, shore switch, ledger, buttons, patch disc, plate) live in base.css. */

/* ============ first screen ============ */
.v-pdp .pdp{max-width:var(--max);margin:0 auto;padding:0 48px 40px;display:grid;grid-template-columns:minmax(0,1fr) 540px;column-gap:64px;align-items:stretch}
.v-pdp .stage-wrap{position:relative;min-width:0}

/* stage: the real pouch (and its patch sheet) on white */
.v-pdp .stage{position:relative;height:100%;min-height:640px;margin:0;display:grid;grid-template-rows:minmax(0,1fr) auto;border-radius:var(--r-stage);background:var(--stage);overflow:hidden}
.v-pdp .shot{position:relative;min-height:0}
.v-pdp .stage .plate{opacity:0;transition:opacity 240ms ease}
.v-pdp .stage .plate.on{opacity:1}
.v-pdp .plate.one{--w1:690px;width:var(--w1);height:calc(var(--w1) * 1.0011)}
.v-pdp .plate.one::after{left:4%;right:40%}
.v-pdp .plate.one img{position:absolute;left:0;bottom:0;width:100%;height:auto;filter:drop-shadow(0 10px 12px rgba(37,38,40,.10))}

/* the stack: one plate holding three real pouches. Its box is sized for three and nudged so a stack of two or three
   both sit centred within ±7% of a pouch; the front pouch never moves. Rear pouches are dealt out from behind it. */
.v-pdp .plate.stack{transform:translateX(calc(-50% + var(--w) * var(--step) / 4))}
.v-pdp .plate.stack::after{transition:right 420ms var(--ease)}
.v-pdp .plate.stack[data-n="2"]::after{right:calc(var(--w) * var(--step) - 3%)}
.v-pdp .plate.stack[data-n="1"]::after{right:calc(var(--w) * var(--step) * 2 - 3%)}
.v-pdp .stack .pf{transition:transform 420ms var(--ease),opacity 140ms ease}
.v-pdp .stack .pf[data-i="2"]{transition-delay:60ms}
.v-pdp .stack[data-n="2"] .pf[data-i="1"]{filter:brightness(.95)}
.v-pdp .stack[data-n="2"] .pf[data-i="0"],.v-pdp .stack[data-n="3"] .pf[data-i="0"]{filter:drop-shadow(10px 4px 14px rgba(37,38,40,.22)) drop-shadow(0 10px 12px rgba(37,38,40,.10))}
.v-pdp .stack[data-n="3"] .pf[data-i="1"]{filter:brightness(.975) drop-shadow(10px 4px 14px rgba(37,38,40,.20))}
.v-pdp .stack[data-n="3"] .pf[data-i="2"]{filter:brightness(.95)}
/* tucked: slid back behind the front pouch; it fades only after it has slid home */
.v-pdp .stack[data-n="1"] .pf[data-i="1"],.v-pdp .stack[data-n="1"] .pf[data-i="2"],.v-pdp .stack[data-n="2"] .pf[data-i="2"]{
  transform:translate(calc(var(--i) * var(--w) * var(--step) * -1),calc(var(--i) * var(--rise)));opacity:0;
  transition:transform 420ms var(--ease),opacity 120ms ease 300ms}
.v-pdp .shot.still *,.v-pdp .shot.still *::after{transition:none !important}

.v-pdp .floor{position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:12px 24px 22px}
.v-pdp .arrives{margin:0;font:500 13px/18px "Euclid";color:var(--ink-2);min-width:0}
.v-pdp .arrives .what{display:block}
.v-pdp .arrives b{display:block;margin-top:2px;font:600 17px/22px "Euclid";letter-spacing:-.01em;color:var(--ink)}

.v-pdp .shore{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.v-pdp .shore-h{display:flex;gap:10px;align-items:baseline;font:500 13px/18px "Euclid";color:var(--ink-2)}

/* buy column */
.v-pdp .buy{position:relative;display:flex;flex-direction:column;align-items:stretch;min-width:0;padding-top:2px}
.v-pdp .name{margin:0;font:600 52px/52px "Euclid";letter-spacing:-.035em}
.v-pdp .name sup{font-size:.3em;line-height:0;vertical-align:baseline;position:relative;top:-1.75em;letter-spacing:0;margin-left:2px}
.v-pdp .name:focus{box-shadow:none}
.v-pdp .variant{display:inline-block;vertical-align:middle;position:relative;top:-6px;margin-left:12px;padding:6px 12px 5px;border-radius:var(--r-pill);background:var(--stage);font:500 12px/16px "Euclid";letter-spacing:.08em;text-transform:uppercase}
.v-pdp .lead{margin:12px 0 0}
.v-pdp .actives{margin:2px 0 0;font:300 15px/22px "Banana";color:var(--ink-2)}

.v-pdp .price-row{display:flex;align-items:baseline;gap:12px;margin-top:18px;min-height:40px}
.v-pdp .amt{display:inline-flex;font:600 40px/40px "Euclid";letter-spacing:-.02em;font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.v-pdp .amt .cell{position:relative;display:inline-block;overflow:hidden;height:40px;vertical-align:top}
.v-pdp .amt .cell > span{position:absolute;left:0;top:0;white-space:pre}
.v-pdp .per{font:300 15px/20px "Banana";color:var(--ink-2)}
.v-pdp .per .num{color:var(--ink);font-weight:500;font-size:14.5px}
.v-pdp .xf{display:inline-grid;vertical-align:top}
.v-pdp .xf > span{grid-area:1/1;white-space:nowrap}

.v-pdp .packs-h{display:flex;justify-content:space-between;align-items:baseline;margin:16px 0 8px;font:500 13px/16px "Euclid";color:var(--ink-2)}
.v-pdp .packs-h b{font-weight:600;color:var(--ink)}
.v-pdp .packs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}

/* the ledger: what reaches your door, itemised */
.v-pdp .money{position:relative;margin-top:16px}
.v-pdp .lg-del{display:none}
.v-pdp .nodeliver{position:absolute;left:0;right:0;top:0;margin:0;padding:14px 16px;border-radius:var(--r-ctl);background:var(--card)}
.v-pdp .nodeliver p{margin:0;font:300 14.5px/21px "Banana";color:var(--ink-2)}
.v-pdp .nodeliver p.h{font:600 16px/22px "Euclid";color:var(--ink);margin-bottom:4px}
.v-pdp .nodeliver .opts{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:8px}

.v-pdp .cta{width:100%;margin-top:18px}
.v-pdp .cta .ok{display:inline-flex}
/* reserved slot under the button: empty in the US, Amazon UK in the UK. Fixed height, nothing shifts. */
.v-pdp .slot{position:relative;height:64px}
.v-pdp .slot > .amz{position:absolute;left:0;right:0;top:8px;height:56px;width:100%}
.v-pdp .award{display:none;margin:12px 0 0;font:300 13.5px/19px "Banana";color:var(--ink-2)}
.v-pdp .award b{font:500 13.5px/19px "Euclid";color:var(--ink)}

/* the "Elsewhere" sheet, anchored to the shore switch */
.v-pdp .pdp-sheet{right:16px;bottom:84px;transform-origin:bottom right}

/* ============ below the fold ============ */
.v-pdp .sec{max-width:var(--max);margin:0 auto;padding:72px 48px 0}
.v-pdp .ph{position:relative;margin:0;border-radius:var(--r-stage);overflow:hidden;background:var(--stage)}
.v-pdp .ph::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--edge);pointer-events:none}
.v-pdp .ph img{width:100%;height:100%;object-fit:cover}
.v-pdp .sub{margin:10px 0 0}
.v-pdp .ben-lead{margin:24px 0 0;font:500 20px/26px "Euclid";letter-spacing:-.01em;max-width:24em}
.v-pdp .ben{list-style:none;margin:22px 0 0;padding:0;display:grid;gap:18px}
.v-pdp .ben h3{margin:0;font:600 17px/24px "Euclid";letter-spacing:-.01em}
.v-pdp .ben p{margin:2px 0 0;font:300 16px/24px "Banana";max-width:32em}
.v-pdp .badges{margin:28px 0 0;padding-top:16px;border-top:1px solid var(--line);font:500 13px/20px "Euclid";color:var(--ink-2)}

.v-pdp .steps-h{margin-bottom:28px}
.v-pdp .steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);gap:20px}
.v-pdp .step .ph{aspect-ratio:4/5}
.v-pdp .step .ph img{object-position:center 30%}
.v-pdp .step-t{display:flex;gap:14px;align-items:flex-start;margin-top:16px}
.v-pdp .step h3{margin:6px 0 0;font:600 18px/24px "Euclid";letter-spacing:-.01em}
.v-pdp .step p{margin:2px 0 0;font:300 15px/22px "Banana";color:var(--ink-2)}

.v-pdp .roles{list-style:none;margin:24px 0 0;padding:0;display:grid;gap:12px}
.v-pdp .roles li{display:grid;grid-template-columns:14px minmax(0,1fr);gap:12px;align-items:baseline;font:300 16px/24px "Banana"}
.v-pdp .roles li::before{content:"";width:12px;height:12px;border-radius:50%;background:var(--ink);transform:translateY(1px)}
.v-pdp .roles b{font:600 16px/24px "Euclid"}
.v-pdp .inci{margin:24px 0 0;padding:16px 18px;border-radius:var(--r-card);background:var(--card);font:300 14px/21px "Banana";color:var(--ink-2)}
.v-pdp .inci b{display:block;margin-bottom:4px;font:600 13px/18px "Euclid";color:var(--ink)}
.v-pdp .back-ph{display:flex;align-items:center;justify-content:center;aspect-ratio:5/4;padding:36px}
.v-pdp .back-ph img{width:auto;height:100%;max-height:520px;object-fit:contain;filter:drop-shadow(0 14px 16px rgba(37,38,40,.14))}

.v-pdp .faq{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:64px;align-items:start}

/* ============ reflow ============ */
@media (max-width: 1180px){
  .v-pdp .pdp{grid-template-columns:minmax(0,1fr) 460px;column-gap:40px}
  .v-pdp .stage .plate{--w:330px}
  .v-pdp .plate.one{--w1:560px}
  .v-pdp .name{font-size:46px;line-height:48px}
  .v-pdp .award{display:block}
}
@media (max-width: 900px){
  .v-pdp .pdp{grid-template-columns:1fr;padding:0 16px 24px}
  .v-pdp .stage{height:auto;min-height:0;border-radius:20px}
  .v-pdp .shot{height:178px}
  .v-pdp .stage .plate{--w:98px;--rise:5px;bottom:4px}
  .v-pdp .plate.one{--w1:170px}
  .v-pdp .stage .plate::after{bottom:-8px;height:14px}
  .v-pdp .floor{padding:8px 12px 12px;gap:8px;align-items:flex-end}
  .v-pdp .arrives{font-size:11.5px;line-height:15px}
  .v-pdp .arrives .what{display:none}
  .v-pdp .arrives b{font-size:14px;line-height:18px;margin-top:0}
  .v-pdp .arrives b span{display:block}
  .v-pdp .arrives b .sep{display:none}
  .v-pdp .shore{gap:4px}
  .v-pdp .shore-h{font-size:11.5px;line-height:15px;gap:8px}
  .v-pdp .shore-h .linkbtn{font-size:12px;line-height:15px}
  .v-pdp .seg .pd{flex-basis:14px;width:14px;height:14px}
  .v-pdp .pdp-sheet{left:0;right:0;width:auto;max-width:none;bottom:auto;top:calc(100% + 6px);transform-origin:top center}
  .v-pdp .buy{padding-top:0;margin-top:12px}
  .v-pdp .name{font-size:28px;line-height:32px;letter-spacing:-.025em}
  .v-pdp .name br{display:none}
  .v-pdp .variant{top:-3px;margin-left:6px;padding:4px 9px 3px;font-size:12px;line-height:14px;letter-spacing:.06em}
  .v-pdp .lead{margin-top:2px}
  .v-pdp .actives{display:none}
  .v-pdp .price-row{margin-top:8px;min-height:32px;gap:10px}
  .v-pdp .amt{font-size:30px;line-height:32px}
  .v-pdp .amt .cell{height:32px}
  .v-pdp .per{font-size:13.5px;line-height:18px}
  .v-pdp .packs-h{margin:8px 0 6px;font-size:12px;line-height:14px}
  .v-pdp .packs{gap:8px}
  .v-pdp .money{margin-top:10px}
  .v-pdp .lg-h{margin-bottom:1px}
  .v-pdp .lk .k{display:none}
  .v-pdp .lg-sold{display:none}
  .v-pdp .lg-del{display:inline}
  .v-pdp .lg-h .wk{display:none}
  .v-pdp .ledger{position:relative}
  .v-pdp .ledger:not(.open) .lk:not(.tot),.v-pdp .ledger:not(.open) .lv:not(.tot){display:none}
  .v-pdp .ledger:not(.open) .lk.tot,.v-pdp .ledger:not(.open) .lv.tot{margin-top:2px}
  .v-pdp .lv.tot{padding-right:26px}
  .v-pdp .lg-tgl{display:block;position:absolute;left:0;right:0;bottom:-6px;height:38px;border-radius:8px}
  .v-pdp .lg-tgl .pl{position:absolute;right:0;top:50%;width:16px;height:16px;margin-top:-6px}
  .v-pdp .lg-tgl .pl::before,.v-pdp .lg-tgl .pl::after{content:"";position:absolute;left:2px;right:2px;top:7px;height:1.5px;background:var(--ink);border-radius:1px;transition:transform 160ms var(--ease)}
  .v-pdp .lg-tgl .pl::after{transform:rotate(90deg)}
  .v-pdp .ledger.open .lg-tgl .pl::after{transform:rotate(0deg)}
  .v-pdp[data-mode="other"] .nodeliver{position:static}
  .v-pdp[data-mode="other"] .ledger{display:none}
  .v-pdp .cta{margin-top:10px}
  .v-pdp .slot{height:60px}
  .v-pdp .slot > .amz{height:52px}
  .v-pdp .award{margin-top:6px}
  .v-pdp .sec{padding:56px 16px 0}
  .v-pdp .faq{grid-template-columns:1fr;gap:24px}
  .v-pdp .ben-lead{font-size:18px;line-height:24px}
  .v-pdp .steps{grid-template-columns:1fr;gap:28px}
  .v-pdp .step .ph{aspect-ratio:4/3}
  .v-pdp .back-ph{aspect-ratio:1/1;padding:24px}
  .v-pdp .ben-ph{order:-1}
}
@media (prefers-reduced-motion: reduce){
  .v-pdp .stage .plate,.v-pdp .stack .pf,.v-pdp .plate.stack::after{transition:none}
}
