/* ============================================================
   ShopVerse — Netflix-Style Red & Black Design System
   ============================================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- CSS Variables --- */
:root {
  /* Colors — Netflix Red & Black */
  --bg-base:       #0a0a0a;
  --bg-elevated:   #141414;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-card-opaque: rgba(20, 20, 20, 0.88);
  --bg-input:      rgba(255,255,255,0.06);

  --accent:        #E50914;
  --accent-light:  #FF1F2A;
  --accent-glow:   rgba(229,9,20,0.35);
  --accent-grad:   linear-gradient(135deg, #E50914 0%, #FF1F2A 100%);
  --accent-grad2:  linear-gradient(135deg, #b8070f 0%, #E50914 100%);

  --text-primary:  #ffffff;
  --text-secondary:#d0d0d0;
  --text-muted:    #9aa0aa;

  --border:        rgba(255,255,255,0.12);
  --border-hover:  rgba(255,255,255,0.22);
  --border-focus:  rgba(229,9,20,0.6);

  --success:       #2ecc71;
  --success-bg:    rgba(46,204,113,0.12);
  --warning:       #f59e0b;
  --warning-bg:    rgba(245,158,11,0.12);
  --error:         #ff6b6b;
  --error-bg:      rgba(255,107,107,0.12);
  --info:          #3b82f6;
  --info-bg:       rgba(59,130,246,0.12);

  /* Spacing */
  --space-xs:  4px; --space-sm: 8px; --space-md: 16px;
  --space-lg:  24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

  /* Border radius */
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
  --radius-xl: 16px; --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.6);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.7);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.8);
  --shadow-accent: 0 8px 32px rgba(229,9,20,0.4);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-med:  250ms ease;
  --t-slow: 400ms ease;
}

/* --- Base --- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229,9,20,0.15);
  transition: var(--t-med);
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.8); }

.nav-container {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 64px;
  display: flex; align-items: center; gap: var(--space-lg);
}

.nav-brand {
  display: flex; align-items: center; gap: var(--space-sm);
  flex-shrink: 1; min-width: 0;
}
.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}
.brand-icon {
  font-size: 22px;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-name {
  font-size: 18px; 
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  margin-left: var(--space-md);
  color: var(--text-muted);
  font-size: 13px;
  cursor: text;
  transition: var(--t-fast);
  min-width: 200px;
}
.header-search:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}
.header-search-placeholder {
  pointer-events: none;
}

.nav-links {
  display: flex; align-items: center; gap: var(--space-xs);
  flex: 1;
}
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: var(--t-fast);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-link--admin {
  color: var(--accent-light);
  background: rgba(229,9,20,0.1);
  border: 1px solid rgba(229,9,20,0.25);
}
.nav-link--admin:hover { background: rgba(229,9,20,0.2); color: var(--accent-light); }

.nav-actions { display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; flex-shrink: 0; }

/* Generic icon button (search) */
.nav-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  color: var(--text-secondary); transition: var(--t-fast);
  background: none; border: none; cursor: pointer;
}
.nav-icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Cart button — prominent pill */
.nav-cart-btn {
  position: relative; display: flex; align-items: center; gap: 7px;
  padding: 8px 14px 8px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary); transition: var(--t-fast);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.nav-cart-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: rgba(229,9,20,0.4);
}
.nav-cart-label { font-size: 13px; font-weight: 600; }

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--accent-grad); color: white;
  font-size: 10px; font-weight: 700;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-base);
  animation: badgePop 0.25s ease;
}
@keyframes badgePop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* User menu */
.nav-user { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 6px 12px 6px 6px; border-radius: var(--radius-full);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px; font-weight: 500;
  transition: var(--t-fast); cursor: pointer;
}
.nav-user-btn:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.user-avatar {
  width: 28px; height: 28px; border-radius: var(--radius-full);
  background: var(--accent-grad); color: white;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px; padding: var(--space-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--t-med);
}
.nav-user.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item {
  display: block; width: 100%;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-align: left; transition: var(--t-fast); cursor: pointer;
}
.dropdown-item:hover { background: var(--bg-card); color: var(--text-primary); }
.dropdown-item--danger { color: var(--error); }
.dropdown-item--danger:hover { background: var(--error-bg); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.mobile-menu-btn { display: none; flex-shrink: 0; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(10,10,10,0.98);
  border-bottom: 1px solid rgba(229,9,20,0.2);
  backdrop-filter: blur(24px);
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 99;
}
.search-overlay.open {
  transform: translateY(0);
  opacity: 1; visibility: visible;
}
.search-overlay-inner {
  max-width: 860px; margin: 0 auto;
  padding: 20px var(--space-lg) 16px;
}
.search-overlay-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(229,9,20,0.35);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: 0 0 0 3px rgba(229,9,20,0.08);
}
.search-overlay-icon { color: var(--text-muted); flex-shrink: 0; }
.search-overlay-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 17px; font-weight: 400;
  font-family: var(--font);
}
.search-overlay-input::placeholder { color: var(--text-muted); }
/* hide browser's native X in search input */
.search-overlay-input::-webkit-search-cancel-button { display: none; }

