/* ============================================================
   SHOPVAULT — ULTRA PREMIUM DESIGN SYSTEM
   Black #0B0B0B · Red #E50914 · White #FFFFFF
   ============================================================ */

/* ─── Google Fonts already loaded in header ─── */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:     #0B0B0B;
  --bg-secondary:   #111111;
  --bg-card:        #1A1A1A;
  --bg-card-hover:  #222222;
  --bg-input:       #171717;
  --bg-overlay:     rgba(0,0,0,0.85);

  --accent:         #E50914;
  --accent-hover:   #cc0812;
  --accent-light:   rgba(229,9,20,0.12);
  --accent-glow:    0 0 24px rgba(229,9,20,0.35);

  --text-primary:   #FFFFFF;
  --text-muted:     #A0A0A0;
  --text-faint:     #505050;
  --text-link:      #E50914;

  --border:         rgba(255,255,255,0.08);
  --border-accent:  rgba(229,9,20,0.4);
  --divider:        rgba(255,255,255,0.05);

  --success:        #22c55e;
  --warning:        #f59e0b;
  --info:           #3b82f6;
  --danger:         #ef4444;

  /* Radius */
  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
  --shadow:         0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.5);
  --shadow-accent:  0 8px 32px rgba(229,9,20,0.25);

  /* Transitions */
  --trans-fast:     0.15s ease;
  --trans:          0.25s ease;
  --trans-slow:     0.4s ease;

  /* Layout */
  --max-width:      1320px;
  --header-height:  72px;
  --announcement-h: 34px;

  /* Typography */
  --font-head:      'Poppins', sans-serif;
  --font-body:      'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* announcement(34px) + header(72px) = 106px */
  padding-top: 116px;
  padding-bottom: 70px; /* mobile nav */
}

@media (min-width: 768px) { body { padding-bottom: 0; } }

a  { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Page Transition Overlay ────────────────────────────────── */
.page-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--trans);
}
.page-overlay.active { opacity: 1; pointer-events: all; }

/* ─── Announcement Bar ───────────────────────────────────────── */
.announcement-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--accent);
  height: var(--announcement-h);
  display: flex; align-items: center;
  font-size: 12px; font-weight: 500;
  color: #fff; letter-spacing: 0.02em;
}
.announcement-bar marquee { width: 100%; }

/* ─── Main Header ────────────────────────────────────────────── */
.main-header {
  position: fixed;
  top: var(--announcement-h); left: 0; right: 0; z-index: 999;
  background: var(--header-bg);       /* ✅ uses theme variable — white in light, dark in dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  transition: box-shadow var(--trans), background 0.25s ease;
}
.main-header.scrolled { box-shadow: var(--shadow-lg); }

.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--header-height);
}

/* Mobile: tighten gap so everything fits */
@media (max-width: 767px) {
  .header-inner { gap: 10px; }
  .search-wrapper { flex: 1; min-width: 0; }
}
@media (max-width: 480px) {
  .header-inner { gap: 6px; }
}

/* Logo */
.logo, .footer-logo {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
}
.logo-text {
  font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -0.5px;
}
.logo-dot { color: var(--accent); }

/* Search */
.search-wrapper { flex: 1; min-width: 0; position: relative; }

.search-form { position: relative; }

.search-inner {
  display: flex; align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.search-inner:focus-within {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}

.search-cat {
  background: var(--bg-card); color: var(--text-primary);
  border: none; border-right: 1px solid var(--border);
  padding: 0 14px; height: 46px; font-size: 13px;
  cursor: pointer; outline: none; appearance: none;
  min-width: 90px;
}
/* Hide category dropdown on mobile to save space */
@media (max-width: 767px) {
  .search-cat { display: none; }
  .search-input { font-size: 14px; }
}

.search-input {
  flex: 1; background: transparent; border: none;
  padding: 0 16px; height: 46px; font-size: 14px; color: var(--text-primary);
  outline: none;
}
.search-input::placeholder { color: var(--text-faint); }

.search-btn {
  background: var(--accent); color: #fff;
  width: 52px; height: 46px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}
.search-btn:hover { background: var(--accent-hover); }

.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 380px; overflow-y: auto;
}
.search-suggestions:not([hidden]) { display: block; }
.suggestion-item {
  padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: background var(--trans-fast);
  font-size: 14px;
}
.suggestion-item:hover { background: var(--bg-card-hover); }
.suggestion-item img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); }
.suggestion-meta { display: flex; flex-direction: column; }
.suggestion-meta small { color: var(--text-muted); font-size: 12px; }

/* Header Actions */
.header-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.action-btn {
  position: relative;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: background var(--trans-fast), color var(--trans-fast);
}
.action-btn:hover { background: var(--bg-card); color: var(--text-primary); }

.badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.header-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  object-fit: cover; border: 2px solid var(--border);
}

