/* ═══════════════════════════════════════
   DK Sport — Cart Button & Drawer
═══════════════════════════════════════ */

/* ── Cart button in nav ── */
.cart-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--border, #E2E5EF);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
  color: var(--text, #111827);
  flex-shrink: 0;
}
.cart-btn:hover { border-color: var(--orange, #FF5500); color: var(--orange, #FF5500); }
.cart-btn svg { display: block; pointer-events: none; }

.cart-badge {
  position: absolute;
  top: -7px; right: -7px;
  min-width: 19px; height: 19px;
  padding: 0 4px;
  background: linear-gradient(135deg,#CC1010 0%,#FF5500 55%,#FFB800 100%);
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 700; line-height: 1;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  pointer-events: none;
  animation: cart-pop .25s ease;
}
@keyframes cart-pop {
  0%   { transform: scale(0.6); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ── Overlay ── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(11,21,39,.5);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

/* ── Drawer ── */
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 1101;
  transform: translateX(100%);
  transition: transform .36s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 52px rgba(0,0,0,.16);
}
.cart-drawer.open { transform: none; }

/* Header */
.cart-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #E2E5EF;
  flex-shrink: 0;
  gap: 10px;
}
.cart-drawer-hd-left { display: flex; align-items: baseline; gap: 8px; }
.cart-drawer-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 2px;
  color: #111827; line-height: 1; margin: 0;
}
.cart-drawer-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: #9CA3AF;
}
.cart-close-btn {
  width: 36px; height: 36px;
  border: 1.5px solid #E2E5EF; border-radius: 50%;
  background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; color: #6B7280; flex-shrink: 0;
}
.cart-close-btn:hover { border-color: #CC1010; color: #CC1010; }

/* Items scroll area */
.cart-items-wrap {
  flex: 1; overflow-y: auto;
  padding: 4px 0;
}
.cart-items-wrap::-webkit-scrollbar { width: 4px; }
.cart-items-wrap::-webkit-scrollbar-track { background: transparent; }
.cart-items-wrap::-webkit-scrollbar-thumb { background: #E2E5EF; border-radius: 2px; }

/* Empty state */
.cart-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 64px 24px; text-align: center; gap: 14px;
}
.cart-empty svg { opacity: .18; width: 56px; height: 56px; }
.cart-empty p { font-size: 15px; color: #6B7280; font-family: 'DM Sans', sans-serif; }
.cart-empty a {
  font-size: 14px; font-weight: 600; color: #FF5500;
  font-family: 'DM Sans', sans-serif; transition: opacity .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.cart-empty a:hover { opacity: .7; }

/* Cart item */
.cart-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px 16px 20px;
  border-bottom: 1px solid #F3F4F8;
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 66px; height: 66px;
  border-radius: 8px;
  background: #F6F7FB;
  border: 1px solid #E2E5EF;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img svg { opacity: .2; }

.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 14px; font-weight: 600; color: #111827;
  line-height: 1.35; margin-bottom: 3px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-customization {
  font-size: 11px; color: #9CA3AF;
  line-height: 1.7; margin-bottom: 8px;
  font-family: 'DM Sans', sans-serif;
}
.cart-item-meta {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.cart-qty-ctrl {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid #E2E5EF; border-radius: 7px; overflow: hidden;
}
.cart-qty-btn {
  width: 28px; height: 28px;
  background: #F6F7FB; border: none; cursor: pointer;
  font-size: 15px; line-height: 1;
  color: #374151; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif; font-weight: 600;
}
.cart-qty-btn:hover { background: #E2E5EF; color: #111827; }
.cart-qty-val {
  min-width: 28px; text-align: center;
  font-size: 13px; font-weight: 600; color: #111827;
  font-family: 'DM Sans', sans-serif;
  border-left: 1px solid #E2E5EF; border-right: 1px solid #E2E5EF;
  line-height: 28px;
}
.cart-item-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 1px;
  background: linear-gradient(135deg,#CC1010 0%,#FF5500 55%,#FFB800 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-left: auto;
}

.cart-item-remove {
  width: 30px; height: 30px; flex-shrink: 0;
  border: none; background: none; cursor: pointer;
  color: #D1D5DB; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; margin-top: -2px;
}
.cart-item-remove:hover { background: #FEF2F2; color: #CC1010; }

/* Footer */
.cart-footer {
  padding: 18px 24px 28px;
  border-top: 2px solid #F3F4F8;
  background: #fff; flex-shrink: 0;
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.cart-total-label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: #6B7280;
  font-family: 'DM Sans', sans-serif;
}
.cart-total-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px; letter-spacing: 1px;
  background: linear-gradient(135deg,#CC1010 0%,#FF5500 55%,#FFB800 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cart-footer-note {
  font-size: 11px; color: #9CA3AF; margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif; line-height: 1.55;
}
.cart-cta-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px;
  background: linear-gradient(135deg,#CC1010 0%,#FF5500 55%,#FFB800 100%);
  color: #fff; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: opacity .2s; margin-bottom: 10px;
  border: none; cursor: pointer;
}
.cart-cta-btn:hover { opacity: .88; }
.cart-cta-btn:disabled {
  opacity: .6; cursor: not-allowed; transform: none !important;
}
.cart-clear-btn {
  display: block; width: 100%; padding: 8px;
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  color: #9CA3AF; transition: color .15s; text-align: center;
}
.cart-clear-btn:hover { color: #CC1010; }

/* Spinner shown while redirecting to Stripe */
.cart-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: cart-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes cart-spin { to { transform: rotate(360deg); } }