.search-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  flex-shrink: 0;
}
@media (max-width: 600px) { .search-kbd { display: none; } }

.search-overlay-close {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  cursor: pointer; flex-shrink: 0; transition: var(--t-fast);
  border: none;
}
.search-overlay-close:hover { background: var(--error-bg); color: var(--error); }

/* Search results panel */
.search-results {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 360px; overflow-y: auto;
  padding-bottom: 4px;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--radius-md);
  cursor: pointer; transition: var(--t-fast);
  text-decoration: none; color: inherit;
}
.search-result-item:hover {
  background: rgba(229,9,20,0.08);
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}
.search-result-img {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg-elevated); flex-shrink: 0;
}
.search-result-placeholder {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-name mark {
  background: none; color: var(--accent-light); font-weight: 700;
}
.search-result-cat { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.search-result-price {
  font-size: 14px; font-weight: 800; color: var(--text-primary);
  flex-shrink: 0;
}
.search-no-results {
  text-align: center; padding: var(--space-xl) 0;
  color: var(--text-muted); font-size: 14px;
}
.search-no-results span { font-size: 32px; display: block; margin-bottom: 8px; }
.search-hint {
  font-size: 12px; color: var(--text-muted);
  text-align: center; padding: 10px 0 4px;
  border-top: 1px solid var(--border); margin-top: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  transition: var(--t-fast); cursor: pointer; border: none;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: white; opacity: 0;
  transition: opacity 150ms;
}
.btn:active::after { opacity: 0.08; }

.btn-primary {
  background: var(--accent-grad);
  color: white; box-shadow: var(--shadow-accent);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(229,9,20,0.5);
}

.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.15); }

.btn-outline {
  background: transparent; color: var(--accent-light);
  border: 1px solid rgba(229,9,20,0.5);
}
.btn-outline:hover:not(:disabled) { background: rgba(229,9,20,0.1); border-color: var(--accent); }

.btn-danger {
  background: var(--error-bg); color: var(--error);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.2); }

.btn-success {
  background: var(--success-bg); color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover:not(:disabled) { background: rgba(16,185,129,0.2); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.02em; text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 14px; font-weight: 400;
  transition: var(--t-fast); outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-elevated); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--error); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t-med);
}
.card:hover { border-color: rgba(255,255,255,0.14); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-body { padding: var(--space-lg); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-pending  { background: var(--warning-bg); color: var(--warning); }
.badge-success  { background: var(--success-bg); color: var(--success); }
.badge-info     { background: var(--info-bg); color: var(--info); }
.badge-error    { background: var(--error-bg); color: var(--error); }
.badge-muted    { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ============================================================
   LOADING & STATES
   ============================================================ */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: var(--space-lg); color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center; padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: var(--space-md); }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: var(--space-lg); }

.error-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: var(--space-lg); text-align: center;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page { max-width: 1280px; margin: 0 auto; padding: var(--space-2xl) var(--space-lg); }
.page-sm { max-width: 640px; margin: 0 auto; padding: var(--space-2xl) var(--space-lg); }
.page-md { max-width: 900px; margin: 0 auto; padding: var(--space-2xl) var(--space-lg); }

.page-header { margin-bottom: var(--space-2xl); }
.page-header h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800; letter-spacing: -1px;
  margin-bottom: 8px;
}
.page-header p { color: var(--text-secondary); font-size: 15px; }