.user-menu-wrapper { position: relative; }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 300;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 220px;
  max-height: calc(100vh - 100px); /* Fix for cut-off on small screens */
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity var(--trans), transform var(--trans);
}
/* Beautiful scrollbar for dropdown */
.user-dropdown::-webkit-scrollbar { width: 5px; }
.user-dropdown::-webkit-scrollbar-track { background: transparent; }
.user-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.user-dropdown::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
.user-dropdown.open {
  opacity: 1; pointer-events: all; transform: translateY(0);
}
.dropdown-header {
  padding: 14px 16px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.dropdown-header strong { font-size: 14px; }
.dropdown-header small  { color: var(--text-muted); font-size: 12px; }
.user-dropdown a {
  display: block; padding: 10px 16px; font-size: 14px;
  color: var(--text-muted);
  transition: background var(--trans-fast), color var(--trans-fast);
}
.user-dropdown a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.role-link { color: var(--accent) !important; font-weight: 600; }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.logout-link { color: var(--danger) !important; }

/* ─── Category Nav ───────────────────────────────────────────── */
.category-nav {
  border-top: 1px solid var(--border);
  background: rgba(11,11,11,0.98);
}
.cat-nav-list {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.cat-nav-list::-webkit-scrollbar { display: none; }
.cat-nav-list li a {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--trans-fast), border-color var(--trans-fast);
}
.cat-nav-list li a:hover { color: var(--text-primary); border-bottom-color: var(--accent); }
.cat-nav-list li a.active { color: var(--accent); border-bottom-color: var(--accent); }
.cat-icon { font-size: 14px; }
.all-cats { color: var(--accent) !important; }

/* ─── Header Auth Buttons ─────────────────────────────────────── */
.header-signin-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.35);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--trans-fast);
  backdrop-filter: blur(6px);
  letter-spacing: 0.01em;
}
.header-signin-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
  transform: translateY(-1px);
}
[data-theme="light"] .header-signin-btn {
  color: #111; background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.25);
}
[data-theme="light"] .header-signin-btn:hover {
  background: rgba(0,0,0,0.12); border-color: rgba(0,0,0,0.4); color:#111;
}
.header-register-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--trans-fast);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(229,9,20,0.35);
}
.header-register-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229,9,20,0.5);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  border: none; cursor: pointer;
  transition: all var(--trans);
  text-decoration: none; white-space: nowrap;
}

.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-light);
}

.btn-ghost {
  background: var(--bg-card); color: var(--text-primary);
}
.btn-ghost:hover { background: var(--bg-card-hover); }

.btn-sm  { padding: 8px 16px; font-size: 13px; }
.btn-lg  { padding: 15px 32px; font-size: 16px; }
.btn-xl  { padding: 18px 40px; font-size: 16px; }
.btn-full { width: 100%; }

.btn-icon {
  width: 42px; height: 42px; padding: 0; border-radius: var(--radius-full);
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--trans), border-color var(--trans), transform var(--trans);
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

/* ─── Product Card (Attractive Floating) ────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex; flex-direction: column;
}
[data-theme="light"] .product-card { border-color: rgba(0,0,0,0.06); box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.product-card:hover {
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border-color: rgba(229,9,20,0.3);
  transform: translateY(-5px);
}
[data-theme="dark"] .product-card:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  border-color: var(--border-accent);
}

.product-card-image {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; background: #fff;
}
[data-theme="dark"] .product-card-image { background: #0f0f0f; }
.product-card-image img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 12px;
}
.product-card:hover .product-card-image img {
  transform: scale(1.08);
}

.wishlist-float-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #888;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 0;
}
[data-theme="dark"] .wishlist-float-btn {
  background: rgba(15, 15, 15, 0.75);
  color: #aaa;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.wishlist-float-btn:hover {
  transform: scale(1.15);
  color: var(--accent);
  background: #fff;
}
[data-theme="dark"] .wishlist-float-btn:hover {
  background: #222;
}
.wishlist-float-btn.wishlist-active {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Legacy support */
.product-card-overlay { display: none; }
.quick-action {
  width: 44px; height: 44px;
  background: var(--bg-primary); color: var(--text-primary);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  font-size: 18px;
}

.product-card-body {
  padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px;
}

