/* RapiDisk — Cart Drawer & Toast */

/* Overlay */
#cartOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 300;
}
#cartOverlay.show { display: block; }

/* Drawer */
#cartDrawer {
  position: fixed; top: 0; right: -420px; width: 400px; height: 100vh;
  background: #0b0b10; border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 400; display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
}
#cartDrawer.open { right: 0; }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-header h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; color: #fff; }
.cart-header button { background: none; border: none; color: #6b7280; font-size: 1.2rem; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; transition: background 0.2s, color 0.2s; }
.cart-header button:hover { background: rgba(255,255,255,0.08); color: #fff; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.cart-empty p { color: #6b7280; margin-bottom: 16px; }
.cart-empty a { color: #00d4ff; font-size: 0.9rem; font-weight: 600; }

.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.cart-item img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #111118; padding: 4px; flex-shrink: 0; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { display: block; font-size: 0.85rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-cap  { display: block; font-size: 0.75rem; color: #6b7280; margin: 2px 0; }
.ci-price { display: block; font-size: 0.875rem; font-weight: 700; color: #00d4ff; }
.ci-qty  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ci-qty button { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #fff; width: 26px; height: 26px; border-radius: 6px; font-size: 1rem; cursor: pointer; line-height: 1; transition: background 0.2s; }
.ci-qty button:hover { background: rgba(255,255,255,0.12); }
.ci-qty span { font-size: 0.9rem; font-weight: 600; color: #fff; min-width: 20px; text-align: center; }
.ci-remove { background: none; border: none; color: #6b7280; font-size: 0.85rem; cursor: pointer; padding: 4px; flex-shrink: 0; transition: color 0.2s; }
.ci-remove:hover { color: #ef4444; }

.cart-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cart-total span:first-child { font-size: 0.9rem; color: #b0b8cc; font-weight: 500; }
.cart-total-val { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; color: #fff; }
.btn-checkout-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: 12px; background: #25D366; color: #fff;
  border: none; font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.btn-checkout-wa:hover { background: #1ebe5d; transform: translateY(-1px); }
.btn-checkout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: 12px; background: linear-gradient(135deg,#00d4ff,#7c3aed); color: #fff;
  border: none; font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.btn-checkout:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,212,255,0.3); }
.btn-checkout-email {
  padding: 12px; border-radius: 12px; background: transparent;
  border: 1px solid rgba(255,255,255,0.15); color: #b0b8cc;
  font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-checkout-email:hover { border-color: rgba(0,212,255,0.4); color: #00d4ff; }

/* Cart nav button */
.cart-btn {
  position: relative; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  color: #fff; padding: 8px 12px; cursor: pointer; display: flex;
  align-items: center; transition: background 0.2s, border-color 0.2s;
}
.cart-btn:hover { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.3); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: #00d4ff; color: #050508; width: 18px; height: 18px;
  border-radius: 50%; font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Toast */
#cartToast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #111118; border: 1px solid rgba(0,212,255,0.3);
  color: #fff; padding: 12px 24px; border-radius: 99px;
  font-size: 0.875rem; font-weight: 500; z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
#cartToast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Size picker */
.size-picker { margin-bottom: 28px; }
.size-picker h4 { font-size: 0.82rem; font-weight: 600; color: #b0b8cc; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.size-btns { display: flex; gap: 10px; }
.size-btn {
  padding: 10px 28px; border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.1);
  background: #111118; color: #b0b8cc;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.size-btn:hover { border-color: rgba(0,212,255,0.4); color: #fff; }
.size-btn.active { border-color: #00d4ff; color: #00d4ff; background: rgba(0,212,255,0.08); }
.size-btn:disabled { opacity: 0.35; cursor: not-allowed; }

@media (max-width: 480px) {
  #cartDrawer { width: 100%; right: -100%; }
}
