/* ============================================================
   ResqBag — Main CSS Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --primary: #2ECC71;
  --primary-dark: #27AE60;
  --primary-glow: rgba(46, 204, 113, 0.25);
  --accent: #F39C12;
  --accent-dark: #E67E22;
  --error: #E74C3C;
  --warning: #F39C12;
  --success: #2ECC71;
  --info: #3498DB;

  --bg: #0D1117;
  --bg-2: #161B22;
  --bg-3: #1C2128;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --surface-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);

  --text: #E6EDF3;
  --text-muted: #8B949E;
  --text-faint: #484F58;

  --nav-h: 68px;
  --bnav-h: 65px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --glow-green: 0 0 24px rgba(46,204,113,0.3);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: var(--nav-h);
  padding-bottom: var(--bnav-h);
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
img { max-width: 100%; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Typography utilities ── */
.fw-600 { font-weight: 600; }
.fs-sm { font-size: 0.82rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.monospace { font-family: 'Courier New', monospace; }

/* ── Page transitions ── */
.page-fade-out { opacity: 0; transform: translateY(8px); transition: all 0.15s ease; }
.page-fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem;
  transition: all var(--transition); white-space: nowrap; cursor: pointer;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0D1117;
  box-shadow: 0 4px 16px rgba(46,204,113,0.3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,204,113,0.4); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn--glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--glass:hover { background: rgba(255,255,255,0.12); }
.btn--lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn--sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn--xs { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700; font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
}
.badge--discount { background: var(--accent); color: #0D1117; }
.badge--verified { background: rgba(46,204,113,0.2); color: var(--primary); border: 1px solid rgba(46,204,113,0.3); }
.badge--soon { background: rgba(231,76,60,0.2); color: #E74C3C; border: 1px solid rgba(231,76,60,0.3); }
.badge--success { background: rgba(46,204,113,0.15); color: var(--success); }
.badge--warning { background: rgba(243,156,18,0.15); color: var(--accent); }
.badge--error { background: rgba(231,76,60,0.15); color: var(--error); }
.badge--neutral { background: var(--surface-2); color: var(--text-muted); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ── Tags ── */
.tag {
  padding: 0.25rem 0.7rem; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted);
}

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.form-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.7rem 1rem;
  color: var(--text); font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-input::placeholder { color: var(--text-faint); }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.form-check input { margin-top: 2px; accent-color: var(--primary); }
.input-password-wrap { position: relative; }
.input-password-wrap .form-input { width: 100%; padding-right: 2.5rem; }
.password-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem;
}

/* ── Toasts ── */
.fl-toast {
  position: fixed; bottom: calc(var(--bnav-h) + 1rem); left: 50%; transform: translateX(-50%) translateY(1rem);
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-3); border: 1px solid var(--border-strong);
  color: var(--text); padding: 0.85rem 1.5rem; border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg); z-index: 9999; white-space: nowrap;
  opacity: 0; transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.fl-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.fl-toast__icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.fl-toast--success .fl-toast__icon { background: rgba(46,204,113,0.2); color: var(--success); }
.fl-toast--error .fl-toast__icon { background: rgba(231,76,60,0.2); color: var(--error); }
.fl-toast--info .fl-toast__icon { background: rgba(52,152,219,0.2); color: var(--info); }
.fl-toast--warning .fl-toast__icon { background: rgba(243,156,18,0.2); color: var(--warning); }

/* ── Confetti ── */
.confetti {
  position: fixed; top: -10px; z-index: 9999;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  from { top: -10px; opacity: 1; }
  to   { top: 105vh; opacity: 0; transform: rotate(360deg) translateX(40px); }
}

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 5rem 2rem;
}
.empty-state__icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); }

/* ── Section headings ── */
.section-title { font-size: 1.6rem; font-weight: 700; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.section-count { color: var(--text-muted); font-size: 0.9rem; }
.page-title { font-size: 1.8rem; font-weight: 800; font-family: 'Outfit', sans-serif; margin-bottom: 1.5rem; }
.page-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 2rem; }

/* ── Quantity control ── */
.qty-control {
  display: flex; align-items: center; gap: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full);
  overflow: hidden;
}
.qty-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 600; color: var(--text-muted); 
  transition: background var(--transition), color var(--transition);
}
.qty-btn:hover { background: var(--surface-hover); color: var(--text); }
.qty-val { min-width: 28px; text-align: center; font-weight: 600; font-size: 0.9rem; }

/* ── Price display ── */
.price--rescue { font-size: 1.15rem; font-weight: 800; color: var(--primary); font-family: 'Outfit', sans-serif; }
.price--original { font-size: 0.85rem; text-decoration: line-through; color: var(--text-muted); margin-left: 0.3rem; }
.price--save { font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-left: 0.4rem; background: rgba(243,156,18,0.15); padding: 0.1rem 0.4rem; border-radius: var(--radius-full); }

/* ── Veg/Non-veg indicators ── */
.veg-dot {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid white;
}
.veg-pill { font-size: 0.75rem; font-weight: 700; color: var(--primary); background: rgba(46,204,113,0.15); padding: 0.15rem 0.5rem; border-radius: var(--radius-full); }
.nonveg-pill { font-size: 0.75rem; font-weight: 700; color: #E74C3C; background: rgba(231,76,60,0.15); padding: 0.15rem 0.5rem; border-radius: var(--radius-full); }

/* ── Payment overlay ── */
.payment-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