.product-brand {
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.product-name {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-name a { color: inherit; }
.product-name a:hover { color: var(--accent); }

.product-rating {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
}
.stars { display: flex; gap: 1px; color: #f59e0b; font-size: 13px; }
.stars .empty { color: var(--text-faint); }
.stars .half { position: relative; color: var(--text-faint); }
.stars .half::after {
  content: '★'; position: absolute; left: 0; top: 0;
  color: #f59e0b; width: 50%; overflow: hidden;
}
.rating-num { color: var(--text-muted); font-weight: 500; }
.review-count { color: var(--text-faint); font-size: 11px; }

.product-price {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: auto;
}
.price-sale  { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.price-orig  { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-disc  {
  font-size: 12px; font-weight: 700; color: var(--success);
  background: rgba(34,197,94,0.12); padding: 2px 8px; border-radius: var(--radius-full);
}

.product-card-footer {
  padding: 0 14px 14px;
}

.add-to-cart-btn {
  width: 100%; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--trans-fast);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.add-to-cart-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
}

/* Product Badges */
.product-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 4px; z-index: 1;
}
.badge-pill {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-hot    { background: var(--accent); color: #fff; }
.badge-new    { background: var(--info); color: #fff; }
.badge-sale   { background: var(--warning); color: #000; }
.badge-trend  { background: linear-gradient(135deg,#7c3aed,#e50914); color: #fff; }
.badge-best   { background: #f59e0b; color: #000; }
.badge-low    { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid var(--danger); }

/* ─── Section Titles ─────────────────────────────────────────── */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.section-title h2 {
  font-family: var(--font-head); font-size: clamp(20px, 3vw, 28px); font-weight: 700;
  position: relative; padding-left: 16px;
}
.section-title h2::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 70%; background: var(--accent);
  border-radius: var(--radius-full);
}
.section-title a {
  font-size: 13px; color: var(--accent); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.section-title a:hover { text-decoration: underline; }

/* ─── Product Grid ───────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ─── Horizontal Scroll (carousel) ──────────────────────────── */
.products-scroll {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 12px;
  scrollbar-width: none;
}
.products-scroll::-webkit-scrollbar { display: none; }
.products-scroll .product-card { min-width: 220px; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 18px;
}
.form-label {
  font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em;
}
.form-control {
  width: 100%; background: var(--bg-input); color: var(--text-primary);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 14px;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none; appearance: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-control::placeholder { color: var(--text-faint); }
.form-control.error { border-color: var(--danger); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-hint  { font-size: 12px; color: var(--text-faint); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control   { cursor: pointer; }

/* ─── Glassmorphism Card ─────────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* ─── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 90px; right: 20px; z-index: 9500;
  display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 768px) { .toast-container { bottom: 24px; } }

.toast {
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); min-width: 260px;
  display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.3s ease;
}
.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: var(--danger); color: #fff; }
.toast-info    { background: var(--info); color: #fff; }
.toast-warn    { background: var(--warning); color: #000; }

@keyframes toastIn {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: translateX(0); }
}

/* cart toast */
.cart-added-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  padding: 12px 20px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity var(--trans), transform var(--trans);
  white-space: nowrap;
}
.cart-added-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: all;
}
.cart-added-toast a { color: var(--accent); text-underline-offset: 3px; }
.cart-added-toast a:hover { text-decoration: underline; }
@media (min-width: 768px) { .cart-added-toast { bottom: 24px; } }

/* Flash Messages */
.flash-message {
  position: fixed;
  /* announcement(34) + header(72) + cat-nav(44) + 8px gap = 158px */
  top: 158px;
  left: 50%; transform: translateX(-50%);
  z-index: 9998; padding: 14px 24px;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 12px;
  min-width: 300px; max-width: 600px;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
}
.flash-success { background: #16a34a; color: #fff; }
.flash-error   { background: var(--danger); color: #fff; }
.flash-info    { background: var(--info); color: #fff; }
.flash-warning { background: var(--warning); color: #000; }
.flash-close   { margin-left: auto; font-size: 16px; background: none; color: inherit; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity:0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ─── Skeleton Loaders ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.03) 50%, var(--bg-card) 75%);
  background-size: 400% 100%;
  animation: skelPulse 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skelPulse {
  0%   { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
.skel-card { height: 320px; border-radius: var(--radius); }
.skel-text  { height: 14px; margin-bottom: 8px; }
.skel-head  { height: 20px; width: 60%; margin-bottom: 12px; }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  justify-content: center; margin-top: 40px; flex-wrap: wrap;
}
.page-btn {
  min-width: 40px; height: 40px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--trans-fast); cursor: pointer;
}
.page-btn:hover  { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 12px 20px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: all var(--trans-fast); cursor: pointer;
  background: none;
}
.tab-btn.active, .tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { border-bottom-color: var(--accent); color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Tables ─────────────────────────────────────────────────── */
.data-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.data-table th {
  padding: 12px 16px; text-align: left;
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Status Badges ──────────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.status-placed     { background: rgba(59,130,246,0.15); color: var(--info); }
.status-confirmed  { background: rgba(139,92,246,0.15); color: #a78bfa; }
.status-processing { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-shipped    { background: rgba(20,184,166,0.15); color: #2dd4bf; }
.status-delivered  { background: rgba(34,197,94,0.15); color: var(--success); }
.status-cancelled  { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-returned   { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.status-pending    { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-approved   { background: rgba(34,197,94,0.15); color: var(--success); }
.status-rejected   { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-active     { background: rgba(34,197,94,0.15); color: var(--success); }
.status-inactive   { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ─── Section Spacing ────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 80px 0; }

/* ─── Sidebar Layout ─────────────────────────────────────────── */
.layout-sidebar {
  display: grid; grid-template-columns: 280px 1fr; gap: 30px;
  align-items: start;
}
@media (max-width: 992px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: block; }
}

.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.sidebar-card h4 {
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
}

/* Filter checkboxes */
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.filter-item input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* Price Range */
.price-inputs { display: flex; align-items: center; gap: 10px; }
.price-inputs input {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--text-primary); font-size: 13px; outline: none;
}
.price-inputs input:focus { border-color: var(--accent); }

/* ─── Dashboard Stats ────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all var(--trans);
}
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-accent); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--accent-light);
  color: var(--accent);
}
.stat-value { font-size: 28px; font-weight: 800; font-family: var(--font-head); }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-change {
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ─── Panel Sidebar (Admin/Seller) ───────────────────────────── */
.panel-layout {
  display: flex; min-height: 100vh;
}
.panel-side {
  width: 260px; flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column;
}
.panel-side-logo {
  padding: 24px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.panel-nav { padding: 16px 12px; flex: 1; }
.panel-nav-section { margin-bottom: 16px; }
.panel-nav-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
  padding: 0 8px 8px;
}
.panel-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted); font-weight: 500;
  transition: all var(--trans-fast); cursor: pointer;
  margin-bottom: 2px;
}
.panel-nav-item:hover {
  background: var(--bg-card-hover); color: var(--text-primary);
}
.panel-nav-item.active {
  background: var(--accent-light); color: var(--accent);
}
.panel-nav-item svg { flex-shrink: 0; opacity: 0.7; }
.panel-nav-item.active svg { opacity: 1; }

.panel-main { flex: 1; min-width: 0; }
.panel-topbar {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 16px 30px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.panel-topbar h1 {
  font-size: 20px; font-weight: 700; font-family: var(--font-head);
}
.panel-content { padding: 30px; }

/* ─── Mobile Bottom Nav ──────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 998;
  background: var(--mobile-nav-bg, rgba(17,17,17,0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0 env(safe-area-inset-bottom, 4px);
  justify-content: space-around;
}
@media (max-width: 767px) {
  .mobile-bottom-nav { display: flex; }
  /* Prevent content hidden behind bottom nav */
  body { padding-bottom: 70px; }
  /* Adjust toast position above bottom nav */
  .toast-container { bottom: 80px !important; }
  .cart-added-toast { bottom: 80px !important; }
}

.mob-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-faint); font-size: 10px; font-weight: 500;
  padding: 4px 12px; position: relative;
  transition: color var(--trans-fast);
}
.mob-nav-item.active, .mob-nav-item:hover { color: var(--accent); }
.mob-badge {
  position: absolute; top: 0; right: 6px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}

/* ─── Range Input ────────────────────────────────────────────── */
input[type=range] {
  width: 100%; accent-color: var(--accent);
  background: transparent; cursor: pointer;
}

/* ─── Newsletter Form ────────────────────────────────────────── */
.newsletter-form {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}
.newsletter-form input {
  flex: 1; min-width: 0; background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; outline: none;
}
.newsletter-form input:focus { border-color: var(--accent); }

/* ─── Trust Badges ───────────────────────────────────────────── */
.trust-badges {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px;
}
.trust-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-muted); text-align: center;
}
.trust-badge span { font-size: 22px; }

/* ─── Footer ─────────────────────────────────────────────────── */
.main-footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 60px 0 0; margin-top: auto;
}
@media (max-width: 768px) { .main-footer { padding-bottom: 70px; } }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 2fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: repeat(2,1fr); } }

.footer-col h4 {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col p { font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13px; color: var(--text-muted);
  transition: color var(--trans-fast);
}
.footer-col ul li a:hover { color: var(--accent); }

.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link {
  width: 36px; height: 36px;
  background: var(--bg-secondary); color: var(--text-muted);
  border-radius: var(--radius-full); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--trans-fast);
}
.social-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-faint);
}
.payment-icons { display: flex; gap: 8px; }
.pay-icon {
  background: var(--bg-secondary); color: var(--text-muted);
  padding: 4px 10px; border-radius: 4px; font-size: 10px;
  font-weight: 700; border: 1px solid var(--border);
}

/* ─── Quantity Control ───────────────────────────────────────── */
.qty-control {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-muted);
  transition: background var(--trans-fast), color var(--trans-fast);
}
.qty-btn:hover { background: var(--accent); color: #fff; }
.qty-num {
  width: 42px; text-align: center; font-size: 15px; font-weight: 600;
  background: transparent; border: none; color: var(--text-primary);
  outline: none;
}

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .current { color: var(--text-primary); }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.empty-icon { font-size: 64px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; font-weight: 600; }
.empty-state p  { color: var(--text-muted); max-width: 360px; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--trans);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95) translateY(-10px);
  transition: transform var(--trans);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { font-size: 20px; color: var(--text-muted); }
.modal-close:hover { color: var(--accent); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── Radio / Checkbox custom ────────────────────────────────── */
.radio-group, .check-group {
  display: flex; flex-direction: column; gap: 10px;
}
.radio-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all var(--trans-fast);
}
.radio-card:has(input:checked),
.radio-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.radio-card input { accent-color: var(--accent); }

/* ─── Step Indicator ─────────────────────────────────────────── */
.steps {
  display: flex; align-items: center; gap: 0; margin-bottom: 40px;
}
.step {
  display: flex; align-items: center; gap: 10px; flex: 1;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0; transition: all var(--trans);
}
.step.done .step-num, .step.active .step-num {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.step-label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.step.active .step-label, .step.done .step-label { color: var(--text-primary); }
.step-line {
  flex: 1; height: 2px; background: var(--border); margin: 0 10px;
}
.step.done .step-line { background: var(--accent); }

/* ─── Scrollbar custom ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Utility ────────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ULTRA PREMIUM ENHANCEMENT LAYER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─── Premium Shimmer Effect ─────────────────────────────────── */
.shimmer {
  position: relative; overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmerSlide 2s infinite;
}
@keyframes shimmerSlide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Glassmorphism Panel Upgrade ────────────────────────────── */
.glass-premium {
  background: rgba(26,26,26,0.8);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* ─── Glow Pulse (for active states, badges) ─────────────────── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(229,9,20,0.4); }
  50%       { box-shadow: 0 0 20px rgba(229,9,20,0.8); }
}
.glow-pulse { animation: glowPulse 2s ease infinite; }

/* ─── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #E50914 60%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Product Card Premium Hover ─────────────────────────────── */
.product-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(229,9,20,0.0), rgba(229,9,20,0.06));
  opacity: 0; transition: opacity var(--trans);
  /* IMPORTANT: pointer-events:none prevents blocking clicks */
  pointer-events: none;
  z-index: 0;
}
.product-card:hover::after { opacity: 1; }

.product-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(229,9,20,0.2);
}

/* ─── Section Accent Line (animated) ────────────────────────── */
.section-title h2::before {
  animation: accentGrow 0.4s ease both;
}
@keyframes accentGrow {
  from { height: 0; opacity: 0; }
  to   { height: 70%; opacity: 1; }
}

/* ─── Stat Card Glow on Hover ────────────────────────────────── */
.stat-card:hover {
  border-color: rgba(229,9,20,0.5);
  box-shadow: 0 0 0 1px rgba(229,9,20,0.1), 0 8px 32px rgba(229,9,20,0.15);
}

/* ─── Button Ripple Effect ───────────────────────────────────── */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.btn:hover::before { transform: scaleX(1); }

/* ─── PWA Install Banner ─────────────────────────────────────── */
.pwa-install-banner {
  position: fixed; bottom: 80px; left: 16px; right: 16px; z-index: 9000;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(229,9,20,0.2);
  transform: translateY(20px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  max-width: 480px;
}
@media(min-width:768px) {
  .pwa-install-banner { left: auto; right: 24px; bottom: 24px; }
}
.pwa-install-banner.show { transform: translateY(0); opacity: 1; pointer-events: all; }
.pwa-install-icon { font-size: 32px; flex-shrink: 0; }
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.pwa-install-text small  { font-size: 12px; color: var(--text-muted); }
.pwa-install-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ─── Search Suggestions Upgrade ────────────────────────────── */
.suggestion-section-title {
  padding: 8px 16px 4px;
  font-size: 10px; font-weight: 700;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em;
}
.suggestion-divider { height: 1px; background: var(--divider); margin: 4px 0; }
.suggestion-item {
  transition: background 0.1s;
}
.suggestion-item:hover, .suggestion-item.active {
  background: var(--bg-card-hover);
}
.suggestion-item .sug-price {
  font-size: 12px; font-weight: 600; color: var(--accent);
  margin-left: auto; flex-shrink: 0;
}

/* ─── Announcement Bar Upgrade ───────────────────────────────── */
.announcement-bar {
  background: linear-gradient(90deg, #cc0812, #E50914, #cc0812);
  background-size: 200% 100%;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ─── Header Scrolled Effect ────────────────────────────── */
[data-theme="dark"]  .main-header.scrolled {
  background: rgba(11,11,11,0.98);
  box-shadow: 0 4px 30px rgba(0,0,0,0.6), 0 1px 0 rgba(229,9,20,0.3);
}
[data-theme="light"] .main-header.scrolled {
  background: rgba(255,255,255,0.99);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 1px 0 rgba(229,9,20,0.15);
}

/* ─── Product Card Image Shine ───────────────────────────────── */
.product-card-image::before {
  content: '';
  position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: 1;
}
.product-card:hover .product-card-image::before { left: 125%; }

/* ─── Category Card Premium ──────────────────────────────────── */
.cat-card {
  position: relative; overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(229,9,20,0.08), transparent 70%);
  opacity: 0; transition: opacity var(--trans);
}
.cat-card:hover::before { opacity: 1; }
.cat-icon-wrap {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.cat-card:hover .cat-icon-wrap { transform: scale(1.25); }

/* ─── Add to Cart Button Animation ──────────────────────────── */
@keyframes cartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.add-to-cart-btn:active { animation: cartPop 0.2s ease; }

/* ─── Panel Layout Improvements ──────────────────────────────── */
.panel-side {
  background: linear-gradient(180deg, var(--bg-card) 0%, #141414 100%);
}
.panel-nav-item {
  position: relative; overflow: hidden;
}
.panel-nav-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  transform: scaleY(0); transition: transform var(--trans);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.panel-nav-item.active::before { transform: scaleY(1); }

.seller-mini-stats {
  padding: 16px; border-top: 1px solid var(--border);
  display: flex; gap: 0;
}
.mini-stat {
  flex: 1; text-align: center; padding: 8px;
}
.mini-stat-val {
  display: block; font-size: 16px; font-weight: 800;
  font-family: var(--font-head);
}
.mini-stat span { font-size: 11px; color: var(--text-muted); }

/* ─── Panel Side Role Badge ──────────────────────────────────── */
.panel-side-role {
  padding: 8px 20px 16px;
  font-size: 11px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase;
}

/* ─── Admin Analytics Chart Container ───────────────────────── */
.chart-container {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

/* ─── Mobile Bottom Nav Upgrade ──────────────────────────────── */
.mobile-bottom-nav {
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.mob-nav-item {
  position: relative;
}
.mob-nav-item::after {
  content: '';
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  opacity: 0; transition: opacity var(--trans);
}
.mob-nav-item.active::after { opacity: 1; }
.mob-nav-item svg { transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1); }
.mob-nav-item:hover svg, .mob-nav-item.active svg { transform: scale(1.2); }

/* ─── Action Buttons Tooltip ─────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--bg-card); color: var(--text-primary);
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  z-index: 100;
}

/* ─── Qty Control Upgrade ────────────────────────────────────── */
.qty-btn { font-weight: 700; font-size: 20px; }

/* ─── Image Zoom Wrap (product gallery) ──────────────────────── */
.img-zoom-wrap { overflow: hidden; }
.img-zoom-wrap img { transition: transform 0.5s ease; }
.img-zoom-wrap:hover img { transform: scale(1.06); }

/* ─── Smooth Focus Rings ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Pulse Dot (Flash sales indicator) ─────────────────────── */
.pulse-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulseDot 1.5s ease infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,9,20,0.6); }
  50%       { box-shadow: 0 0 0 8px rgba(229,9,20,0); }
}

/* ─── Fade In Up Animation (scroll reveal) ───────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ─── Count Up Number ────────────────────────────────────────── */
.count-up { display: inline-block; }

/* ─── Selection Color ────────────────────────────────────────── */
::selection { background: rgba(229,9,20,0.3); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CRITICAL FIXES & MISSING COMPONENTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─── Wishlist Active State ──────────────────────────────────── */
.wishlist-active,
.quick-action.wishlist-active {
  color: var(--accent) !important;
  background: var(--accent-light) !important;
}

/* ─── Button Loader Spinner ──────────────────────────────────── */
.btn-loader {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Cart Badge Bounce ──────────────────────────────────────── */
.cart-bounce {
  animation: cartBounce 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes cartBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ─── Panel Layout Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .panel-side { 
    transform: translateX(-100%); 
    position: fixed; 
    z-index: 2000; 
    height: 100vh; 
    top: 0; 
    left: 0; 
    transition: transform 0.3s ease; 
  }
  .panel-side.open { transform: translateX(0); }
  .panel-main { margin-left: 0 !important; min-width: 0; }
  .panel-content { padding: 12px; overflow-x: hidden; max-width: 100%; }
  .panel-topbar { padding: 12px 16px; }
  .admin-hamburger, .seller-hamburger { display: flex !important; }
}

/* Sidebar Hamburger Buttons */
.admin-hamburger, .seller-hamburger { 
  display: none; 
  background: none; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 6px 10px; 
  cursor: pointer; 
  font-size: 18px; 
  color: var(--text-primary); 
  align-items: center; 
}

/* Sidebar Overlay */
.panel-overlay {
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.55); 
  z-index: 1999;
}
.panel-overlay.open { display: block; }

/* Responsive tables in panels */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }

@media (max-width: 600px) {
  .seller-mini-stats { flex-direction: column; }
  .mini-stat { border-bottom: 1px solid var(--border); padding: 12px; }
  .mini-stat:last-child { border-bottom: none; }
}

/* ─── Admin/Seller Table ─────────────────────────────────────── */
.admin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th {
  text-align: left; padding: 12px 14px;
  color: var(--text-muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border); background: var(--bg-secondary);
}
.admin-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--divider); vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg-card-hover); }
.admin-table .table-img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* ─── Status Badges ──────────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap;
}
.status-pending, .status-placed   { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.status-active, .status-approved, .status-completed, .status-cleared, .status-delivered
                                   { background: rgba(34,197,94,0.12);  color: #22c55e; }
.status-processing, .status-confirmed { background: rgba(59,130,246,0.12); color: #3b82f6; }
.status-shipped                    { background: rgba(168,85,247,0.12); color: #a855f7; }
.status-cancelled,.status-rejected,.status-suspended,.status-inactive,.status-banned
                                   { background: rgba(239,68,68,0.12);  color: #ef4444; }
.status-open                       { background: rgba(229,9,20,0.1);    color: var(--accent); }
.status-closed                     { background: rgba(80,80,80,0.2);    color: var(--text-muted); }

/* ─── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center;
}
.filter-bar select, .filter-bar input {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: 13px; outline: none;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--accent); }

/* ─── Panel Card ─────────────────────────────────────────────── */
.panel-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: all var(--trans);
}
.panel-card:hover { border-color: rgba(229,9,20,0.3); }
.panel-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-card-title  { font-size: 15px; font-weight: 700; }

/* ─── Grid Helpers ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media(max-width:900px) { .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:640px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* ─── Cart Added Toast ───────────────────────────────────────── */
.cart-added-toast {
  position: fixed; bottom: 80px; right: 20px; z-index: 8000;
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--success); border-radius: var(--radius);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  transform: translateX(calc(100% + 30px));
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.cart-added-toast.show { transform: translateX(0); }
.cart-added-toast span { color: var(--success); font-size: 18px; }
.cart-added-toast a    { color: var(--accent); font-weight: 600; margin-left: 8px; }

/* ─── Toast Container & Toast ────────────────────────────────── */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 99999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px; pointer-events: all;
}
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger);  }
.toast-info    { border-left: 3px solid var(--info);    }
.toast-warn    { border-left: 3px solid var(--warning); }

/* ─── Ripple ─────────────────────────────────────────────────── */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,0.2);
  animation: rippleAnim 0.6s linear forwards;
}
@keyframes rippleAnim { 0% { transform:scale(0);opacity:1; } 100% { transform:scale(4);opacity:0; } }

/* ─── Skeleton Loader ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeletonLoad 1.5s ease infinite; border-radius: var(--radius-sm);
}
@keyframes skeletonLoad {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Progress Bar ───────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--bg-secondary); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width 0.6s ease; }

/* ─── Info Banner ────────────────────────────────────────────── */
.info-banner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: 13px; display: flex; gap: 12px; margin-bottom: 20px;
}
.info-banner.success { border-left-color: var(--success); background: rgba(34,197,94,0.05); }
.info-banner.warning { border-left-color: var(--warning); background: rgba(245,158,11,0.05); }
.info-banner.error   { border-left-color: var(--danger);  background: rgba(239,68,68,0.05); }

/* ─── Btn xs ─────────────────────────────────────────────────── */
.btn-xs { padding: 4px 10px !important; font-size: 11px !important; }

@media(max-width: 768px) {
  /* ─── Header ─── */
  body { padding-top: 156px; }
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 8px 0; height: auto; min-height: var(--header-height); }
  .logo { flex: 1; min-width: 0; }
  .logo-tagline { display: none; }

  /* Search wrapper: beautifully integrated full-width below logo row */
  .search-wrapper { flex: 0 0 100%; order: 4; display: block !important; padding-bottom: 8px; margin-top: 4px; }
  .search-wrapper.mob-hidden { display: block !important; }
  .search-cat { display: none; } /* hide category filter on mobile */
  .search-input { height: 42px; font-size: 14px; border-radius: var(--radius-full) 0 0 var(--radius-full); padding-left: 16px; }
  .search-btn   { height: 42px; width: 48px; border-radius: 0 var(--radius-full) var(--radius-full) 0; }

  /* Header actions: push to right */
  .header-actions { order: 2; margin-left: auto; gap: 4px; }
  .action-btn { width: 38px; height: 38px; }

  /* Sign in / Register buttons */
  .btn-sm { padding: 6px 12px; font-size: 12px; }
}

@media(max-width: 480px) {
  /* ─── Logo ─── */
  .logo-round-wrap  { width: 36px !important; height: 36px !important; }
  .logo-brand { font-size: 15px !important; }
  .logo-brand-2 { font-size: 12px !important; }

  /* ─── Products grid always 2-col ─── */
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .products-scroll .product-card { min-width: 160px; }

  /* ─── Product card body tighter ─── */
  .product-card-body { padding: 10px; gap: 6px; }
  .product-name { font-size: 12px; }
  .price-sale { font-size: 14px; }
  .add-to-cart-btn { font-size: 12px; padding: 8px; }

  /* ─── Hero mobile ─── */
  .hp-slide-head { font-size: clamp(24px, 7vw, 32px) !important; }
  .hp-slide-tag { font-size: 10px; padding: 4px 10px; }
  .hp-slide-btn { padding: 12px 20px; font-size: 13px; }

  /* ─── Stats strip 2-col ─── */
  .hp-stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* ─── Bento grid compact ─── */
  .hp-bento { gap: 10px; }
  .hp-bento-card { padding: 14px; }

  /* ─── Category chips smaller ─── */
  .hp-cat-chip { padding: 6px 8px; font-size: 10px; min-width: 52px; }
  .hp-cat-chip-icon { width: 40px; height: 40px; font-size: 18px; }

  /* ─── Footer single col on tiny screens ─── */
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* ─── Newsletter form stack ─── */
  .hp-nl-form { flex-direction: column; }
  .hp-nl-input { width: 100%; text-align: center; }

  /* ─── Section padding tighter ─── */
  .hp-section { padding: 40px 0; }
  .hp-wallet-inner { padding: 24px 20px; }
  .hp-wallet-left { flex-direction: column; gap: 12px; }
  .hp-wallet-emoji { font-size: 36px; }
}
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED COMPONENTS (scroll controls, flash bars, animations)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─── Scroll Section with Controls ──────────────────────────── */
.scroll-section { position: relative; }
.scroll-ctrl {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-primary); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.scroll-ctrl:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-50%) scale(1.1); }
.scroll-prev { left: -22px; }
.scroll-next { right: -22px; }
@media(max-width: 768px) { .scroll-ctrl { display: none; } }

