/* ============================================================
   ASSETHIVE — DESIGN SYSTEM
   Serverless Digital Asset E-Commerce
   Stack: HTML5 + CSS3 + CSS Variables + Vanilla JS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&display=swap');

/* ============================================================
   1. CSS VARIABLES — LIGHT MODE (default)
   ============================================================ */
:root {
  /* Colors */
  --primary:       #2563EB;
  --primary-hover: #1D4ED8;
  --accent:        #AAFF00;
  --accent-hover:  #88CC00;
  --accent-dark:   #0a0a0a;
  --danger:        #EF4444;
  --success:       #22C55E;
  --warning:       #F59E0B;

  /* Backgrounds */
  --bg:            #F0F2F5;
  --bg-alt:        #FFFFFF;
  --surface:       #FFFFFF;
  --surface-2:     #F8FAFC;
  --surface-3:     #F1F5F9;

  /* Text */
  --text:          #050505;
  --text-2:        #2B2B2B;
  --text-3:        #525252;
  --text-invert:   #FFFFFF;

  /* Borders */
  --border:        #E2E8F0;
  --border-2:      #CBD5E1;

  /* Sidebar */
  --sidebar-bg:    #FFFFFF;
  --sidebar-border: #E2E8F0;
  --sidebar-text:  #475569;
  --sidebar-hover: rgba(37,99,235,0.08);
  --sidebar-active:#2563EB;
  --sidebar-active-bg: rgba(37,99,235,0.12);

  /* Navbar */
  --nav-bg:        rgba(255,255,255,0.95);
  --nav-border:    #E2E8F0;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:        0 4px 16px rgba(0,0,0,.08);
  --shadow-md:     0 8px 32px rgba(0,0,0,.12);
  --shadow-lg:     0 20px 60px rgba(0,0,0,.16);
  --shadow-glow:   0 0 20px rgba(170,255,0,.3);

  /* Radius */
  --radius-sm:     6px;
  --radius:        12px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-full:   9999px;

  /* Spacing */
  --sidebar-w:     220px;
  --nav-h:         64px;

  /* Transitions */
  --transition:    all .25s cubic-bezier(.4,0,.2,1);
  --transition-fast: all .15s ease;

  /* Typography */
  --font-primary:  'Inter', system-ui, sans-serif;
  --font-display:  'Outfit', 'Inter', sans-serif;
}

/* ============================================================
   2. DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg:            #080C14;
  --bg-alt:        #0F172A;
  --surface:       #141D2E;
  --surface-2:     #1E293B;
  --surface-3:     #263348;

  --text:          #F1F5F9;
  --text-2:        #CBD5E1;
  --text-3:        #64748B;
  --text-invert:   #0F172A;

  --border:        #1E293B;
  --border-2:      #263348;

  --sidebar-bg:    #0A1020;
  --sidebar-border: #1E293B;
  --sidebar-text:  #94A3B8;
  --sidebar-hover: rgba(170,255,0,0.08);
  --sidebar-active:#AAFF00;
  --sidebar-active-bg: rgba(170,255,0,0.12);
  --nav-bg:        rgba(8,12,20,0.95);
  --nav-border:    #1E293B;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.3);
  --shadow:        0 4px 16px rgba(0,0,0,.4);
  --shadow-md:     0 8px 32px rgba(0,0,0,.5);
  --shadow-lg:     0 20px 60px rgba(0,0,0,.6);
}

/* ============================================================
   3. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  outline: none;
  border: none;
}
ul, ol { list-style: none; }

/* ============================================================
   4. LAYOUT — SIDEBAR + MAIN
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #1E293B transparent;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 2px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-icon svg { width: 18px; height: 18px; }

.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
}

.sidebar-logo-text span { color: var(--accent); }

/* Nav links */
.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
  margin-bottom: 2px;
  white-space: nowrap;
}

.sidebar-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .7;
}

.sidebar-nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-active);
}

