/* ====================================================
   CSS/cart.css — Premium Cart Dashboard
   ==================================================== */

:root {
  /* Core variables matching redeem.css */
  --ring: var(--glass-line-strong);
  --card: rgba(13, 23, 42, 0.45);
  --card-solid: #0b1324;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(99, 102, 241, 0.25);
  --card-glow: rgba(99, 102, 241, 0.15);
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  
  --brand: var(--royal-2);
  --g1: #1e1b4b; /* Deep violet black */
  --g2: #0f172a; /* Slate 900 */
  --g3: #020617; /* Slate 950 */
  --base1: #030712;
  --base2: #0a0f1c;
  --base3: #060b14;
  
  --accent: #6366f1; /* Indigo 500 */
  --accent-soft: #a5b4fc; /* Indigo 300 */
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  
  --success: #10b981; /* Emerald 500 */
  --success-glow: rgba(16, 185, 129, 0.3);
  --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  
  --btn-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 24px;
}

body.lp-page {
  color: #f1f5f9;
  background: var(--base1);
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

.muted { color: #94a3b8; margin: 0; }
.small { font-size: 13.5px; }
.success-text { color: var(--success) !important; font-weight: 700; }
.hidden { display: none !important; }

/* =============================================
   MODERN AURORA BACKGROUND
   ============================================= */
.lp-aurora.modern {
  position: fixed;
  inset: -10vmax;
  z-index: -1;
  pointer-events: none;
  background-image: url('../assets/premium-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px) brightness(0.8);
}

.lp-aurora.modern::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(3, 7, 18, 0.9) 100%);
  opacity: 1;
}

/* =============================================
   HEADER OVERRIDES (Premium Feel)
   ============================================= */
.site-header {
  background: rgba(3, 7, 18, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* =============================================
   SHELL & GRID
   ============================================= */
.cart-shell {
  padding: 100px 24px 64px;
  max-width: 1160px;
  margin: 0 auto;
}

/* Actions Row */
.cart-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: flex-start;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  color: #fff; background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-soft); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: rgba(99, 102, 241, 0.8); background: rgba(99, 102, 241, 0.15); color: #fff;
}

/* Banner */
.cart-banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px; padding: 14px 20px;
  margin-bottom: 24px; color: #fcd34d; font-size: 14px;
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.cart-banner.hidden { display: none; }
.cart-banner a { color: #fff; font-weight: 700; text-decoration: underline; }
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 12px #f59e0b; flex-shrink: 0;
}

.cart-title {
  margin: 0 0 24px;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 900; letter-spacing: -1.5px; line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-shadow: 0 12px 30px rgba(255,255,255,0.05);
  animation: heroReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.cart-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 32px;
  animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@media (max-width: 980px) { .cart-grid { grid-template-columns: 1fr; } }

/* =============================================
   CART ITEMS
   ============================================= */
.cart-items { display: grid; gap: 16px; }

.c-item {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px;
  padding: 16px; transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  position: relative; overflow: hidden;
}

.c-item::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.03), transparent 50%);
}

.c-item:hover {
  background: rgba(30, 41, 59, 0.7); border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .c-item { grid-template-columns: 80px 1fr; gap: 14px; padding: 14px; }
  .c-actions {
    grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.06); padding-top: 14px; margin-top: 4px;
  }
}

.c-thumb {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #020617);
  display: grid; place-items: center; color: #64748b; font-weight: 800; font-size: 24px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); position: relative;
}
.c-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.c-item:hover .c-thumb img { transform: scale(1.05); }

.c-body h3 {
  margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #f8fafc; letter-spacing: -0.3px;
}
.c-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #94a3b8; font-size: 13.5px;
}
.c-meta svg { color: #64748b; margin-right: 4px; vertical-align: middle; }

.badge {
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-soft); font-weight: 600; font-size: 12px; letter-spacing: 0.3px;
}