/* ─── Flash Sale Stock Bar ───────────────────────────────────── */
.flash-stock { margin-top: 8px; }
.flash-bar {
  height: 4px; background: var(--bg-secondary);
  border-radius: var(--radius-full); overflow: hidden; margin-bottom: 4px;
}
.flash-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff6b35);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}
.flash-stock small { font-size: 11px; color: var(--danger); font-weight: 600; }

/* ─── Stagger Children Animation ────────────────────────────── */
.stagger-children > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-children.visible > * { opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2)  { transition-delay: 0.1s;  }
.stagger-children.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4)  { transition-delay: 0.2s;  }
.stagger-children.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6)  { transition-delay: 0.3s;  }
.stagger-children.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8)  { transition-delay: 0.4s;  }

/* ─── fade-in (scroll reveal) ───────────────────────────────── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── Product Scroll Carousel ────────────────────────────────── */
.products-scroll {
  display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 0; scroll-behavior: smooth;
}
.products-scroll::-webkit-scrollbar { display: none; }
.products-scroll .product-card {
  flex-shrink: 0; width: 220px;
}
@media(max-width: 768px) {
  .products-scroll .product-card { width: 160px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRODUCTION FIXES — Missing Components & UX Corrections
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─── Star Rating Select Form ─────────────────────────────────
   Reverse-direction star selector: right-to-left so hover works */
.star-select {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  width: fit-content;
}
.star-select label {
  font-size: 32px;
  cursor: pointer;
  color: var(--text-faint);
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  padding: 2px;
}
.star-select input[type="radio"] { display: none; }
/* Hover: color this and all to its right */
.star-select label:hover,
.star-select label:hover ~ label { color: #f59e0b; transform: scale(1.1); }
/* Checked state */
.star-select input[type="radio"]:checked ~ label { color: #f59e0b; }

/* ─── Specs Table Mobile Fix ──────────────────────────────────
   Fixed 220px column breaks on narrow phones */
.spec-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr;
}
@media (max-width: 480px) {
  .spec-row {
    grid-template-columns: 1fr;
  }
  .spec-key {
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
  }
}

/* ─── Cart Mobile Layout Fix ──────────────────────────────────
   Wrap price to new row on very small screens */
@media (max-width: 480px) {
  .cart-item {
    flex-wrap: wrap;
    gap: 12px;
  }
  .cart-item-image img {
    width: 72px !important;
    height: 72px !important;
  }
  .cart-item-total {
    width: 100%;
    text-align: right;
    font-size: 15px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }
}

/* ─── Mobile Cart Summary Sticky Fix ─────────────────────────
   130px was overlapping header; correct to dynamic header height */
@media (max-width: 900px) {
  .cart-summary { position: static; }
}

/* ─── Form Group spacing ──────────────────────────────────────*/
.form-group { margin-bottom: 16px; }

/* ─── Text helpers ────────────────────────────────────────────*/
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold      { font-weight: 700; }
.fw-800       { font-weight: 800; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }

/* ─── Section title ───────────────────────────────────────────*/
.section-title { margin-bottom: 20px; }
.section-title h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  font-family: var(--font-head);
}
.section-sm { margin: 20px 0; }

/* ─── Page section ────────────────────────────────────────────*/
.section { padding: clamp(20px, 3vw, 40px) 0; }

/* ─── Breadcrumb ──────────────────────────────────────────────*/
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ─── PWA Install Banner ──────────────────────────────────────*/
.pwa-install-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  max-width: 360px;
  width: calc(100% - 32px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pwa-install-banner.show {
  transform: translateX(-50%) translateY(0);
}
.pwa-install-icon { font-size: 32px; flex-shrink: 0; }
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-text strong { display: block; font-size: 14px; font-weight: 700; }
.pwa-install-text small { font-size: 12px; color: var(--text-muted); }
.pwa-install-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (min-width: 768px) { .pwa-install-banner { bottom: 24px; } }

/* ─── Mobile bottom nav ───────────────────────────────────────*/
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
@media (min-width: 768px) { .mobile-bottom-nav { display: none; } }

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color var(--trans-fast);
}
.mob-nav-item.active,
.mob-nav-item:hover { color: var(--accent); }
.mob-nav-item.active svg { stroke: var(--accent); }
.mob-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

/* ─── Btn loader spinner ──────────────────────────────────────*/
.btn-loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Flash messages ──────────────────────────────────────────*/
.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  position: relative;
  z-index: 10;
}
.flash-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px 6px;
}
.flash-close:hover { opacity: 1; }

