/* ==========================================================================
   CHECKERNESIA - Main Stylesheet
   Marketplace Digital Terpercaya
   ==========================================================================
   Table of Contents:
   1. CSS Variables
   2. Reset & Base
   3. Typography
   4. Layout & Containers
   5. Buttons
   6. Forms
   7. Badges & Status
   8. Navbar (Desktop + Mobile)
   9. Bottom Navigation (Mobile)
   10. Drawer / Menu
   11. Cards & Product Cards
   12. Hero
   13. Sections
   14. Footer
   15. Modals
   16. Toasts
   17. Tables
   18. Skeletons & Empty States
   19. Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg: #0B0F14;
  --surface: #11161D;
  --surface-2: #151B23;
  --surface-3: #1A212B;
  --border: #242C37;
  --border-2: #303946;
  --primary: #2563EB;
  --primary-600: #1D4ED8;
  --primary-700: #1E40AF;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --accent: #60A5FA;
  --accent-600: #3B82F6;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --info: #3B82F6;
  --info-soft: rgba(59, 130, 246, 0.12);

  --text: #F5F7FA;
  --text-2: #A8B0BC;
  --text-3: #7F8998;
  --text-4: #5F6977;

  /* Gradients (limited use: hero/CTA/highlight) */
  --grad-hero: linear-gradient(180deg, rgba(37, 99, 235, 0.055), transparent 72%);
  --grad-cta: var(--primary);
  --grad-accent: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);

  /* Typography */
  --font-base: Inter, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
  --fs-xs: 0.6875rem;   /* 11px */
  --fs-sm: 0.8125rem;   /* 13px */
  --fs-md: 0.9375rem;   /* 15px */
  --fs-lg: 1.0625rem;   /* 17px */
  --fs-xl: 1.25rem;     /* 20px */
  --fs-2xl: 1.5rem;     /* 24px */
  --fs-3xl: 1.875rem;   /* 30px */
  --fs-4xl: 2.375rem;   /* 38px */
  --fs-5xl: 3rem;       /* 48px */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 30px rgba(0, 0, 0, 0.14);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.28);

  /* Layout */
  --container-max: 1400px;
  --navbar-height: 64px;
  --bottom-nav-height: 62px;
  --sidebar-width: 250px;
  --transition: 0.2s ease;
  --transition-slow: 0.25s ease;
}

/* Light theme via data attribute */
[data-theme="light"] {
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --surface-2: #F0F4F8;
  --surface-3: #E8EDF3;
  --border: #DDE3EC;
  --border-2: #C7D0DB;
  --primary: #00A9DB;
  --primary-600: #0093BF;
  --primary-700: #007DA6;
  --primary-soft: rgba(0, 169, 219, 0.08);
  --accent: #7C4DEF;
  --accent-600: #6D3DE0;
  --accent-soft: rgba(124, 77, 239, 0.08);
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #2563EB;

  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --text-4: #94A3B8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 0 1px rgba(0, 169, 219, 0.06), 0 4px 24px rgba(0, 169, 219, 0.08);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 3000;
  padding: var(--space-3) var(--space-4);
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-md);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.icon { display: inline-block; flex: 0 0 auto; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Hide scrollbar for horizontal sections but keep scroll */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Selection */
::selection {
  background: var(--primary);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-700);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-600);
}

/* Images */
img {
  max-width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  margin-bottom: var(--space-4);
}

.text-muted { color: var(--text-2); }
.text-small { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-uppercase { text-transform: uppercase; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* --------------------------------------------------------------------------
   4. LAYOUT & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 32px, 720px);
  margin-inline: auto;
}

.section {
  padding-block: var(--space-16);
}
.section-sm {
  padding-block: var(--space-8);
}
.section-lg {
  padding-block: var(--space-24);
}

.grid {
  display: grid;
  gap: var(--space-4);
}
.form-grid-2 { grid-template-columns: 1fr; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* Page wrapper with sidebar layout */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  align-self: start;
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-4));
}
.content-main {
  min-width: 0;
}
/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-size: var(--fs-md);
  font-weight: 600;
  font-family: var(--font-base);
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Variants */
.btn-primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: none;
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-600);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
}
.btn-soft:hover {
  background: var(--primary-soft);
  filter: brightness(1.1);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(1.1);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  filter: brightness(1.1);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  filter: brightness(1.1);
  color: #fff;
}

/* Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: var(--fs-sm);
  min-height: 40px;
}
.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: var(--fs-lg);
  min-height: 52px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 0.625rem;
  width: 44px;
  height: 44px;
  min-height: 44px;
}
.btn-icon-sm {
  padding: 0.375rem;
  width: 36px;
  height: 36px;
  min-height: 36px;
}

/* Icon button (navbar actions) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Badge count on icons */
.icon-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   6. FORMS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}
.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: var(--fs-md);
  font-family: var(--font-base);
  line-height: 1.5;
  color: var(--text);
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition),
              background var(--transition);
  min-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background-color: var(--surface);
}
.form-control::placeholder {
  color: var(--text-3);
}
.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23A0AEC0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* Search input */
.search-input-wrap {
  position: relative;
  flex: 1;
}
.search-input {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 2.75rem;
  font-size: var(--fs-md);
  color: var(--text);
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 46px;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: flex;
}
.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.search-clear:hover { color: var(--text); }
.search-input:not(:placeholder-shown) ~ .search-clear { display: flex; }

/* Checkbox & radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check-label {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}

/* Form validation */
.form-control.is-invalid {
  border-color: var(--danger);
}
.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.form-error {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--danger);
}

/* Input group */
.input-group {
  display: flex;
}
.input-group .form-control {
  border-radius: 0;
  border-right: none;
}
.input-group .form-control:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.input-group .form-control:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right: 1px solid var(--border);
}
.input-group .input-group-append {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. BADGES & STATUS
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.625rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }

/* Product badges overlaid on image */
.product-badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: 2;
}
.product-badges .badge {
  box-shadow: var(--shadow-sm);
}

/* Status badges (order/payment) */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.status-pending_payment { background: var(--warning-soft); color: var(--warning); }
.status-paid { background: var(--primary-soft); color: var(--primary); }
.status-processing { background: var(--info-soft); color: var(--info); }
.status-completed { background: var(--success-soft); color: var(--success); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.status-refund_requested { background: var(--warning-soft); color: var(--warning); }
.status-refunded { background: var(--info-soft); color: var(--info); }
.status-pending { background: var(--warning-soft); color: var(--warning); }
.status-failed { background: var(--danger-soft); color: var(--danger); }
.status-expired { background: var(--text-3); color: var(--bg); }
.status-draft { background: var(--text-3); color: var(--bg); }
.status-published { background: var(--success-soft); color: var(--success); }
.status-rejected { background: var(--danger-soft); color: var(--danger); }
.status-suspended { background: var(--text-3); color: var(--bg); }
.status-verified { background: var(--success-soft); color: var(--success); }
.status-under_review { background: var(--warning-soft); color: var(--warning); }
.status-approved { background: var(--success-soft); color: var(--success); }
.status-processing { background: var(--info-soft); color: var(--info); }
/* --------------------------------------------------------------------------
   8. NAVBAR (DESKTOP + MOBILE)
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 20, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-height);
}
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-logo:hover { color: var(--text); }
.navbar-logo-img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.navbar-logo .logo-accent {
  color: var(--primary);
}

/* Desktop nav links */
.navbar-links {
  display: none;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-2);
}
.navbar-link {
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.navbar-link:hover {
  color: var(--text);
  background: var(--surface-2);
}
.navbar-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Navbar actions (right) */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  flex-shrink: 0;
}

/* Navbar search (desktop only) */
.navbar-search {
  display: none;
  flex: 1;
  max-width: 420px;
  margin-inline: var(--space-4);
}

/* User chip in navbar */
.user-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition);
}
.user-chip:hover {
  border-color: var(--primary);
}
.user-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-chip-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  max-width: 140px;
}
.user-chip-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip-balance {
  font-size: var(--fs-xs);
  color: var(--primary);
  font-weight: 600;
}

/* Hamburger menu btn (mobile) */
.navbar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
}
.navbar-toggle:hover { background: var(--surface-2); }

