/* =============================================
   DIGITALSTORE - Main Stylesheet
   Design: Clean Dark Premium
   ============================================= */



:root {
  /* Backgrounds — deeper, cleaner layers */
  --bg-primary:    #0d1b2a;
  --bg-secondary:  #112236;
  --bg-card:       #163045;
  --bg-card-hover: #1a3a52;
  --bg-glass:      rgba(135,206,250,0.05);
  --bg-glass-hover:rgba(135,206,250,0.09);

  /* Accents — slightly cooler violet + cyan stay, but more refined */
  --accent-1:      #7dd3fc;
  --accent-2:      #f9a8d4;
  --accent-3:      #fda4af;
  --accent-gold:   #fcd34d;
  --accent-green:  #86efac;

  /* Gradients */
  --gradient-main:  linear-gradient(135deg, #7dd3fc 0%, #f9a8d4 100%);
  --gradient-card:  linear-gradient(135deg, rgba(125,211,252,.08) 0%, rgba(249,168,212,.05) 100%);
  --gradient-text:  linear-gradient(135deg, #7dd3fc, #f9a8d4);
  --gradient-hot:   linear-gradient(135deg, #fda4af, #fcd34d);

  /* Text — higher contrast, cleaner hierarchy */
  --text-primary:   #e0f2fe;
  --text-secondary: #93c5fd;
  --text-muted:     #4a7a9b;

  /* Borders */
  --border:         rgba(125,211,252,0.12);
  --border-accent:  rgba(125,211,252,0.35);
  --border-glow:    rgba(125,211,252,0.55);

  /* Shadows */
  --shadow-sm:   0 1px 6px rgba(0,0,0,.45);
  --shadow-md:   0 6px 28px rgba(0,0,0,.5);
  --shadow-lg:   0 16px 56px rgba(0,0,0,.6);
  --shadow-glow: 0 0 28px rgba(125,211,252,.22);
  --shadow-glow-cyan: 0 0 28px rgba(249,168,212,.18);

  /* Radii */
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Typography — single family, clean scale */
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  /* Type scale */
  --text-xs:   0.72rem;   /* 11.5px — labels, tags */
  --text-sm:   0.825rem;  /* 13.2px — meta, helper */
  --text-base: 0.9rem;    /* 14.4px — body copy */
  --text-md:   1rem;      /* 16px   — default */
  --text-lg:   1.125rem;  /* 18px   — lead */
  --text-xl:   1.35rem;   /* 21.6px — card titles */
  --text-2xl:  1.75rem;   /* 28px   — page titles */
  --text-3xl:  2.25rem;   /* 36px   — section titles */

  /* Transitions */
  --transition:        all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-fast:   all 0.14s ease;
  --transition-bounce: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-1) var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Subtle grid texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* =============================================
   NAVBAR
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,27,42,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-brand .brand-icon {
  width: 34px;
  height: 34px;
  background: var(--gradient-main);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.nav-brand .brand-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  letter-spacing: 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-cart {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.05rem;
}

.nav-cart:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  background: var(--accent-3);
  color: white;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  border: 2px solid var(--border-accent);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 195px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.45rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.nav-user:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.09);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 3px 16px rgba(125,211,252,.38);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(125,211,252,.55);
}

.btn-outline {
  background: transparent;
  color: var(--accent-1);
  border: 1px solid var(--border-accent);
}

.btn-outline:hover {
  background: rgba(125,211,252,.09);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.btn-danger {
  background: rgba(248,113,113,.12);
  color: var(--accent-3);
  border: 1px solid rgba(248,113,113,.28);
}

.btn-danger:hover {
  background: var(--accent-3);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: var(--text-sm);
  border-radius: 8px;
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: var(--text-md);
  border-radius: var(--radius-md);
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* =============================================
   CARDS
   ============================================= */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* =============================================
   PRODUCT CARDS
   ============================================= */

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.product-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-5px);
}

.product-card:hover::before { opacity: 1; }

.product-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.04);
}

.product-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card-hover) 100%);
  font-size: 2.8rem;
  color: var(--text-muted);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-featured {
  background: var(--gradient-main);
  color: white;
}

.badge-sale {
  background: var(--gradient-hot);
  color: white;
}

.badge-new {
  background: rgba(52,211,153,.18);
  color: var(--accent-green);
  border: 1px solid rgba(52,211,153,.35);
}

.product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 0;
  transform: translateX(8px);
  transition: var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,27,42,.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  cursor: pointer;
}