/* ─── Empty state ────────────────────────────────────────────*/
.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon { font-size: 56px; line-height: 1; }
.empty-state h3 { font-size: 20px; font-weight: 700; }
.empty-state p { color: var(--text-muted); font-size: 15px; max-width: 360px; }

/* ─── Page header row ────────────────────────────────────────*/
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-heading {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  font-family: var(--font-head);
}

/* ─── Coupon input fix (missing CSRF passthrough) ────────────
   Applied via JS; just ensure button doesn't clip */
#couponCode + button { flex-shrink: 0; }

/* ─── Qty control ─────────────────────────────────────────────*/
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--trans-fast), color var(--trans-fast);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--accent); color: #fff; }
.qty-num {
  width: 52px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  height: 38px;
  -moz-appearance: textfield;
}
.qty-num::-webkit-inner-spin-button,
.qty-num::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ─── Social link ─────────────────────────────────────────────*/
.social-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.social-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--trans-fast);
}
.social-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Footer ──────────────────────────────────────────────────*/
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding-bottom: 40px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 20px; }
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color var(--trans-fast); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.newsletter-form { display: flex; gap: 8px; margin-top: 12px; }
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  min-width: 0;
}
.newsletter-form .btn { flex-shrink: 0; }
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* ─── Category nav bar ───────────────────────────────────────*/
.category-nav {
  position: fixed;
  top: calc(var(--announcement-h) + var(--header-height));
  left: 0; right: 0;
  z-index: 998;
  background: var(--cat-nav-bg);
  border-bottom: 1px solid var(--border);
  height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.cat-nav-list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.cat-nav-list::-webkit-scrollbar { display: none; }
.cat-nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 44px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  border-right: 1px solid var(--divider);
  transition: color var(--trans-fast), background var(--trans-fast);
}
.cat-nav-list a:hover { color: var(--accent); background: var(--accent-light); }
.cat-nav-list .all-cats { color: var(--accent); font-weight: 600; }