/* ============================================================
   PRODUCT GRID & CARDS
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--bg-card-opaque);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t-med);
  display: flex; flex-direction: column;
  cursor: pointer;
}
.product-card:hover {
  border-color: rgba(229,9,20,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(229,9,20,0.15);
}

.product-img-wrapper {
  aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--bg-elevated);
  position: relative;
}
.product-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img { transform: scale(1.05); }
.product-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-elevated), rgba(229,9,20,0.06));
}

.product-badge-featured {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent-grad); color: white;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.product-badge-stock-low {
  position: absolute; top: 12px; right: 12px;
  background: var(--warning-bg); color: var(--warning);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
}
.product-badge-out {
  position: absolute; top: 12px; right: 12px;
  background: var(--error-bg); color: var(--error);
  border: 1px solid rgba(239,68,68,0.3);
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
}

.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-category {
  font-size: 11px; font-weight: 600; color: var(--accent-light);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.product-name {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-desc {
  font-size: 13px; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.product-price {
  font-size: 18px; font-weight: 800; color: var(--text-primary);
}
.product-price-symbol { font-size: 12px; vertical-align: super; font-weight: 600; color: var(--text-secondary); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: var(--space-md) var(--space-lg) var(--space-xl);
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(229,9,20,0.18) 0%, transparent 70%);
}
.hero h1 {
  font-size: clamp(26px, 4.5vw, 48px);
  font-weight: 800; letter-spacing: -2px; line-height: 1.1;
  margin-bottom: var(--space-xs);
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}
.hero h1 .gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(13px, 1.6vw, 15px); color: var(--text-secondary);
  max-width: 480px; margin: 0 auto var(--space-sm);
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.hero-actions { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none; z-index: 0;
}
.hero-orb-1 { width: 400px; height: 400px; background: rgba(229,9,20,0.18); top: -150px; right: -100px; }
.hero-orb-2 { width: 300px; height: 300px; background: rgba(180,0,10,0.12); bottom: -80px; left: -80px; }
.hero > *:not(.hero-orb) { position: relative; z-index: 1; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: rgba(8, 8, 8, 0.25);
  border-top: 1px solid rgba(229,9,20,0.25);
  border-bottom: 1px solid rgba(229,9,20,0.25);
}
.stats-bar-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px var(--space-lg);
  gap: 4px;
}
.stat-number {
  font-size: 28px; font-weight: 800;
  color: #E50914;
  letter-spacing: -0.5px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(229,9,20,0.5);
}
.stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px; height: 40px;
  background: rgba(229,9,20,0.3);
}
@media (max-width: 480px) {
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .stat-item { padding: 14px var(--space-sm); }
}

/* ============================================================
   FILTERS
   ============================================================ */
.filters-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-bottom: var(--space-xl); flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--t-fast);
}
.filter-chip:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.filter-chip.active {
  background: rgba(229,9,20,0.25); color: var(--accent-light);
  border-color: rgba(229,9,20,0.6);
}
.search-bar-wrap { flex: 1; min-width: 200px; position: relative; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.search-input {
  width: 100%; padding: 8px 14px 8px 38px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-primary);
  font-size: 14px; outline: none; transition: var(--t-fast);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-input::placeholder { color: var(--text-muted); }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  background: var(--bg-card-opaque);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; } }

