#shop-cart {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(100vw, 29rem);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  color: var(--paper);
  background: #1a211c;
  border: 0;
  border-left: 1px solid #485447;
  box-shadow: -16px 0 60px #0006;
}
#shop-cart::backdrop { background: #070c09bc; backdrop-filter: blur(5px); }
body:has(#shop-cart[open]) { overflow: hidden; }
#shop-cart [hidden] { display: none; }
.cart-panel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 5vw, 2rem);
  padding-bottom: max(clamp(1.25rem, 5vw, 2rem), env(safe-area-inset-bottom));
}
.cart-head, .cart-item-head, .cart-item-controls, .cart-subtotal {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cart-head { justify-content: space-between; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.cart-head h2 {
  margin: 0;
  font: 600 clamp(2.2rem, 7vw, 3rem)/1.05 var(--display);
  letter-spacing: -.065em;
}
.cart-icon-button, .cart-stepper button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
}
.cart-icon-button { border: 1px solid #526051; border-radius: 5px; }
.cart-icon-button svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cart-icon-button:hover, .cart-stepper button:enabled:hover { background: #313c32; }
.cart-body { flex: 1; }
.cart-empty { margin: 2rem 0; }
.cart-empty p { font-size: 1.1rem; margin: 0 0 .5rem; }
.cart-message:not(:empty) {
  margin: 1.25rem 0;
  padding-left: .8rem;
  border-left: 2px solid var(--accent);
  line-height: 1.5;
}
.cart-message:empty { margin: 0; }
.cart-item { padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.cart-product-mark {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  flex: none;
  background: #151a16;
  border: 1px solid #435043;
  border-radius: 6px;
}
.cart-product-mark img { width: 2.65rem; height: 2.65rem; }
.cart-item-head h3 { margin: 0 0 .22rem; font: 600 1.4rem/1.1 var(--display); letter-spacing: -.045em; }
.cart-item-head p { margin: 0; font-size: .92rem; color: var(--mist); }
.cart-item-controls { flex-wrap: wrap; gap: .3rem .8rem; margin-top: 1.25rem; }
.cart-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #596659;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.cart-stepper button { border: 0; font-size: 1.25rem; }
.cart-stepper span { min-width: 1.25rem; text-align: center; }
.cart-stepper button:focus-visible { outline-offset: -3px; }
.cart-text-button {
  min-height: 2.75rem;
  padding: 0 .15rem;
  background: none;
  border: 0;
  color: #d2d9cf;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.cart-text-button:hover { color: white; }
.cart-unit { margin-left: auto; color: var(--mist); font-size: .88rem; }
.cart-footer { padding-top: 2rem; }
.cart-subtotal { justify-content: space-between; font-size: 1.15rem; }
.cart-subtotal strong { font-variant-numeric: tabular-nums; }
.cart-status { color: #c1cabf; line-height: 1.5; margin: .85rem 0; }
.cart-status:empty { margin: 0; }
.cart-checkout { width: 100%; min-height: 3.2rem; }
.cart-checkout:disabled, .cart-checkout:disabled:hover {
  color: #b9c1b5;
  background: #2b352d;
  border-color: #50604e;
  opacity: 1;
  transform: none;
}
.cart-retry { margin: -.35rem 0 .5rem; }
@media (max-width: 30rem) {
  #shop-cart { border-left: 0; }
}