.sidebar-nav-item:hover svg { opacity: 1; }

.sidebar-nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 600;
}

.sidebar-nav-item.active svg { opacity: 1; }

/* Sidebar section labels */
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(148,163,184,.5);
  padding: 12px 12px 6px;
  margin-top: 8px;
}

/* Category badges */
.sidebar-badge {
  margin-left: auto;
  background: rgba(148,163,184,.12);
  color: #64748B;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
}

.sidebar-nav-item.active .sidebar-badge {
  background: rgba(170,255,0,.2);
  color: var(--accent);
}

/* Go Pro CTA */
.sidebar-pro {
  margin: 12px;
  background: linear-gradient(135deg, #1a2740 0%, #0f172a 100%);
  border: 1px solid rgba(170,255,0,.2);
  border-radius: var(--radius);
  padding: 16px;
}

.sidebar-pro-crown {
  font-size: 22px;
  margin-bottom: 6px;
}

.sidebar-pro-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 2px;
}

.sidebar-pro-subtitle {
  font-size: 10px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.sidebar-pro-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94A3B8;
  margin-bottom: 4px;
}

.sidebar-pro-feature::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
}

.sidebar-pro-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 12px;
  transition: var(--transition-fast);
}

.sidebar-pro-btn:hover { background: var(--accent-hover); }

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   5. NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  transition: background .3s ease, border-color .3s ease;
}

/* Mobile menu button */
.menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: var(--transition-fast);
}

.menu-btn:hover { background: var(--surface-3); }
.menu-btn svg { width: 20px; height: 20px; }

/* Search */
.search-wrap {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 18px 10px 42px;
  font-size: 13.5px;
  color: var(--text);
  transition: var(--transition-fast);
}

.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(170,255,0,.12);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: var(--transition-fast);
  position: relative;
}

.nav-action-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.nav-action-btn svg { width: 20px; height: 20px; }

/* Cart badge */
.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 9px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: var(--transition-fast);
}

.theme-toggle:hover { background: var(--surface-3); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Nav links (Pricing, Sell, Help) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover { color: var(--text); background: var(--surface-3); }

/* ============================================================
   6. CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.page-body {
  padding: 32px 28px;
  flex: 1;
}

/* ============================================================
   7. HERO SECTION
   ============================================================ */
.hero {
  background: var(--surface-invert, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 52px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(170,255,0,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 20%, rgba(37,99,235,.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Grid texture */
.hero::after {
  content: '';
  position: absolute;
  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: 40px 40px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(170,255,0,.12);
  border: 1px solid rgba(170,255,0,.25);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title span {
  color: var(--accent);
  -webkit-text-stroke: 0;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-family: var(--font-display);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 400px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1;
}

.hero-mockup {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.hero-mockup-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
  height: 100%;
}

.hero-mini-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-mini-thumb {
  height: 52px;
  background: linear-gradient(135deg, rgba(170,255,0,.15), rgba(37,99,235,.2));
  border-radius: 4px;
}

.hero-mini-title {
  width: 70%;
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
}

.hero-mini-price {
  width: 40%;
  height: 14px;
  background: var(--accent);
  border-radius: 3px;
}

/* Hero floating tags */
.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-tag {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #94A3B8;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ============================================================
   8. SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.section-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.section-title .asterisk {
  color: var(--accent);
  font-size: 22px;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: var(--transition-fast);
}

.view-all:hover { color: var(--accent); }
.view-all svg { width: 14px; height: 14px; }

/* ============================================================
   9. PRODUCT GRID
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

/* PRODUCT CARD */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-2);
}

.product-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-3);
}

.product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .product-thumb {
  transform: scale(1.05);
}

/* Gradient overlay on thumb */
.product-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}

.product-card:hover .product-thumb-overlay { opacity: 1; }

/* Bookmark btn */
.product-bookmark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 2;
  color: #fff;
  opacity: 0;
}

.product-bookmark svg { width: 14px; height: 14px; }
.product-card:hover .product-bookmark { opacity: 1; }
.product-bookmark:hover { background: var(--accent); color: #0a0a0a; }

/* Category badge on thumb */
.product-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}

/* Thumbnail placeholder */
.product-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

/* Card body */
.product-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-creator {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.product-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-2);
}