.product-detail-img-wrap {
  border-radius: var(--radius-xl); overflow: hidden;
  aspect-ratio: 1 / 1; background: var(--bg-elevated);
}
.product-detail-img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-info { display: flex; flex-direction: column; gap: var(--space-md); }
.product-detail-category {
  font-size: 12px; font-weight: 700; color: var(--accent-light);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.product-detail-name {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800; letter-spacing: -0.5px; line-height: 1.2;
}
.product-detail-price {
  font-size: 32px; font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.product-detail-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }

.qty-control {
  display: flex; align-items: center; gap: var(--space-sm);
}
.qty-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t-fast);
}
.qty-btn:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.qty-value { font-size: 16px; font-weight: 700; min-width: 32px; text-align: center; }

.stock-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
}
.stock-dot { width: 8px; height: 8px; border-radius: 50%; }
.stock-dot.in  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.stock-dot.low { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.stock-dot.out { background: var(--error);   box-shadow: 0 0 6px var(--error); }

/* ============================================================
   CART
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-xl); align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-item {
  display: flex; gap: var(--space-md);
  padding: var(--space-md); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: var(--t-fast);
}
.cart-item:hover { border-color: rgba(255,255,255,0.12); }

.cart-item-img {
  width: 80px; height: 80px; border-radius: var(--radius-md);
  object-fit: cover; background: var(--bg-elevated); flex-shrink: 0;
}
.cart-item-img-placeholder {
  width: 80px; height: 80px; border-radius: var(--radius-md);
  background: var(--bg-elevated); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--text-muted);
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: 15px; font-weight: 600; }
.cart-item-price { font-size: 13px; color: var(--text-secondary); }
.cart-item-actions {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-top: auto;
}
.cart-item-total {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  flex-shrink: 0;
}
.cart-item-subtotal { font-size: 16px; font-weight: 700; }

.order-summary {
  background: var(--bg-card-opaque); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  position: sticky; top: 80px;
  backdrop-filter: blur(12px);
}
.order-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: var(--space-md); }
.summary-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 6px 0;
}
.summary-line.total {
  font-size: 18px; font-weight: 800;
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: var(--space-sm);
}
.summary-line .label { color: var(--text-secondary); }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-xl); align-items: start; }
@media (max-width: 960px) { .checkout-layout { grid-template-columns: 1fr; } }

.checkout-step {
  background: var(--bg-card-opaque); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  margin-bottom: var(--space-md);
  backdrop-filter: blur(12px);
}
.checkout-step-header {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.step-number {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.checkout-step-header h3 { font-size: 16px; font-weight: 700; }

.payment-box {
  background: linear-gradient(135deg, rgba(229,9,20,0.08), rgba(180,0,10,0.04));
  border: 1px solid rgba(229,9,20,0.25);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  margin-bottom: var(--space-md);
}
.upi-id-display {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-elevated); border: 1px solid rgba(229,9,20,0.2);
  border-radius: var(--radius-md); padding: 12px 16px;
  font-family: monospace; font-size: 16px; font-weight: 700;
  color: var(--accent-light); letter-spacing: 0.5px;
  margin: var(--space-md) 0;
}
.copy-btn {
  background: rgba(229,9,20,0.15); border: 1px solid rgba(229,9,20,0.3);
  color: var(--accent-light); padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--t-fast);
}
.copy-btn:hover { background: rgba(229,9,20,0.3); }

.payment-steps { display: flex; flex-direction: column; gap: var(--space-sm); }
.payment-step-item {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  font-size: 14px; color: var(--text-secondary);
}
.payment-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(229,9,20,0.18); color: var(--accent-light);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page {
  min-height: 80vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-xl) var(--space-md);
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(229,9,20,0.08) 0%, transparent 70%);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: var(--space-xl); }
.auth-header .auth-icon { font-size: 40px; margin-bottom: var(--space-sm); }
.auth-header h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 4px; margin-bottom: var(--space-xl); gap: 4px;
}
.auth-tab {
  padding: 8px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: var(--t-fast); text-align: center;
}
.auth-tab.active { background: var(--accent-grad); color: white; }

.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }
.auth-divider {
  display: flex; align-items: center; gap: var(--space-sm);
  color: var(--text-muted); font-size: 12px; margin: var(--space-sm) 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ============================================================
   ORDERS PAGE
   ============================================================ */
.order-card {
  background: var(--bg-card-opaque); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--t-fast);
  backdrop-filter: blur(12px);
}
.order-card:hover { border-color: rgba(255,255,255,0.12); }
.order-card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-sm);
  background: rgba(255,255,255,0.02);
}
.order-id { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.order-card-body { padding: var(--space-lg); }
.order-items-list { display: flex; flex-direction: column; gap: 8px; }
.order-item-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.order-item-row:last-child { border-bottom: none; }
.order-total-row {
  display: flex; justify-content: space-between;
  font-size: 16px; font-weight: 700;
  padding-top: var(--space-sm); margin-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-tabs {
  display: flex; gap: var(--space-sm);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}
.admin-tab {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  cursor: pointer; transition: var(--t-fast); margin-bottom: -1px;
}
.admin-tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.admin-tab:hover:not(.active) { color: var(--text-primary); }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card); color: var(--text-primary); }
.admin-table td strong { color: var(--text-primary); }

