/* Cart drawer shared by index.html and vital-iron.html (markup and logic in cart.js).
   Uses the page tokens: --ink, --muted, --line, --font, .btn, .visually-hidden. */
body.cart-open { overflow: hidden; }
.cart {
  position: fixed; inset: 0; z-index: 50;
  visibility: hidden; transition: visibility 0s linear .3s;
}
.cart.is-open { visibility: visible; transition-delay: 0s; }
.cart-overlay {
  position: absolute; inset: 0; background: rgba(20, 16, 12, .45);
  opacity: 0; transition: opacity .3s ease;
}
.cart.is-open .cart-overlay { opacity: 1; }
.cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  width: min(460px, 100%); background: #fff; color: var(--ink);
  transform: translateX(100%); transition: transform .3s ease;
}
.cart.is-open .cart-panel { transform: translateX(0); }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px; border-bottom: 1px solid #ececec;
}
.cart-head h2 { font-size: 20px; letter-spacing: -0.01em; }
.cart-close {
  display: grid; place-items: center; width: 32px; height: 32px; margin-right: -8px;
  padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer;
}
.cart-close svg { width: 18px; height: 18px; }
.cart-body { flex: 1; overflow-y: auto; }
.cart-items { list-style: none; margin: 0; padding: 8px 32px; }
.cart-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 24px 0; }
.cart-item-img { position: relative; width: 120px; height: 120px; overflow: hidden; background: #f5f4f1; }
.cart-bottle {
  position: absolute; left: 50%; bottom: 12%; z-index: 2;
  height: 76%; width: auto; max-width: none;
  transform: translateX(-50%); transform-origin: 50% 100%;
}
/* 3-pack: front bottle in the middle, two slightly behind on either side */
.cart-item-img--pack .cart-bottle:first-child { z-index: 1; transform: translateX(-100%) scale(.86); filter: brightness(.9); }
.cart-item-img--pack .cart-bottle:last-child { z-index: 1; transform: translateX(0) scale(.86); filter: brightness(.9); }
.cart-item-title { font-size: 15px; }
.cart-item-variant { font-size: 12px; color: var(--muted); }
.cart-item-price { margin-top: 6px; font-size: 15px; color: var(--muted); }
.cart-item-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.cart-qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line); }
.cart-qty button {
  width: 36px; height: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  font: 18px/1 var(--font); color: var(--ink);
}
.cart-qty output { min-width: 28px; text-align: center; font-size: 14px; }
.cart-remove {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 12px var(--font); color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.cart-empty { padding: 48px 32px; text-align: center; font-size: 15px; color: var(--muted); }
.cart-foot { padding: 24px 32px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #ececec; }
.cart-note summary { cursor: pointer; list-style: none; font-size: 13px; }
.cart-note summary::-webkit-details-marker { display: none; }
.cart-note textarea {
  display: block; width: 100%; min-height: 72px; margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--line); resize: vertical; font: 13px var(--font); color: var(--ink);
}
.cart-taxes { margin-top: 6px; font-size: 13px; color: var(--muted); }
.cart-checkout { display: flex; gap: 12px; width: 100%; margin-top: 16px; }
.cart-checkout[aria-disabled="true"] { opacity: .5; pointer-events: none; }

@media (max-width: 560px) {
  .cart-head, .cart-items, .cart-foot { padding-left: 20px; padding-right: 20px; }
  .cart-item { grid-template-columns: 96px 1fr; gap: 16px; }
  .cart-item-img { width: 96px; height: 96px; }
}