.product-rating svg {
  width: 12px;
  height: 12px;
  color: #F59E0B;
  fill: #F59E0B;
}

.product-sales {
  font-size: 10px;
  color: var(--text-3);
}

.product-price-tag {
  background: var(--accent);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
}

.product-price-tag.free {
  background: #22C55E;
  color: #fff;
}

/* ============================================================
   10. CATEGORY GRID
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  border-color: var(--accent);
  background: rgba(170,255,0,.04);
  transform: translateY(-2px);
}

.category-card-icon {
  font-size: 26px;
  margin-bottom: 8px;
  display: block;
}

.category-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.category-card-count {
  font-size: 10px;
  color: var(--text-3);
}

.category-card .cat-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--surface-3);
  border-radius: 50%;
  margin-top: 8px;
  transition: var(--transition-fast);
}

.category-card:hover .cat-arrow {
  background: var(--accent);
  color: #0a0a0a;
}

/* ============================================================
   11. TRUST BAR
   ============================================================ */
.trust-bar {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.trust-item + .trust-item {
  border-left: 1px solid var(--border);
}

.trust-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.trust-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.trust-desc {
  font-size: 11px;
  color: var(--text-3);
}

/* ============================================================
   12. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-primary);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  line-height: 1;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255,255,255,.25);
}

.btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.4);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-surface {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-surface:hover {
  background: var(--surface-3);
  border-color: var(--border-2);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover { opacity: .9; }

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-full { width: 100%; }

/* ============================================================
   13. BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-accent { background: rgba(170,255,0,.15); color: var(--accent); border: 1px solid rgba(170,255,0,.25); }
.badge-primary { background: rgba(37,99,235,.12); color: var(--primary); border: 1px solid rgba(37,99,235,.2); }
.badge-success { background: rgba(34,197,94,.12); color: var(--success); border: 1px solid rgba(34,197,94,.2); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); border: 1px solid rgba(245,158,11,.2); }
.badge-danger { background: rgba(239,68,68,.12); color: var(--danger); border: 1px solid rgba(239,68,68,.2); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }

/* ============================================================
   14. PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.product-gallery {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--surface-3);
  position: relative;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

/* Product info card */
.product-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.product-info-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.product-info-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
}

.product-info-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-2);
}

.product-info-creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #0a0a0a;
}

.product-info-stats {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.product-stat {
  text-align: center;
}

.product-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.product-stat-key {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
}

.product-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.product-price sup {
  font-size: 16px;
  font-weight: 600;
  vertical-align: top;
  margin-top: 8px;
  display: inline-block;
  color: var(--text-2);
}

.product-price-orig {
  font-size: 15px;
  color: var(--text-3);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.product-feature-item svg {
  width: 14px;
  height: 14px;
  color: var(--success);
  flex-shrink: 0;
}

/* ============================================================
   15. CART PAGE
   ============================================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition-fast);
}

.cart-item-card:hover { border-color: var(--border-2); }

.cart-item-thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-info { flex: 1; }

.cart-item-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.cart-item-creator {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.cart-item-remove {
  font-size: 12px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.cart-item-remove:hover { opacity: .7; }
.cart-item-remove svg { width: 12px; height: 12px; }

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Order Summary card */
.order-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.order-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-2);
  padding: 7px 0;
}

.summary-row.total {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 14px;
}

.summary-row.total .amount {
  color: var(--accent);
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--text-3);
}

.secure-badge svg { width: 13px; height: 13px; color: var(--success); }

/* Empty cart */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state-icon { font-size: 56px; margin-bottom: 16px; }