.admin-img-thumb {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg-elevated);
}

.product-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.product-form h3 { font-size: 18px; font-weight: 700; margin-bottom: var(--space-lg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.img-upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-md); text-align: center;
  cursor: pointer; transition: var(--t-fast);
  position: relative; overflow: hidden;
}
.img-upload-area:hover { border-color: var(--accent); background: rgba(229,9,20,0.05); }
.img-upload-area.dragging { border-color: var(--accent); background: rgba(229,9,20,0.1); }
.img-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-preview { max-width: 180px; max-height: 180px; border-radius: var(--radius-md); margin: 12px auto 0; object-fit: cover; }
.upload-icon { font-size: 36px; margin-bottom: var(--space-sm); }
.upload-text { font-size: 14px; color: var(--text-secondary); }
.upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.status-select {
  padding: 5px 10px; font-size: 12px; font-weight: 600;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-primary);
  cursor: pointer; outline: none;
}
.status-select:focus { border-color: var(--accent); }

/* ---- Admin Page Header ---- */
.admin-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-md); flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* ---- Stats Grid ---- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--t-med);
}
.admin-stat-card:hover {
  border-color: rgba(229,9,20,0.25);
  background: var(--bg-card-hover);
}
.admin-stat-value {
  font-size: 28px; font-weight: 800;
  letter-spacing: -1px; margin-bottom: 4px;
}
.admin-stat-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---- Admin Toolbar ---- */
.admin-toolbar {
  display: flex; align-items: center; gap: var(--space-sm);
  margin-bottom: var(--space-lg); flex-wrap: wrap;
}

/* ---- Admin Product Card Grid ---- */
.admin-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.admin-product-card {
  background: var(--bg-card-opaque);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--t-med);
  backdrop-filter: blur(12px);
}
.admin-product-card:hover {
  border-color: rgba(229,9,20,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}
.admin-product-card-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-elevated);
  overflow: hidden; position: relative;
}
.admin-product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.admin-product-card:hover .admin-product-card-img img { transform: scale(1.04); }
.admin-product-card-body {
  padding: 14px;
  display: flex; flex-direction: column;
  flex: 1; gap: 4px;
}
.admin-product-card-name {
  font-size: 14px; font-weight: 700;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text-primary);
}

/* ---- Edit Panel (slide-in from right) ---- */
.admin-edit-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: var(--t-med);
}
.admin-edit-overlay.open { opacity: 1; visibility: visible; }

.admin-edit-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 480px;
  background: var(--bg-elevated);
  border-left: 1px solid rgba(229,9,20,0.2);
  box-shadow: -16px 0 60px rgba(0,0,0,0.7);
  z-index: 401;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: var(--space-xl);
  display: flex; flex-direction: column;
}
.admin-edit-panel.open { transform: translateX(0); }

.edit-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}
.edit-panel-header h2 { font-size: 18px; font-weight: 800; }