/* --------------------------------------------------------------------------
   9. BOTTOM NAVIGATION (MOBILE)
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(14, 19, 27, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.95);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}
.bottom-nav-item .nav-count {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   10. DRAWER / MENU
   -------------------------------------------------------------------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 1200;
  width: min(320px, 85vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open {
  transform: translateX(0);
}
.drawer.right {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
}
.drawer.right.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  min-height: var(--navbar-height);
}
.drawer-header-title {
  font-size: var(--fs-lg);
  font-weight: 700;
}
.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
}
.drawer-close:hover { background: var(--surface-2); color: var(--text); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}
.drawer-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Menu list inside drawer */
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.drawer-nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.drawer-nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.drawer-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.drawer-nav-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-3) 0;
}
.drawer-section-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   11. CARDS & PRODUCT CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-2);
}
.card-no-pad { padding: 0; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

/* Product card */
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  height: 100%;
}
.product-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-glow);
}
.product-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}
.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-card:hover .product-card-image {
  transform: scale(1.02);
}
.product-card-wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(14, 19, 27, 0.8);
  backdrop-filter: blur(4px);
  border: none;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.product-card-wishlist:hover {
  color: var(--danger);
  transform: scale(1.1);
}
.product-card-wishlist.active {
  color: var(--danger);
}
.product-card-wishlist svg {
  width: 18px;
  height: 18px;
}
.product-card-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}
.product-card-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.product-card-name a:hover {
  color: var(--primary);
}
.product-card-seller {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.product-card-seller-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.product-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.product-card-meta .rating-star {
  color: var(--warning);
}
.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  flex-wrap: wrap;
}
.product-card-price {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text);
}
.product-card-price-old {
  font-size: var(--fs-xs);
  color: var(--text-3);
  text-decoration: line-through;
}
.product-card-discount {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}
.product-card-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.product-card-actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-sm);
  min-height: 42px;
}
/* --------------------------------------------------------------------------
   12. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 9vw, 112px);
  overflow: hidden;
  background: var(--grad-hero);
}
.hero-inner {
  display: grid;
  gap: var(--space-8);
}
.hero-content {
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.875rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}
.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-2);
  margin-bottom: var(--space-6);
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.hero-stat {
  text-align: left;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
}
.wishlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-stat:last-child { border-right: 0; }
.hero-stat-value {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.hero-stat-label {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: var(--space-1);
}

/* Hero search bar */
.hero-search {
  max-width: 560px;
  margin-bottom: var(--space-6);
}
.hero-search .search-input-wrap .search-input {
  background: var(--surface);
  min-height: 52px;
  font-size: var(--fs-lg);
  padding-left: 3rem;
}

/* --------------------------------------------------------------------------
   13. SECTIONS
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
}
.section-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: var(--space-1);
}
.section-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.section-link:hover {
  text-decoration: underline;
}

/* Horizontal scroll section (categories etc.) */
.hscroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x proximity;
}
.hscroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Category card */
.category-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition);
  min-width: 180px;
  text-align: left;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.category-card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: none;
  color: var(--text);
}
.category-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card-icon svg {
  width: 26px;
  height: 26px;
}
.category-card-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.category-card-count {
  font-size: var(--fs-xs);
  color: var(--text-3);
  width: 100%;
  padding-left: 48px;
}

/* Trust cards */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.trust-card {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-4) var(--space-5);
  text-align: left;
}
.trust-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-card-icon svg { width: 24px; height: 24px; }
.trust-card-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.trust-card-desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: 1.5;
}

