/* Bag drawer (src/components/BagDrawer.astro, public/js/bagdrawer.js).
   Motion follows coach.com's mini-cart drawer: slides in 400ms decelerating, out 300ms accelerating, scrim fades 200ms.
   Right panel on desktop; at 700px and under (phones) an iOS-style sheet: it opens at a medium detent (60% of the
   screen, set by bagdrawer.js) and grows to a large one (92%); its height animates with the iOS sheet curve. Scrim: the one amaboxly value rgba(31,32,28,.16) + blur(8px), fade .3s ease (qa/amaboxly-spec.md 3.3). Glass tokens come from site.css. */
.bd-scrim{position:fixed;inset:0;z-index:150;background:var(--scrim,rgba(17,17,17,.28));-webkit-backdrop-filter:blur(var(--scrim-blur,6px));backdrop-filter:blur(var(--scrim-blur,6px));opacity:0;transition:opacity .2s linear}
.bd-scrim.on{opacity:1}
.bd{position:fixed;top:0;right:0;bottom:0;z-index:151;width:min(440px,100vw);display:flex;flex-direction:column;
  background:var(--glass,rgba(255,255,255,.86));-webkit-backdrop-filter:var(--glass-blur,saturate(180%) blur(24px));backdrop-filter:var(--glass-blur,saturate(180%) blur(24px));
  box-shadow:-20px 0 60px rgba(0,0,0,.10),inset 1px 0 0 rgba(255,255,255,.7);
  transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,1,1);outline:none}
.bd.on{transform:none;transition:transform .4s cubic-bezier(0,0,.2,1)}
.bd[hidden],.bd-scrim[hidden]{display:none}
.bd-grab{display:none}

.bd-h{flex:0 0 auto;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 24px 16px;border-bottom:1px solid var(--line)}
.bd-h h2{font-family:var(--serif);font-weight:400;font-size:26px;line-height:1.1;margin:0}
.bd-count{color:var(--muted);margin:6px 0 0}
.bd-x{flex:none;width:44px;height:44px;margin:-10px -12px 0 0;display:grid;place-items:center;background:none;border:0;cursor:pointer;color:var(--ink);border-radius:50%}
.bd-x svg{width:16px;height:16px;stroke:currentColor;stroke-width:1.2;fill:none}
.bd-x:focus-visible,.bd-go:focus-visible,.bd-view:focus-visible,.bd a:focus-visible{outline:1.5px solid var(--ink);outline-offset:2px}

