.shop-cart-trigger { position:relative; flex:none; }
.shop-cart-count {
  position:absolute; inset:0 0 auto auto; min-width:1.35em; padding:0 .22em;
  border-radius:1em; background:var(--ink); color:var(--surface);
  font:600 10px/1.35 Arial,sans-serif; text-align:center; font-variant-numeric:tabular-nums;
}
html.shop-cart-open { overflow:hidden; }
dialog.shop-cart-panel {
  position:fixed; inset:0 0 0 auto; padding:0; margin:0; border:0;
  width:min(100%,27rem); max-width:100%; height:100%; height:100dvh; max-height:100%;
  background:var(--surface); color:var(--ink); box-shadow:-4px 0 24px #1b151018;
}
.shop-cart-panel::backdrop { background:rgb(23 18 14 / 44%); }
.shop-cart-layout {
  height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto;
  padding:env(safe-area-inset-top) clamp(20px,5vw,32px) env(safe-area-inset-bottom);
}
.shop-cart-header {
  display:flex; justify-content:space-between; align-items:center; gap:1rem;
  border-bottom:1px solid var(--rule); padding:16px 0;
}
.shop-cart-header h2 { font:700 clamp(32px,6vw,40px)/1.08 Nimbus,Arial,sans-serif; margin:0; }
.shop-cart-close { width:44px; height:44px; padding:10px; flex:none; }
.shop-cart-close svg { width:22px; fill:none; stroke:currentColor; stroke-width:1.5; }
.shop-cart-content { overflow:auto; overscroll-behavior:contain; }
.shop-cart-empty { color:var(--muted); margin:26px 0; }
.shop-cart-lines { list-style:none; margin:0; padding:0; }
.shop-cart-lines li { padding:20px 0 14px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; border-bottom:1px solid var(--rule); }
.shop-cart-lines strong { grid-column:1/-1; font:600 19px/1.3 Arial,sans-serif; }
.shop-cart-stepper { display:inline-flex; width:fit-content; align-items:center; border:1px solid var(--rule); }
.shop-cart-stepper button { width:44px; height:44px; padding:0; font-size:19px; }
.shop-cart-stepper button:disabled { opacity:.4; cursor:default; }
.shop-cart-stepper output { min-width:20px; text-align:center; font-variant-numeric:tabular-nums; }
.shop-cart-remove { min-height:44px; padding:0; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.shop-cart-actions { padding:16px 0; border-top:1px solid var(--rule); }
.shop-cart-actions p { font-size:14px; color:var(--muted); margin:0 0 12px; }
.shop-cart-continue { width:100%; min-height:46px; padding:9px 16px; background:var(--ink); color:var(--surface); font-weight:600; }
@media (prefers-reduced-motion:no-preference) {
  .shop-cart-panel[open] { animation:shop-cart-enter .2s ease-out; }
  @keyframes shop-cart-enter { from { transform:translateX(100%); } to { transform:none; } }
}