.action-btn:hover {
  background: var(--accent-1);
  color: white;
  border-color: var(--accent-1);
}

.action-btn.wishlisted {
  background: rgba(248,113,113,.18);
  color: var(--accent-3);
  border-color: rgba(248,113,113,.38);
}

.product-info {
  padding: 1.15rem;
  position: relative;
  z-index: 1;
}

.product-category {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--accent-2);
  margin-bottom: 0.35rem;
}

.product-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.55rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.02em;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.product-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stars { display: flex; gap: 1px; }
.star { font-size: 0.8rem; }
.star.filled { color: var(--accent-gold); }
.star.half   { color: var(--accent-gold); opacity: 0.55; }
.star.empty  { color: var(--text-muted); }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price { display: flex; flex-direction: column; }

.price-current {
  font-size: var(--text-xl);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.price-original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
  margin-top: 1px;
}

.btn-add-cart {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-main);
  border: none;
  border-radius: 9px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: 0 3px 12px rgba(125,211,252,.38);
  flex-shrink: 0;
}

.btn-add-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 18px rgba(125,211,252,.55);
}

/* =============================================
   FORMS
   ============================================= */

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: var(--transition);
  outline: none;
  line-height: 1.5;
}

.form-control:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(125,211,252,.12);
  background: var(--bg-card);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control option { background: var(--bg-card); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.65;
}

.input-icon {
  position: relative;
}

.input-icon .form-control { padding-left: 2.65rem; }

.input-icon .icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-text  { font-size: var(--text-sm); color: var(--text-muted); margin-top: 0.35rem; }
.form-error { font-size: var(--text-sm); color: var(--accent-3);   margin-top: 0.35rem; }

/* =============================================
   ALERTS
   ============================================= */

.alert {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.alert-success {
  background: rgba(52,211,153,.09);
  border: 1px solid rgba(52,211,153,.25);
  color: var(--accent-green);
}

.alert-error {
  background: rgba(248,113,113,.09);
  border: 1px solid rgba(248,113,113,.25);
  color: var(--accent-3);
}

.alert-info {
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.22);
  color: var(--accent-2);
}

.alert-warning {
  background: rgba(244,197,66,.08);
  border: 1px solid rgba(244,197,66,.22);
  color: var(--accent-gold);
}

/* =============================================
   BADGES & TAGS
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1;
}

.badge-primary {
  background: rgba(125,211,252,.14);
  color: var(--accent-1);
  border: 1px solid rgba(125,211,252,.28);
}

.badge-success {
  background: rgba(52,211,153,.13);
  color: var(--accent-green);
  border: 1px solid rgba(52,211,153,.28);
}

.badge-danger {
  background: rgba(248,113,113,.13);
  color: var(--accent-3);
  border: 1px solid rgba(248,113,113,.28);
}

.badge-warning {
  background: rgba(244,197,66,.1);
  color: var(--accent-gold);
  border: 1px solid rgba(244,197,66,.28);
}

/* =============================================
   SECTION LAYOUTS
   ============================================= */

.section {
  padding: 5rem 0;
  position: relative;
  z-index: 1;
}

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

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.7rem;
  display: block;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.section-title span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-top: 0.7rem;
  max-width: 580px;
  line-height: 1.65;
  font-weight: 400;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.13;
}

.hero-orb-1 {
  width: 560px;
  height: 560px;
  background: var(--accent-1);
  top: -180px;
  right: -80px;
  animation: float 9s ease-in-out infinite;
}

.hero-orb-2 {
  width: 380px;
  height: 380px;
  background: var(--accent-2);
  bottom: -80px;
  left: -80px;
  animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-28px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.95rem;
  background: rgba(125,211,252,.09);
  border: 1px solid rgba(125,211,252,.28);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-1);
  margin-bottom: 1.35rem;
  animation: fadeInUp 0.6s ease both;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: 1.35rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.2s both;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 2.25rem;
  margin-top: 2.75rem;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 3px;
  font-weight: 500;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   CATEGORY PILLS
   ============================================= */

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  transition: var(--transition-bounce);
}

.category-pill:hover,
.category-pill.active {
  background: rgba(125,211,252,.09);
  border-color: var(--border-accent);
  color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(125,211,252,.18);
}