.empty-state-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 24px;
}

/* ============================================================
   16. CHECKOUT PAGE
   ============================================================ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 16px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition-fast);
}

.form-control::placeholder { color: var(--text-3); }

.form-control:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(170,255,0,.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ============================================================
   17. PAYMENT PAGE
   ============================================================ */
.payment-container {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.payment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 16px;
}

.payment-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.payment-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
}

.qris-wrap {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 auto 20px;
  display: inline-block;
  width: 200px;
}

.qris-placeholder {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #94A3B8;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.qris-placeholder::before,
.qris-placeholder::after {
  content: '';
  position: absolute;
  background: var(--accent);
}

.qris-placeholder::before {
  top: 10px; left: 10px;
  width: 30px; height: 30px;
  border: 4px solid var(--accent);
  background: transparent;
  border-radius: 4px;
}

.qris-placeholder::after {
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border: 4px solid var(--accent);
  background: transparent;
  border-radius: 4px;
}

.payment-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.payment-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--warning);
  font-weight: 600;
  margin-bottom: 20px;
}

.payment-timer svg { width: 16px; height: 16px; }

.payment-steps {
  text-align: left;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.payment-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.payment-step:last-child { margin-bottom: 0; }

.payment-step-num {
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.payment-step-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  padding-top: 2px;
}

.payment-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--warning);
  border-radius: 50%;
  animation: pulse-anim 1.5s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

/* ============================================================
   18. SUCCESS PAGE
   ============================================================ */
.success-container {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.success-icon-wrap {
  width: 90px;
  height: 90px;
  background: rgba(34,197,94,.12);
  border: 2px solid rgba(34,197,94,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scale-in .5s cubic-bezier(.34,1.56,.64,1) both;
}

.success-icon-wrap svg {
  width: 44px;
  height: 44px;
  color: var(--success);
}

@keyframes scale-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 32px;
  line-height: 1.6;
}

.download-card {
  background: var(--surface);
  border: 1.5px solid rgba(170,255,0,.25);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.download-item + .download-item {
  border-top: 1px solid var(--border);
}

.download-item-icon {
  width: 44px;
  height: 44px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.download-item-info { flex: 1; text-align: left; }

.download-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.download-item-meta {
  font-size: 11px;
  color: var(--text-3);
}

/* ============================================================
   19. ADMIN PANEL
   ============================================================ */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.stat-card-icon.green { background: rgba(34,197,94,.1); }
.stat-card-icon.blue { background: rgba(37,99,235,.1); }
.stat-card-icon.yellow { background: rgba(170,255,0,.1); }
.stat-card-icon.orange { background: rgba(245,158,11,.1); }

.stat-card-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.stat-card-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
}

.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }

/* Data table */
.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.data-table-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 24px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover { background: var(--surface-2); }

/* ============================================================
   20. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: all .3s cubic-bezier(.4,0,.2,1);
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: var(--transition-fast);
}

.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   21. TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .3s cubic-bezier(.34,1.56,.64,1) both;
  min-width: 280px;
  max-width: 360px;
}

.toast.removing {
  animation: toast-out .25s ease both;
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.toast.success .toast-icon { background: rgba(34,197,94,.12); }
.toast.error .toast-icon { background: rgba(239,68,68,.12); }
.toast.info .toast-icon { background: rgba(37,99,235,.12); }

.toast-msg {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* ============================================================
   22. BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
}

.breadcrumb-sep { opacity: .4; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ============================================================
   23. PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 28px;
}

.page-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

.page-header-desc {
  font-size: 14px;
  color: var(--text-3);
}

/* ============================================================
   24. FOOTER
   ============================================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 28px 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.7;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-2);
  margin-bottom: 14px;
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-link {
  font-size: 13px;
  color: var(--text-3);
  transition: var(--transition-fast);
}

.footer-link:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}

/* ============================================================
   25. SKELETON LOADER
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  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; }
}

/* ============================================================
   26. TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  transition: var(--transition-fast);
  text-align: center;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) { color: var(--text-2); }

/* ============================================================
   27. SIDEBAR OVERLAY (mobile)
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ============================================================
   28. SEARCH DROPDOWN
   ============================================================ */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  overflow: hidden;
  display: none;
}