/* Feature list (why us) */
.feature-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.feature-item:last-child { border-bottom: none; }
.feature-item-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-item-icon svg { width: 22px; height: 22px; }
.feature-item-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.feature-item-desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* Steps (how it works) */
.steps-grid {
  display: grid;
  gap: var(--space-4);
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-cta);
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-md);
  margin-bottom: var(--space-3);
}
.step-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.step-desc {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

/* Testimonials */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.testimonial-stars {
  color: var(--warning);
  margin-bottom: var(--space-3);
}
.testimonial-text {
  font-size: var(--fs-md);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial-name {
  font-size: var(--fs-sm);
  font-weight: 700;
}
.testimonial-role {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.faq-question:hover { background: var(--surface-2); }
.faq-question-icon {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-question-icon {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 var(--space-5);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: var(--space-5);
}

/* Banner / promo */
.banner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  overflow: hidden;
}
.banner::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: var(--grad-accent);
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px);
}
.banner-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.banner-subtitle {
  font-size: var(--fs-md);
  color: var(--text-2);
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: var(--space-16);
  padding-top: var(--space-12);
}
.footer-grid {
  display: grid;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-size: var(--fs-xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
}
.footer-brand .logo-accent { color: var(--primary); }
.footer-desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
  max-width: 320px;
}
.footer-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: var(--space-4);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-link {
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.footer-link:hover { color: var(--primary); }
.footer-social {
  display: flex;
  gap: var(--space-2);
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.footer-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-copyright {
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   15. MODALS
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: var(--fs-lg);
  font-weight: 700;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body {
  padding: var(--space-5);
}
.modal-footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-5);
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.modal-footer .btn { flex: 1; }

/* --------------------------------------------------------------------------
   16. TOASTS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + var(--space-4));
  right: var(--space-4);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.toast.hide {
  animation: slideOut 0.3s ease forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.toast-icon svg { width: 20px; height: 20px; }
.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left-color: var(--info); }
.toast-info .toast-icon { color: var(--info); }
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-message {
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
}
.toast-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-close:hover { color: var(--text); }
.toast-close svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   17. TABLES
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th {
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  background: var(--surface-2);
  position: sticky;
  top: 0;
}
.table tbody tr:hover {
  background: var(--surface-2);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table .actions-cell {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* --------------------------------------------------------------------------
   18. SKELETONS & EMPTY STATES
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-lg);
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.empty-state-icon svg { width: 36px; height: 36px; }
.empty-state-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.empty-state-desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-bottom: var(--space-6);
  max-width: 360px;
}

/* --------------------------------------------------------------------------
   19. UTILITIES
   -------------------------------------------------------------------------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--space-4) 0;
}

.pill-input {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.875rem;
  font-size: var(--fs-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.pill-input:hover { border-color: var(--primary); color: var(--primary); }
.pill-input.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Rating stars */
.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--warning);
}
.rating-stars svg { width: 14px; height: 14px; }

/* Price text */
.price {
  font-weight: 700;
  color: var(--text);
}
.price-old {
  color: var(--text-3);
  text-decoration: line-through;
  font-size: var(--fs-sm);
  font-weight: 400;
}

/* Verified badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.testimonial-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.testimonial-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); }
.section-header-centered { justify-content: center; text-align: center; }
.seller-card-compact { min-width: 200px; }
.seller-card-avatar { background: transparent; padding: 0; overflow: hidden; }
.seller-card-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.seller-cta-title { margin-bottom: var(--space-3); }
.seller-cta-copy { margin-bottom: var(--space-4); }
.faq-answer p { padding-top: var(--space-2); }
.text-sm { font-size: var(--fs-sm); }
.mt-2 { margin-top: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.modal-actions-grid { display: grid; gap: var(--space-3); }
.verified-badge svg { width: 14px; height: 14px; }

/* Sticky purchase bar (mobile product detail) */
.sticky-purchase-bar {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  z-index: 850;
  background: rgba(14, 19, 27, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: var(--space-3);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0));
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sticky-purchase-bar .price {
  font-size: var(--fs-lg);
  flex-shrink: 0;
}
.sticky-purchase-bar .btn {
  flex: 1;
}
/* --------------------------------------------------------------------------
   SEARCH SUGGESTIONS (dropdown)
   -------------------------------------------------------------------------- */
.search-suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  max-height: 360px;
  overflow-y: auto;
  display: none;
  padding: var(--space-1);
}
.search-suggest-dropdown.open {
  display: block;
  animation: fadeInDown 0.15s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
}
.suggest-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.sugg-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}
.sugg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sugg-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sugg-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sugg-price,
.sugg-type {
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.sugg-type {
  text-transform: capitalize;
}

/* Body class added by JS/static pages to add bottom nav padding */
body.has-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0) + var(--space-4));
}
