/* Product page, ported from the approved mockup (product.html), plus the amaboxly / hBOUS parity pieces
   (round coach.com swatches, savings, dispatch date, pay later, delivery note, related, phone carousel).
   The product info accordion (#pa) is styled in PdpPanel.astro. Device rules (SARAHSHABER.md): dvh on phones, -webkit-backdrop-filter, hover only on hover devices,
   44px tap targets, reduced motion. */
.pdp{display:grid;grid-template-columns:1fr 1fr;padding-top:calc(var(--bar) + var(--hdr));align-items:start;max-width:2560px;margin:0 auto}
.pdp>*{min-width:0}
.gal{position:relative}
.gal .track{display:flex;flex-direction:column}
.gal figure{position:relative;height:calc(100vh - var(--bar) - var(--hdr));height:calc(100svh - var(--bar) - var(--hdr));min-height:600px;max-height:1400px;background:var(--photo);overflow:hidden;cursor:none}
.gal figure img{width:100%;height:100%;object-fit:cover}
.gal figure picture{display:contents}
.gal .crumb{position:absolute;left:12px;top:0;z-index:3;color:var(--muted);max-width:calc(100% - 24px)}
/* 44px tap targets around the small caps links, without moving the text */
.gal .crumb a{display:inline-flex;align-items:center;min-height:44px;padding:0 7px;margin:0 -7px}
.gal .crumb li:first-child,.gal .crumb li:last-child{display:none}
.gal .crumb li:nth-child(2):before{content:none}
.gal .cnt2{display:none}
.zcur{position:fixed;left:0;top:0;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:rgba(255,255,255,.75);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);pointer-events:none;z-index:90;opacity:0;transform:scale(.6);transition:opacity .2s,transform .25s var(--ease)}
.zcur.on{opacity:1;transform:scale(1)}
.zcur:before,.zcur:after{content:"";position:absolute;left:50%;top:50%;background:#111;transform:translate(-50%,-50%)}
.zcur:before{width:12px;height:1px}.zcur:after{width:1px;height:12px}
@media not all and (hover:hover){.gal figure{cursor:pointer}.zcur{display:none}}
.panel{padding:22px 52px 60px;display:flex;flex-direction:column;align-items:center;text-align:center;position:sticky;top:calc(var(--bar) + var(--hdr))}
.panel h1{font-size:25px;font-weight:400;line-height:1.05}
.panel .ed{color:var(--muted);margin-top:5px}
.panel .price{margin-top:7px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 8px}
.panel .price s{color:var(--muted)}
.panel .price .off{border:1px solid var(--ink);border-radius:999px;padding:1px 7px;font-size:10px;letter-spacing:.08em}
.pack{position:relative;width:100%;max-width:min(470px,calc((100vh - 360px) * .8));aspect-ratio:4/5;margin:6px 0 2px}
.pack img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .35s}
.pack .pill{position:absolute;right:0;bottom:6px;border:1px solid var(--line);border-radius:999px;padding:6px 11px;min-height:32px;background:#fff}
.prow{width:100%;max-width:560px}
/* colour: "Colour: Black" then round swatches (coach.com): ring on the chosen one, sold out crossed out */
.clab{display:flex;justify-content:space-between;align-items:center;margin:14px 0 6px;color:var(--muted);text-align:left;gap:12px}
.clab .cn{color:var(--ink)}
.clab .cso{color:var(--muted)}
.clab button{color:var(--ink);min-height:44px;white-space:nowrap}
.sw{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px}
.sw .c{width:44px;height:44px;padding:0;display:grid;color:inherit;place-items:center;border-radius:50%;position:relative;flex:0 0 auto}
.sw .ci{display:block;width:34px;height:34px;border-radius:50%;overflow:hidden;background:var(--photo);box-shadow:0 0 0 1px rgba(0,0,0,.12);transition:box-shadow .2s}
.sw .ci img{width:100%;height:100%;object-fit:cover;transform:scale(2);transform-origin:50% 70%}
.sw .c.on .ci{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--ink)}
.sw .c.out .ci{opacity:.55}
.sw .c.out:after,.xp .g .xo.out .xi:after{content:"";position:absolute;left:50%;top:50%;width:1px;background:var(--ink);transform:translate(-50%,-50%) rotate(45deg);pointer-events:none}
.sw .c.out:after{height:38px}
@media(hover:hover){.sw .c:not(.on):hover .ci{box-shadow:0 0 0 2px #fff,0 0 0 3px #bbb}}
.sw .c:focus-visible{outline:1px solid var(--ink);outline-offset:0}
.lab{display:flex;justify-content:space-between;align-items:center;margin:14px 0 8px;color:var(--muted);min-height:24px}
.lab b{color:var(--ink);font-weight:400}
.lab a{display:inline-flex;align-items:center;min-height:44px}
.sizes{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.sizes button{height:44px;border:1px solid var(--line);font-family:var(--sans);font-size:12px;letter-spacing:.04em;position:relative;transition:border-color .2s,background .2s,color .2s}
@media(hover:hover){.sizes button:hover{border-color:#999}}
.sizes button.on{border-color:var(--ink);background:var(--ink);color:#fff}
.sizes button.out{color:#bbb;text-decoration:line-through}
.sizes button.on.out{color:#fff;background:#999;border-color:#999}
.sizes button i{position:absolute;top:4px;right:4px;width:5px;height:5px;border-radius:50%}
.st-rs{background:#2e8b57}.st-po{background:#c9822b}.st-it{background:#3f6fb5}
.legend{display:flex;gap:14px;margin-top:8px;color:var(--muted);font-size:10px;flex-wrap:wrap}
.legend i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px;vertical-align:1px}
.ship{width:100%;max-width:560px;text-align:left;margin-top:20px;color:#444}
.ship i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:6px;vertical-align:1px}
.eta{width:100%;max-width:560px;text-align:left;margin-top:3px;color:var(--muted);font-family:var(--sans);font-size:12px;letter-spacing:.02em}
.buy{display:flex;gap:8px;width:100%;max-width:560px;margin-top:8px}
.go{flex:1;height:46px;background:var(--ink);color:#fff;transition:opacity .2s}
@media(hover:hover){.go:hover{opacity:.88}}
.go:active{opacity:.75}
.go[disabled]{background:#cfcac4;cursor:not-allowed;opacity:1}
.go[aria-busy=true]{opacity:.6;pointer-events:none}
a.go{display:flex;align-items:center;justify-content:center}
.wl{width:46px;height:46px;border:1px solid var(--line);display:grid;place-items:center;flex:0 0 46px}
.wl svg{width:16px;stroke:var(--ink);fill:none;stroke-width:1.4;transition:fill .2s}
.wl.on svg{fill:var(--ink)}
.perr{width:100%;max-width:560px;text-align:left;margin-top:8px;color:#b3261e}
.prow.need .sizes button:not(.out){border-color:#b3261e}
.prow.need .sw .ci{box-shadow:0 0 0 2px #fff,0 0 0 3px #b3261e}
.prow.need .lab,.prow.need .clab{color:#b3261e}
.bnpl{width:100%;max-width:560px;text-align:left;margin-top:8px;color:var(--muted);font-size:16px;line-height:1.35}
.bnpl[hidden]{display:none}
.dnote{width:100%;max-width:560px;display:flex;gap:12px;text-align:left;margin-top:18px;padding:12px 14px;background:var(--photo);font-size:15px;line-height:1.4;color:#444}
.dnote svg{width:22px;height:22px;flex:none;fill:none;stroke:var(--ink);stroke-width:1.3;stroke-linejoin:round;margin-top:1px}
.dnote b{display:block;font-weight:500;color:var(--ink)}
.dnote span{display:block}
.dnote a{display:inline-block;margin-top:4px;color:var(--ink)}
.pdp button:focus-visible,.pdp a:focus-visible,.sbar .go:focus-visible,.xp button:focus-visible,.zoom button:focus-visible{outline:1px solid var(--ink);outline-offset:2px}
/* sticky bar: under the header on desktop */
.sbar{position:fixed;left:0;right:0;top:calc(var(--wpab, 0px) + var(--bar) + var(--hdr));z-index:95;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:8px 16px;transform:translateY(-100%);opacity:0;visibility:hidden;transition:transform .4s var(--ease),opacity .3s,visibility 0s .4s}
.sbar.on{transform:none;opacity:1;visibility:visible;transition:transform .4s var(--ease),opacity .3s}
/* product thumbnail: the chosen colour, on the photo grey like the cards (white backgrounds blend in) */
.sbar .sbt{flex:0 0 44px;width:44px;height:44px;border-radius:6px;overflow:hidden;background:var(--photo)}
.sbar .sbt img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.sbar .t{flex:1;line-height:1.15;min-width:0}
.sbar .sbn{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sbar .go{flex:0 0 240px;height:44px}
.sbar a.go{display:flex}
/* Explore all: right-side panel (bottom sheet on phones) */
.xp{position:fixed;top:0;right:0;bottom:0;width:50vw;max-width:900px;z-index:150;background:#fff;padding:22px 26px;overflow:auto;overscroll-behavior:contain;transform:translateX(100%);transition:transform .5s var(--ease);visibility:hidden}
.xp.on{transform:none;visibility:visible}
.xp .h{display:flex;justify-content:space-between;align-items:center;font-size:20px;margin-bottom:18px}
.xp .h button{min-height:44px;padding:0 6px}
.xp .g{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.xp .g .xo{display:block;text-align:center;color:inherit;border:1px solid transparent;padding:8px 6px 12px;transition:border-color .2s;position:relative}
.xp .g .xo.on{border-color:var(--ink)}
@media(hover:hover){.xp .g .xo:not(.on):hover{border-color:#ccc}}
.xp .g .xi{display:block;position:relative}
.xp .g img{width:100%;aspect-ratio:4/5;object-fit:contain}
.xp .g .xo.out img{opacity:.5}
.xp .g .xo.out .xi:after{height:60%;background:#999}
.xp .g span.caps{display:block;margin-top:6px}
.xscrim{position:fixed;inset:0;z-index:140;background:rgba(255,255,255,.3);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);opacity:0;visibility:hidden;transition:opacity .4s,visibility 0s .4s}
.xscrim.on{opacity:1;visibility:visible;transition:opacity .4s}
/* zoom viewer */
.zoom{position:fixed;inset:0;z-index:160;background:#fff;display:none;overflow:hidden;touch-action:none}
.zoom.on{display:block}
.zoom img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;cursor:zoom-in;transition:transform .35s var(--ease);-webkit-user-drag:none;user-select:none}
.zoom img.big{cursor:zoom-out;transform:scale(2)}
.zoom .bar{position:absolute;left:0;right:0;top:0;display:flex;justify-content:space-between;align-items:center;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;z-index:2}
.zoom .bar button{min-height:44px;padding:0 10px}
.zoom .nav{position:absolute;top:50%;width:100%;display:flex;justify-content:space-between;padding:0 16px;z-index:2;transform:translateY(-50%);pointer-events:none}
.zoom .nav button{pointer-events:auto;width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:#fff;font-size:20px}
/* related + recently viewed */
.pdp-more{max-width:2560px;margin:0 auto;padding:56px 0 24px;border-top:1px solid var(--line)}
.pm-rel{padding:0 16px 40px}
.pm-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.pm-h h2{font-size:25px;font-weight:400}
.pm-nav{display:flex;gap:6px}
.pm-a{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;font-size:20px;line-height:1}
.pm-rail{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 6px) / 4);gap:2px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.pm-rail::-webkit-scrollbar{display:none}
.pm-it{scroll-snap-align:start;min-width:0}
@media(min-width:1800px){.pm-rail{grid-auto-columns:calc((100% - 8px) / 5)}}
@media(max-width:1100px){.pm-rail{grid-auto-columns:calc((100% - 4px) / 3)}}
/* tablets and small laptops (768-1180): two columns, tighter panel */
@media(min-width:768px) and (max-width:1180px){.panel{padding:22px 28px 60px}}
/* up to 900px the add-to-bag bar sits at the bottom, under the layout's lifted tab bar */
@media(max-width:900px){
  .zcur{display:none}
  .sbar{top:auto;bottom:0;transform:none;opacity:1;visibility:visible;border-top:1px solid var(--line);border-bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));transition:none}
  .sbar{gap:10px}
  .sbar .go{flex:0 0 46%}
  html:has(body.pdp-page){scroll-padding-bottom:calc(150px + env(safe-area-inset-bottom))}
}
/* tablets in portrait (768-900): two columns; photos keep their 4:5 shape instead of a tall full-height crop */
@media(min-width:768px) and (max-width:900px){
  .gal figure{height:auto;aspect-ratio:4/5;min-height:0}
  .panel{padding:20px 24px 40px}
  .sbar .go{flex:0 0 300px}
}
/* phones (and landscape phones): one column, photo carousel, bottom sheet */
@media(max-width:767px),(max-width:900px) and (max-height:500px){
  .pdp{grid-template-columns:1fr}
  /* phone photo carousel (hBOUS): swipe row, counter pill */
  .gal .track{flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:manipulation}
  .gal .track::-webkit-scrollbar{display:none}
  /* 4:5, but short enough that the name, price and colour row show above the tab bar and add-to-bag bar
     (144px) on first view, also on an iPhone SE */
  .gal figure{flex:0 0 100%;height:auto;aspect-ratio:4/5;min-height:0;max-height:max(240px,calc(100svh - var(--bar) - var(--hdr) - 340px - env(safe-area-inset-bottom)));scroll-snap-align:center;cursor:pointer}
  .gal figure img{object-fit:contain}
  /* one photo per flick, however fast */
  .gal figure{scroll-snap-stop:always}
  .gal .cnt2{display:inline-flex;align-items:center;position:absolute;left:12px;bottom:14px;z-index:3;height:30px;padding:0 14px;border-radius:999px;background:rgba(255,255,255,.85);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);letter-spacing:.18em;pointer-events:none}
  .gal .cnt2[hidden]{display:none}
  .panel{padding:16px 16px 40px;position:relative;top:auto!important}
  .pack{display:none}
  .sw{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 13px}
  .sw::-webkit-scrollbar{display:none}
  .sizes{grid-template-columns:repeat(4,1fr)}
  .xp{width:100vw;max-width:none;top:auto;height:86vh;height:86dvh;transform:translateY(100%);padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:14px 14px 0 0}
  .xp.on{transform:none}
  .xp .g{grid-template-columns:repeat(2,1fr)}
  .pdp-more{padding-top:36px}
  .pm-rel{padding:0 0 32px}
  .pm-h{padding:0 16px}
  .pm-nav{display:none}
  .pm-rail{grid-auto-columns:44%;padding:0 16px;scroll-padding:0 16px}
}
@media(max-width:767px) and (min-width:600px){.pm-rail{grid-auto-columns:31%}.panel{padding:20px 32px 40px}}
/* landscape phones: photos beside each other, short enough to reach the buy panel */
@media(max-width:900px) and (max-height:500px) and (orientation:landscape){.gal figure{flex-basis:60%;aspect-ratio:auto;max-height:none;height:calc(100svh - var(--bar) - var(--hdr) - 70px)}}
@media(prefers-reduced-motion:reduce){
  .zcur,.pack img,.sbar,.xp,.xscrim,.zoom img,.sw .ci,.go{transition:none!important}
  .gal .track{scroll-behavior:auto}
}