/* Image preview in edit panel */
.edit-img-preview-wrap {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden; background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.edit-img-current {
  width: 100%; height: 100%; object-fit: cover;
}
.edit-img-placeholder {
  font-size: 56px; color: var(--text-muted);
}

/* ---- Featured Toggle Switch ---- */
.featured-toggle {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.featured-toggle input { display: none; }
.featured-toggle-track {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--border);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative; flex-shrink: 0;
  transition: background 0.2s ease;
}
.featured-toggle input:checked + .featured-toggle-track {
  background: var(--accent-grad);
  border-color: transparent;
}
.featured-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}
.featured-toggle input:checked + .featured-toggle-track .featured-toggle-thumb {
  transform: translateX(20px);
}

/* ---- Admin Order Cards ---- */
.admin-order-card {
  background: var(--bg-card-opaque);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t-fast);
  backdrop-filter: blur(12px);
}
.admin-order-card:hover { border-color: rgba(229,9,20,0.2); }

.admin-order-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  flex-wrap: wrap; gap: var(--space-sm);
}

.admin-order-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg);
}
@media (max-width: 900px) {
  .admin-order-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .admin-order-body { grid-template-columns: 1fr; }
}

.order-status-select {
  width: 100%; padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px; font-weight: 600;
  cursor: pointer; outline: none;
  transition: var(--t-fast);
}
.order-status-select:focus { border-color: var(--accent); }
.order-status-select option { background: var(--bg-elevated); }


/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  transform: translateX(120%); animation: slideIn 0.3s ease forwards;
}
.toast.removing { animation: slideOut 0.3s ease forwards; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-success { border-color: rgba(16,185,129,0.3); color: var(--success); }
.toast-error   { border-color: rgba(239,68,68,0.3); color: var(--error); }
.toast-info    { border-color: rgba(59,130,246,0.3); color: var(--info); }
.toast-text { color: var(--text-primary); flex: 1; }

@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
@keyframes slideOut { from { transform: translateX(0); } to { transform: translateX(120%); } }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--space-xl);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: var(--t-fast);
}
.modal-close:hover { background: var(--error-bg); color: var(--error); }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.footer-container {
  max-width: 1280px; margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  display: grid; grid-template-columns: 1.5fr 2fr; gap: var(--space-2xl);
}
@media (max-width: 768px) { .footer-container { grid-template-columns: 1fr; } }

.footer-brand { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-brand p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
@media (max-width: 640px) { .footer-links { grid-template-columns: repeat(2, 1fr); } }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: var(--text-muted); transition: var(--t-fast); }
.footer-col a:hover { color: var(--text-primary); }
.footer-note { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
  text-align: center; font-size: 12px; color: var(--text-muted);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.divider { border: none; border-top: 1px solid var(--border); margin: var(--space-md) 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }

/* Section heading */
.section-title {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: var(--space-lg);
}
.section-title span { color: var(--text-muted); font-weight: 400; font-size: 0.65em; margin-left: 8px; }

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

/* ── NAV ── */
@media (max-width: 768px) {
  .nav-container { padding: 0 var(--space-sm); gap: var(--space-xs); height: 56px; }
  .brand-name { font-size: 15px; }
  .brand-logo { height: 28px; }
  .header-search { display: none; }
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 56px);
    background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(20px);
    padding: var(--space-xl) var(--space-lg);
    z-index: 200; gap: var(--space-sm); overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.mobile-open .nav-link {
    font-size: 17px; padding: 14px 16px;
    border-radius: var(--radius-md);
    border-bottom: 1px solid var(--border);
  }
  .nav-actions { gap: 6px; }
  .mobile-menu-btn {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px; cursor: pointer; margin-left: 10px;
  }
  .mobile-menu-btn span {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: var(--t-med);
  }
  .mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-cart-label { display: none; }
  .nav-cart-btn { padding: 8px; }
  #nav-login { font-size: 11px; padding: 6px 10px; }
  #nav-username { display: none; }
  .nav-user-btn { padding: 2px; border-radius: var(--radius-full); }
  .nav-user-btn svg { display: none; }
}

/* ── PAGES ── */
@media (max-width: 768px) {
  .page, .page-sm, .page-md { padding: var(--space-md) var(--space-sm); }
  .page-header h1 { font-size: 22px; }
  .page-header { margin-bottom: var(--space-lg); }
}