.search-dropdown.show { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.search-result-item:hover { background: var(--surface-3); }

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.search-result-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.search-result-cat {
  font-size: 11px;
  color: var(--text-3);
}

.search-result-price {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   29. RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 180px 1fr 1fr; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-220px);
    width: 220px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show { display: block; }

  .main-content { margin-left: 0; }

  .menu-btn { display: flex; }

  .product-grid { grid-template-columns: repeat(3, 1fr); }

  .product-detail-grid { grid-template-columns: 1fr; }
  .product-info-card { position: static; }

  .cart-layout { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }

  .checkout-layout { grid-template-columns: 1fr; }

  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: 36px 32px; }
  .hero-visual { display: none; }
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .trust-bar { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: none; border-top: 1px solid var(--border); }
  .hero { min-height: auto; padding: 28px 24px; }
  .hero-title { font-size: 26px; }
  .nav-links { display: none; }
  .search-wrap { max-width: 100%; }
  .page-body { padding: 20px 16px; }
  .navbar { padding: 0 16px; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .data-table th, .data-table td { padding: 12px 16px; }
}

/* ============================================================
   30. UTILITIES
   ============================================================ */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-3); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.font-display { font-family: var(--font-display); }
.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; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-thumb-img {
  transform: scale(1.05);
}

/* Sidebar Collapsed State (Desktop) */
body.sidebar-collapsed {
  --sidebar-w: 0px;
}
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .main-content {
  margin-left: 0;
}

/* ============================================================
   31. MODAL SYSTEM
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(170,255,0,.05);
  transform: translateY(20px) scale(.97);
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  overflow: hidden;
}

.modal-overlay.show .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ============================================================
   32. TAG INPUT COMPONENT
   ============================================================ */
.tag-input-wrap {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: text;
  transition: var(--transition-fast);
}

.tag-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(170,255,0,.1);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(170,255,0,.12);
  color: var(--accent);
  border: 1px solid rgba(170,255,0,.25);
  border-radius: var(--radius-full);
  padding: 2px 10px 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.tag-chip-remove {
  cursor: pointer;
  opacity: .7;
  font-size: 14px;
  line-height: 1;
  transition: opacity .15s;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}
.tag-chip-remove:hover { opacity: 1; }

.tag-input-field {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  flex: 1;
  min-width: 100px;
  padding: 2px 0;
}

/* ============================================================
   33. IMAGE PREVIEW COMPONENT
   ============================================================ */
.img-preview-wrap {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  transition: var(--transition-fast);
}

.img-preview-wrap.has-image {
  border-style: solid;
  border-color: var(--accent);
}

.img-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-preview-placeholder {
  text-align: center;
  color: var(--text-3);
}

.img-preview-placeholder svg {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  opacity: .5;
}

.img-preview-placeholder p {
  font-size: 12px;
}

/* ============================================================
   34. SECTION DIVIDER IN FORMS
   ============================================================ */
.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--accent);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   35. STATUS TOGGLE SWITCH
   ============================================================ */
.switch-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  transition: .3s;
  cursor: pointer;
  border: 1px solid var(--border-2);
}

.switch-slider:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-3);
  border-radius: 50%;
  transition: .3s;
}

.switch input:checked + .switch-slider { background: rgba(170,255,0,.2); border-color: var(--accent); }
.switch input:checked + .switch-slider:before { transform: translateX(18px); background: var(--accent); }

@media (max-width: 640px) {
  .modal { max-height: 95vh; }
  .modal-body { padding: 16px; }
  .modal-header, .modal-footer { padding: 14px 16px; }
}