/* =============================================
   PAGINATION
   ============================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 3rem;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 600;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--gradient-main);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(125,211,252,.38);
}

/* =============================================
   TABLE
   ============================================= */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 0.9rem 1.2rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 0.9rem 1.2rem;
  color: var(--text-secondary);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  line-height: 1.5;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td {
  background: var(--bg-glass);
  color: var(--text-primary);
}

/* =============================================
   STAT CARDS (Admin)
   ============================================= */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, var(--accent-color, var(--accent-1)) 0%, transparent 70%);
  opacity: 0.07;
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.stat-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-label-sm {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-change {
  font-size: var(--text-xs);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.stat-change.up   { color: var(--accent-green); }
.stat-change.down { color: var(--accent-3); }

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar {
  width: 256px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-main);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 0.85rem;
}

.nav-section {
  margin-bottom: 0.2rem;
}

.nav-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0.7rem 0.7rem 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.08rem;
}

.sidebar-link .icon { font-size: 0.95rem; width: 18px; text-align: center; }

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(125,211,252,.09);
  color: var(--accent-1);
}

.sidebar-link.active {
  background: rgba(125,211,252,.14);
  border-left: 2px solid var(--accent-1);
  padding-left: calc(0.7rem - 2px);
}

.sidebar-link .badge-count {
  margin-left: auto;
  background: rgba(125,211,252,.18);
  color: var(--accent-1);
  padding: 0.08rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
}

.main-content {
  margin-left: 256px;
  min-height: 100vh;
  background: var(--bg-primary);
}

.page-header {
  padding: 2rem 2rem 0;
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: var(--text-base);
  margin-top: 0.2rem;
}

.page-content {
  padding: 0 2rem 2rem;
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-desc {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: 1.35rem;
}

.social-links {
  display: flex;
  gap: 0.65rem;
}

.social-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent-1);
  color: white;
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-base);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  transform: scale(0.95) translateY(16px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* =============================================
   TABS
   ============================================= */

.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* =============================================
   TOAST
   ============================================= */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 270px;
  animation: slideInRight 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.toast.hiding { animation: slideOutRight 0.25s ease forwards; }

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

@keyframes slideOutRight {
  to { opacity: 0; transform: translateX(44px); }
}

.toast-success { border-left: 3px solid var(--accent-green); }
.toast-error   { border-left: 3px solid var(--accent-3); }
.toast-info    { border-left: 3px solid var(--accent-2); }

.toast-icon    { font-size: 1rem; }
.toast-message { font-size: var(--text-base); color: var(--text-primary); flex: 1; line-height: 1.45; }
.toast-close   { color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 0.15rem; }

/* =============================================
   LOADING
   ============================================= */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   SEARCH BAR
   ============================================= */

.search-bar {
  position: relative;
  max-width: 480px;
}

.search-bar .form-control {
  padding-left: 2.6rem;
  border-radius: var(--radius-full);
}

.search-bar .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar .search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.38rem 0.9rem;
  font-size: var(--text-xs);
}

/* =============================================
   PRODUCT DETAIL PAGE
   ============================================= */

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.product-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery-main {
  aspect-ratio: 16/10;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  color: var(--text-muted);
}

.purchase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .purchase-card { position: static; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .hero-title { font-size: 2.35rem; }
  .hero-stats { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =============================================
   MISC UTILITIES
   ============================================= */

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-accent    { color: var(--accent-1) !important; }
.text-cyan      { color: var(--accent-2) !important; }
.text-danger    { color: var(--accent-3) !important; }
.text-success   { color: var(--accent-green) !important; }
.text-gold      { color: var(--accent-gold) !important; }

.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-1          { gap: 0.5rem; }
.gap-2          { gap: 1rem; }
.gap-3          { gap: 1.5rem; }
.flex-wrap      { flex-wrap: wrap; }
.ml-auto        { margin-left: auto; }
.mt-1           { margin-top: 0.5rem; }
.mt-2           { margin-top: 1rem; }
.mt-3           { margin-top: 1.5rem; }
.mb-1           { margin-bottom: 0.5rem; }
.mb-2           { margin-bottom: 1rem; }
.mb-3           { margin-bottom: 1.5rem; }
.w-100          { width: 100%; }
.text-center    { text-align: center; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon  { font-size: 2.75rem; margin-bottom: 0.85rem; opacity: 0.35; }
.empty-state h3 { font-size: var(--text-md); color: var(--text-secondary); margin-bottom: 0.4rem; font-weight: 600; letter-spacing: -0.01em; }
.empty-state p  { font-size: var(--text-base); }

/* Shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-card-hover) 50%, var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