/* ── HERO ── */
@media (max-width: 768px) {
  .hero { padding: 0 var(--space-md) var(--space-lg); }
  .hero h1 { font-size: clamp(22px, 7vw, 34px); letter-spacing: -1px; }
  .hero p { font-size: 13px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
}

/* ── FILTERS BAR ── */
@media (max-width: 768px) {
  .filters-bar {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: var(--space-xs); padding-bottom: 4px;
    scrollbar-width: none;
  }
  .filters-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; white-space: nowrap; }
  .search-bar-wrap { min-width: 160px; }
}

/* ── PRODUCT GRID ── */
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .product-info { padding: 10px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 15px; }
  .product-desc { display: none; }
  .product-footer { padding-top: 8px; }
  .product-img-placeholder { font-size: 40px; }
}
@media (max-width: 380px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── PRODUCT DETAIL ── */
@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: var(--space-lg); padding: var(--space-lg); }
  .product-detail-name { font-size: 22px; }
  .product-detail-price { font-size: 26px; }
}

/* ── CART ── */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}
@media (max-width: 480px) {
  .cart-item { flex-wrap: wrap; }
  .cart-item-img, .cart-item-img-placeholder { width: 64px; height: 64px; }
  .cart-item-total { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ── CHECKOUT ── */
@media (max-width: 960px) { .checkout-layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .upi-id-display { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; }
}

/* ── AUTH ── */
@media (max-width: 480px) {
  .auth-card { padding: var(--space-lg) var(--space-md); }
  .auth-header h2 { font-size: 22px; }
}

/* ── ORDERS ── */
@media (max-width: 480px) {
  .order-card-header { flex-direction: column; align-items: flex-start; }
  .order-item-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ── ADMIN ── */
@media (max-width: 768px) {
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex-shrink: 0; padding: 10px 14px; font-size: 13px; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-product-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-page-header { flex-direction: column; }
  .admin-table th, .admin-table td { padding: 10px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .admin-product-grid { grid-template-columns: 1fr; }
}

/* ── MODAL — bottom sheet on mobile ── */
@media (max-width: 540px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    width: 100%; max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-xl) var(--space-md);
    max-height: 90vh; overflow-y: auto;
    margin: 0;
  }
}

/* ── FOOTER ── */
@media (max-width: 768px) {
  .footer-container { grid-template-columns: 1fr; padding: var(--space-xl) var(--space-md); gap: var(--space-lg); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}

/* ── TAP TARGETS ── */
@media (max-width: 768px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .qty-btn { width: 40px; height: 40px; }
  .section-title { font-size: 18px; margin-bottom: var(--space-md); }
}

/* ============================================================
   BACKGROUND IMAGE + VIGNETTE
   ============================================================ */
.brand-bg-grid {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none;
  background-image: url('images/bg_logos.jpg');
  background-size: 45%;
  background-position: top left;
  background-repeat: repeat;
  opacity: 0.25; user-select: none;
}
.brand-bg-grid::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%, transparent 30%,
    rgba(0,0,0,0.70) 65%, rgba(0,0,0,0.94) 100%
  );
  pointer-events: none;
}
@media (max-width: 768px) { .brand-bg-grid { background-size: 80%; } }
@media (max-width: 480px)  { .brand-bg-grid { background-size: 120%; } }

/* ============================================================
   PROMOTIONAL POPUP MODAL
   ============================================================ */
.promo-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.promo-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.promo-modal-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}
.promo-modal-content {
  position: relative;
  width: min(90vw, calc(85vh * 9 / 16));
  max-width: 420px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--t-med);
  z-index: 2;
  display: block;
  background: #000;
}
.promo-modal.open .promo-modal-content {
  transform: scale(1);
}
.promo-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--t-fast);
}
.promo-modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}
.promo-modal-link {
  width: 100%;
  height: 100%;
  display: block;
}
.promo-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--t-med);
}
.promo-modal-img:hover {
  transform: scale(1.02);
}