.c-actions {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 12px; height: 100%; padding-right: 4px;
}

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; overflow: hidden;
  background: rgba(15, 23, 42, 0.5); box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.qty button {
  width: 32px; height: 32px; border: 0;
  background: transparent; color: #cbd5e1; cursor: pointer; font-weight: 700; font-size: 16px;
  transition: all 0.2s;
}
.qty button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.qty input {
  width: 40px; text-align: center; border: 0; background: transparent; color: #fff; font-weight: 800; font-size: 15px; padding: 0;
}
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.price { font-weight: 900; font-size: 22px; color: #fff; letter-spacing: -0.5px; }

.remove {
  color: #ef4444; cursor: pointer; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 4px; transition: all 0.2s; opacity: 0.8;
}
.remove:hover { color: #f87171; opacity: 1; }

.c-empty {
  padding: 60px 32px; text-align: center; color: #f8fafc;
  background: rgba(15, 23, 42, 0.4); border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 24px; display: flex; flex-direction: column; align-items: center;
}
.c-empty svg { color: #64748b; }

/* Skeletons */
.c-skel {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px;
  background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px; padding: 16px;
}
.shine {
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%; animation: shine 1.5s linear infinite;
}
.c-skel .s1 { width: 100%; aspect-ratio: 1/1; border-radius: 14px; }
.c-skel .s2 { height: 20px; border-radius: 8px; width: 60%; margin-bottom: 12px; }
.c-skel .s3 { height: 14px; border-radius: 6px; width: 40%; margin-bottom: 8px; }
.c-skel .s4 { height: 14px; border-radius: 6px; width: 30%; }
@keyframes shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* =============================================
   SUMMARY SIDEBAR — Glass Receipt (Matching redeem.css)
   ============================================= */
.cart-summary {
  position: sticky; top: 100px; height: fit-content;
  border-radius: 28px; position: relative; overflow: visible;
}

.summary-glow {
  position: absolute; inset: 0; border-radius: 28px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.1) 100%);
  filter: blur(20px); z-index: 0; opacity: 0.8; transition: opacity 0.4s ease;
}

.cart-summary:hover .summary-glow { opacity: 1; filter: blur(24px); }

.summary-inner {
  position: relative; z-index: 1;
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px); border-radius: 26px; padding: 32px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 2px 10px rgba(255,255,255,0.05), 0 20px 40px rgba(0,0,0,0.4);
}

.summary-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }

.summary-title-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-gradient); color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.cart-summary h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: #f8fafc; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0 -32px 24px; }

/* Breakdown */
.sum-breakdown { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }

.sum-row { display: flex; justify-content: space-between; align-items: center; }

.sum-label { color: #94a3b8; font-size: 14.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.sum-val { color: #f8fafc; font-weight: 700; font-size: 16px; font-family: 'Inter', monospace; }

/* Total */
.sum-total-wrap {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px; padding: 20px; margin: 0 0 24px;
  position: relative; overflow: hidden;
}

.sum-total-wrap::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient);
}

.sum-row.total { font-weight: 800; font-size: 18px; color: #94a3b8; }
.sum-row.total strong {
  background: linear-gradient(180deg, #fff, #e2e8f0); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; font-size: 28px;
  font-weight: 900; letter-spacing: -1px; text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Actions */
.sum-actions { display: flex; flex-direction: column; gap: 8px; }

.btn-primary {
  padding: 12px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15);
  background: var(--accent-gradient); color: #fff; font-weight: 700; font-size: 14.5px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-primary::after {
  content: ''; position: absolute; top: -50%; left: -100%; width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 150%; }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4); transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }
.btn-primary:active { transform: translateY(1px) scale(0.98); }

.btn-checkout-lg {
  width: 100%; padding: 18px; font-size: 16px; border-radius: 16px;
  justify-content: space-between; font-weight: 800;
}

.btn-clear {
  width: 100%; padding: 12px; border-radius: 16px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.btn-clear:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }


/* =============================================
   TOASTS (Copied from redeem.css)
   ============================================= */
.lp-toasts {
  position: fixed; right: 24px; bottom: 24px;
  display: grid; gap: 12px; z-index: 9999; pointer-events: none;
}

.lp-toast {
  --bg: rgba(15, 23, 42, 0.95); --bd: rgba(255, 255, 255, 0.1); --fg: #f8fafc; --toast-accent: #6366f1;
  min-width: 300px; max-width: min(92vw, 400px);
  color: var(--fg); background: var(--bg);
  backdrop-filter: blur(24px); border: 1px solid var(--bd); border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); padding: 16px 20px;
  pointer-events: auto; animation: toastSlide 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  border-left: 4px solid var(--toast-accent); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(30px) scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

.lp-toast[data-type="success"] { --toast-accent: var(--success); }
.lp-toast[data-type="error"]   { --toast-accent: #ef4444; }
.lp-toast[data-type="warning"] { --toast-accent: #f59e0b; }

.lp-toast .icon { font-size: 20px; display: grid; place-items: center; color: var(--toast-accent); }
.lp-toast-title { font-weight: 800; font-size: 15px; color: var(--toast-accent); margin: 0 0 4px; }
.lp-toast-msg { font-size: 13.5px; color: #cbd5e1; line-height: 1.5; font-weight: 500; margin: 0; }
.lp-toast .close { background: none; border: none; color: #64748b; font-size: 20px; cursor: pointer; padding: 0; }
.lp-toast .close:hover { color: #fff; }
.lp-toast .bar { grid-column: 1/-1; height: 3px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.lp-toast .bar span { display: block; height: 100%; background: var(--toast-accent); transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { to { transform: scaleX(0); } }