.bd-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 24px 8px}
/* notice: the theme's error style (#b3261e) */
.bd-msg{margin:14px 0 0;padding:11px 14px;border-left:2px solid #b3261e;background:rgba(179,38,30,.06);color:#b3261e;font:400 13px/1.45 var(--sans)}
.bd-msg:empty{display:none}

.bd-list{list-style:none;margin:0;padding:0}
.bd-it{display:grid;grid-template-columns:88px minmax(0,1fr) auto;gap:16px;padding:18px 0;border-bottom:1px solid var(--line)}
.bd-it:last-child{border-bottom:0}
.bd-it.on{animation:bd-in .5s cubic-bezier(0,0,.2,1) both}
@keyframes bd-in{from{opacity:0;transform:translateY(8px)}}
.bd-pic{display:block;aspect-ratio:4/5;background:var(--photo);overflow:hidden}
.bd-pic img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.bd-tx{min-width:0}
.bd-br{color:var(--muted)}
.bd-nm{display:block;font-family:var(--serif);font-size:19px;line-height:1.15;margin:3px 0 0;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.bd-op,.bd-q{color:var(--muted);margin-top:6px}
.bd-av{display:inline-block;margin-top:8px;color:var(--ink)}
.bd-p{text-align:right;white-space:nowrap;font:400 14px/1.3 var(--sans)}
.bd-p s{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.bd-p.sale>span{color:#b3261e}
.bd-empty{padding:34px 4px 10px;text-align:center}
.bd-empty-h{margin:0;font-family:var(--serif);font-size:22px;line-height:1.2;color:var(--ink)}
.bd-empty-t{margin:8px auto 18px;max-width:30ch;font:400 14px/1.5 var(--sans);color:var(--muted)}
.bd-shop{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 26px;background:#111;color:#fff;text-decoration:none}
.bd-empty[hidden],.bd-f[hidden],.bd-count[hidden]{display:none}
.bd-also{margin:6px 0 0;padding:14px 0 0;border-top:1px solid var(--line);color:var(--muted)}
.bd-also+.bd-list .bd-it{grid-template-columns:56px minmax(0,1fr) auto;padding:12px 0}
.bd-also+.bd-list .bd-nm{font-size:16px}

.bd-more{margin:18px 0 6px;padding-top:18px;border-top:1px solid var(--line)}
.bd-more h3{margin:0 0 14px;font-weight:400;color:var(--ink)}
.bd-recs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}
/* each suggestion is the shop's own ProductCard (compact): card.css styles it */
.bd-rec{min-width:0}
.bd-rec[hidden]{display:none}
@media(hover:hover){.bd-view:hover{opacity:.6}.bd-go:hover{opacity:.88}.bd-x:hover{background:rgba(0,0,0,.05)}}

.bd-f{flex:0 0 auto;padding:16px 24px calc(18px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.55)}
.bd-sub{display:flex;justify-content:space-between;align-items:baseline;font-family:var(--serif);font-size:22px}
/* with the promo's "Extra N% off" (the bag page's estimate): subtotal and extra small, the estimated total large */
.bd-f.has-xtra .bd-sub{font:400 14px/1.5 var(--sans)}
.bd-xtra,.bd-tot{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.bd-xtra{font:400 14px/1.4 var(--sans);margin-top:2px}
.bd-est{display:block;color:var(--muted);margin-top:1px}
.bd-tot{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);font-family:var(--serif);font-size:22px}
.bd-xtra[hidden],.bd-tot[hidden]{display:none}
.bd-n{color:var(--muted);margin-left:6px;font-family:var(--sans)}
.bd-note{color:var(--muted);margin:2px 0 14px}
.bd-acts{display:block}
.bd-go{display:block;width:100%;min-height:52px;border:0;background:#111;color:#fff;cursor:pointer;transition:opacity .2s}
.bd-go[disabled]{background:#cfcac4;cursor:not-allowed}
.bd-go[aria-busy=true]{opacity:.6;pointer-events:none}
.bd-view{display:flex;align-items:center;justify-content:center;min-height:44px;margin:6px auto 0;width:max-content;color:var(--ink);text-decoration:underline;text-underline-offset:4px}

/* phones: bottom sheet that fits short screens (iPhone SE) and the home bar */
@media(max-width:700px){
  .bd{top:auto;left:0;width:100%;height:60vh;height:60dvh;max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);border-radius:16px 16px 0 0;
    transform:translateY(100%);box-shadow:0 -20px 60px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.8);
    transition:transform .3s cubic-bezier(.4,0,1,1),height .5s cubic-bezier(.32,.72,0,1)}
  .bd.on{transition:transform .5s cubic-bezier(.32,.72,0,1),height .5s cubic-bezier(.32,.72,0,1)}
  .bd-grab{display:block;flex:none;height:22px;touch-action:none;cursor:grab;position:relative}
  .bd-grab:before{content:"";position:absolute;top:8px;left:50%;width:36px;height:5px;margin-left:-18px;border-radius:3px;background:rgba(0,0,0,.18)}
  .bd-h{padding:4px 18px 12px}
  .bd-h h2{font-size:23px}
  .bd-body{padding:0 18px 6px}
  .bd-it{grid-template-columns:72px minmax(0,1fr) auto;gap:12px;padding:14px 0}
  .bd-recs{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:18px;gap:12px;margin:0 -18px;padding:0 18px 4px;scrollbar-width:none}
  .bd-recs::-webkit-scrollbar{display:none}
  .bd-rec{flex:0 0 40%;scroll-snap-align:start}
  .bd-f{padding:12px 18px calc(12px + env(safe-area-inset-bottom))}
  .bd-note{display:none}
  .bd-tot{margin:6px 0 10px;padding-top:6px;font-size:20px}
  .bd-f:not(.has-xtra) .bd-sub{margin-bottom:10px}
  /* Checkout and View bag side by side, so the medium detent still shows a line or two */
  .bd-acts{display:flex;gap:10px}
  .bd-go{flex:1.6 1 0;min-height:48px}
  .bd-view{flex:1 1 0;min-height:48px;margin:0;width:auto;border:1px solid var(--ink);text-decoration:none}
  .bd.dragging{transition:none}
}
@media(max-width:700px) and (max-height:700px){.bd-rec{flex-basis:36%}}
/* landscape phones: the sheet becomes a right panel so the item and the buttons both fit */
@media(max-height:500px) and (orientation:landscape){
  .bd{top:0;left:auto;right:0;width:min(420px,60vw);height:auto;max-height:none;border-radius:0;transform:translateX(100%)}
  .bd-acts{display:flex;gap:10px}.bd-go{flex:1.6 1 0;min-height:44px}.bd-view{flex:1 1 0;min-height:44px;margin:0;width:auto;border:1px solid var(--ink);text-decoration:none}
  .bd-grab{display:none}
  .bd-h{padding:12px 18px 8px}.bd-h h2{font-size:20px}
  .bd-more{display:none}
  .bd-note{display:none}
  .bd-sub{margin-bottom:8px}
  .bd-f{padding:10px 18px calc(10px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.bd,.bd.on,.bd-scrim{transition:opacity .15s linear}.bd{transform:none;opacity:0}.bd.on{opacity:1}.bd-it.on{animation:none}.bd-rec img{transition:none}}
@media(prefers-reduced-transparency:reduce){.bd{background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}}

/* one scrim (amaboxly spec 3.3); html-qualified so it matches site.css's shared rule */
html .bd-scrim{background:rgba(31,32,28,.16);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);transition:opacity .3s ease}
/* no backdrop-filter (old browsers, some Firefox setups): solid panel and a slightly darker scrim so the page never reads through */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){html .bd{background:#fff}html .bd-scrim{background:rgba(31,32,28,.32)}}
/* text-heavy panel: denser frost (amaboxly spec 3.2 "is-dense") so busy pages never read through, WebKit included */
html .bd{background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(255,255,255,.88))}
/* the title band and the handle sit over the busiest part of the page: almost solid there (Android QA F9) */
html .bd-h,html .bd-grab{background:rgba(255,255,255,.9)}