/* Correct body top offset when category-nav is present */
body.has-cat-nav {
  padding-top: 160px !important; /* announcement + header + cat-nav */
}
@media (max-width: 768px) {
  body.has-cat-nav { padding-top: 200px !important; }
}

/* ─── Header sign-in / register buttons ─────────────────────*/
.header-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--trans-fast);
  white-space: nowrap;
}
.header-signin-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow-accent); }
.header-register-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--trans-fast);
  white-space: nowrap;
}
.header-register-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── User dropdown ───────────────────────────────────────────*/
.user-menu-wrapper { position: relative; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  display: none;
}
.user-dropdown.open { display: block; }
.dropdown-header {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.dropdown-header strong { display: block; font-size: 14px; font-weight: 700; }
.dropdown-header small { color: var(--text-muted); font-size: 12px; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--trans-fast);
}
.user-dropdown a:hover { background: var(--bg-card-hover); }
.user-dropdown .role-link { color: var(--accent); font-weight: 600; }
.user-dropdown .logout-link { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.header-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ─── Modals ──────────────────────────────────────────────────*/
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 18px;
  transition: all var(--trans-fast);
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── Search suggestions dropdown ────────────────────────────*/
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--trans-fast);
  font-size: 14px;
}
.search-suggestion-item:hover { background: var(--bg-card-hover); }
.search-suggestion-item img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; }

/* ─── Fix: hero search border-radius on mobile ───────────────
   Ensure search form inner shape matches pill layout */
@media (max-width: 768px) {
  .search-inner {
    border-radius: var(--radius-full);
    overflow: hidden;
  }
}

/* ─── Fix: body padding for pages WITHOUT category nav ────── */
body:not(.has-cat-nav) {
  padding-top: 116px;
}
@media (max-width: 768px) {
  body:not(.has-cat-nav) { padding-top: 156px; }
}
