/* ════════════════════════════════════════════════════════════════════════
 * Wager — Shopify-style slide-out cart drawer.
 * Dark steel panel slides in from the right; dimmed overlay behind. Paired
 * with assets/js/cart-drawer.js (WooCommerce Store API). Loaded globally.
 * ════════════════════════════════════════════════════════════════════════ */

:root {
  --wmw-orange:    #F66332;
  --wmw-orange-lit:#FF7742;
  --wmw-orange-dk: #C44E24;
  --wmw-steel-900: #0F0E0D;
  --wmw-steel-800: #141311;
  --wmw-steel-700: #1A1917;
  --wmw-steel-600: #2A2824;
  --wmw-steel-500: #3A3732;
  --wmw-steel-300: #A9A49C;
  --wmw-steel-100: #ECEAE7;
}

/* lock the page behind the drawer */
body.wmw-cart-open { position: fixed; width: 100%; overflow: hidden; }

.wmw-cart {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  pointer-events: none;
}
.wmw-cart.is-open { visibility: visible; pointer-events: auto; }

.wmw-cart__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 6, 0.62);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wmw-cart.is-open .wmw-cart__overlay { opacity: 1; }

.wmw-cart__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--wmw-steel-800);
  border-left: 2px solid var(--wmw-orange);
  box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.7);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.wmw-cart.is-open .wmw-cart__panel { transform: translateX(0); }

/* ── header ─────────────────────────────────────────────────────────────── */
.wmw-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--wmw-steel-600);
  background: var(--wmw-steel-900);
}
.wmw-cart__title {
  margin: 0;
  font-family: 'Bebas Neue', system-ui, sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--wmw-steel-100);
  line-height: 1;
}
.wmw-cart__count {
  color: var(--wmw-orange);
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.wmw-cart__close {
  background: none;
  border: 0;
  color: var(--wmw-steel-300);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  transition: color 0.12s;
}
.wmw-cart__close:hover { color: var(--wmw-orange); }

/* ── body / items ───────────────────────────────────────────────────────── */
.wmw-cart__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 22px;
}
.wmw-cart__item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--wmw-steel-600);
  position: relative;
}
.wmw-cart__item.is-loading { opacity: 0.45; pointer-events: none; }

.wmw-cart__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  background: var(--wmw-steel-900);
  border: 1px solid var(--wmw-steel-600);
  overflow: hidden;
}
.wmw-cart__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wmw-cart__meta { flex: 1 1 auto; min-width: 0; }
.wmw-cart__name {
  display: block;
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--wmw-steel-100);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wmw-cart__name:hover { color: var(--wmw-orange); }
.wmw-cart__variation {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 12px;
  color: var(--wmw-steel-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wmw-cart__line {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wmw-cart__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wmw-steel-500);
}
.wmw-cart__qty button {
  width: 30px;
  height: 30px;
  background: var(--wmw-steel-900);
  border: 0;
  color: var(--wmw-steel-100);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.wmw-cart__qty button:hover { background: var(--wmw-orange); color: #fff; }
.wmw-cart__qval {
  min-width: 34px;
  text-align: center;
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-size: 13px;
  color: var(--wmw-steel-100);
}
.wmw-cart__price {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--wmw-orange);
  white-space: nowrap;
}
.wmw-cart__remove {
  margin-top: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--wmw-steel-300);
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.12s;
}
.wmw-cart__remove:hover { color: var(--wmw-orange-lit); text-decoration: underline; }

/* ── empty / loading / flash ────────────────────────────────────────────── */
.wmw-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  gap: 16px;
  color: var(--wmw-steel-300);
}
.wmw-cart__empty p {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.wmw-cart__continue {
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wmw-orange);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.wmw-cart__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.wmw-cart__spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--wmw-steel-600);
  border-top-color: var(--wmw-orange);
  border-radius: 50%;
  animation: wmw-cart-spin 0.7s linear infinite;
}
@keyframes wmw-cart-spin { to { transform: rotate(360deg); } }

.wmw-cart__flash {
  margin: 0;
  padding: 0 22px;
  max-height: 0;
  overflow: hidden;
  background: #3a1410;
  color: #ffb4a0;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 13px;
  line-height: 38px;
  border-bottom: 1px solid var(--wmw-orange-dk);
  transition: max-height 0.2s ease;
}
.wmw-cart__flash.show { max-height: 60px; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.wmw-cart__foot {
  flex: 0 0 auto;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--wmw-steel-600);
  background: var(--wmw-steel-900);
}
.wmw-cart__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: 'Chakra Petch', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wmw-steel-100);
  font-size: 13px;
}
.wmw-cart__subtotal-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--wmw-orange);
}
.wmw-cart__note {
  margin: 4px 0 14px;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 12px;
  color: var(--wmw-steel-300);
}
.wmw-cart__checkout,
.wmw-cart__viewcart {
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wmw-cart__checkout {
  background: var(--wmw-orange);
  color: #fff;
  font-size: 14px;
  padding: 16px;
  box-shadow: 0 6px 20px -6px rgba(246, 99, 50, 0.45), 0 2px 0 0 var(--wmw-orange-dk);
  transition: background 0.12s, transform 0.08s;
}
.wmw-cart__checkout:hover { background: var(--wmw-orange-lit); }
.wmw-cart__checkout:active { transform: translateY(2px); }
.wmw-cart__viewcart {
  margin-top: 10px;
  background: transparent;
  color: var(--wmw-steel-300);
  font-size: 11px;
  padding: 10px;
  border: 1px solid var(--wmw-steel-500);
  transition: color 0.12s, border-color 0.12s;
}
.wmw-cart__viewcart:hover { color: var(--wmw-orange); border-color: var(--wmw-orange); }

/* ── header cart button + badge ─────────────────────────────────────────── */
.wmw-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #A9A49C;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
  transition: color 0.12s;
}
.wmw-cart-btn:hover { color: var(--wmw-orange); }
.wmw-cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wmw-orange);
  color: #fff;
  font-family: 'Chakra Petch', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 9px;
}
.wmw-cart-count.is-empty { display: none; }

/* mobile cart row in the dropdown menu */
.wmw-cart-btn--mobile {
  color: #A9A49C;
  gap: 8px;
  padding: 0;
}
.wmw-cart-btn--mobile .wmw-cart-count {
  position: static;
  top: auto;
  right: auto;
}

@media (max-width: 480px) {
  .wmw-cart__panel { width: 100%; max-width: 100%; border-left: 0; }
  .wmw-cart__head { padding: 18px; }
  .wmw-cart__body, .wmw-cart__foot { padding-left: 18px; padding-right: 18px; }
}
