/* ══════════════════════════════════════════════════════════════
   Fleakart — Premium Dark Glassmorphic Design System
   ══════════════════════════════════════════════════════════════ */

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

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-glass: rgba(255,255,255,0.06);
  --border-glass: rgba(255,255,255,0.08);
  --border-glass-hover: rgba(255,255,255,0.15);

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #606078;
  --text-inverse: #0a0a0f;

  --accent-violet: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --gradient-warm: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
  --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #1a1a3e 40%, #0a0a0f 100%);

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

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.15);
  --shadow-glow-cyan: 0 0 30px rgba(6,182,212,0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --navbar-h: 70px;
  --topbar-h: 36px;
  --container-max: 1280px;
}

/* ── Light Theme ──────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #eaeaf0;
  --bg-tertiary: #dddde5;
  --bg-card: rgba(0,0,0,0.03);
  --bg-card-hover: rgba(0,0,0,0.06);
  --bg-glass: rgba(0,0,0,0.04);
  --border-glass: rgba(0,0,0,0.08);
  --border-glass-hover: rgba(0,0,0,0.15);

  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --text-inverse: #f0f0f5;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.08);
  --shadow-glow-cyan: 0 0 30px rgba(6,182,212,0.08);

  --gradient-hero: linear-gradient(135deg, #f5f5fa 0%, #e8e8f5 40%, #f5f5fa 100%);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124,58,237,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease;
}
[data-theme="light"] body::before { opacity: 0; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-lg); }

/* ── Top Bar ─────────────────────────────────────────────────── */
.top-bar {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.8rem;
  color: var(--text-muted);
  height: var(--topbar-h);
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.top-bar-left { display: flex; align-items: center; gap: var(--space-md); }
.top-bar-left i { color: var(--accent-violet); margin-right: 4px; }
.top-bar .divider { opacity: 0.3; }
.top-bar-right { display: flex; gap: var(--space-lg); }
.top-bar-right a { color: var(--text-muted); transition: color var(--transition-fast); }
.top-bar-right a:hover { color: var(--text-primary); }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  height: var(--navbar-h);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}
[data-theme="light"] .navbar { background: rgba(245,245,250,0.85); }
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-lg);
}

/* Logo */
.logo { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.logo-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: white;
}
.logo-text { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; }
.accent { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Location Picker */
.location-picker {
  position: relative;
  flex-shrink: 0;
}
.location-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-body);
}
.location-bubble:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.location-bubble .fa-map-marker-alt {
  color: var(--accent-violet);
  font-size: 0.9rem;
}
.location-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}
.location-picker.open .location-arrow {
  transform: rotate(180deg);
}
.location-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
}
.location-picker.open .location-dropdown {
  max-height: min(420px, calc(100vh - var(--navbar-h) - 40px));
  opacity: 1;
  transform: translateY(0);
  overflow: visible;
}
[data-theme="light"] .location-dropdown {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.location-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-glass);
}
.location-search-wrap i {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.location-search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.location-search-wrap input::placeholder {
  color: var(--text-muted);
}
.location-detect {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-violet);
  cursor: pointer;
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-fast);
}
.location-detect:hover {
  background: rgba(124,58,237,0.08);
}
.location-detect i {
  font-size: 0.9rem;
}
.location-list {
  max-height: calc(100vh - var(--navbar-h) - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}
.location-list::-webkit-scrollbar { width: 4px; }
.location-list::-webkit-scrollbar-track { background: transparent; }
.location-list::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 2px; }
.location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.location-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.location-item.active {
  color: var(--accent-violet);
  font-weight: 600;
  background: rgba(124,58,237,0.06);
}
.location-item i {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}
.location-item.active i {
  color: var(--accent-violet);
}
.location-item-state {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}
.location-section-title {
  padding: 10px 14px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.location-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Nav Search */
.nav-search { flex: 1; max-width: 520px; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0 var(--space-sm) 0 var(--space-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-box:focus-within {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.search-icon { color: var(--text-muted); font-size: 0.9rem; }
.search-box input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.9rem;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.search-btn:hover { opacity: 0.9; transform: scale(1.02); }

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }
.nav-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.nav-icon-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent-red);
  color: white; font-size: 0.6rem; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,58,237,0.4); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-glass-hover); }
.btn-outline {
  background: transparent;
  color: var(--accent-violet);
  border: 1px solid var(--accent-violet);
}
.btn-outline:hover { background: rgba(124,58,237,0.1); }
.btn-danger { background: var(--accent-red); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--accent-green); color: white; }
.btn-success:hover { opacity: 0.9; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition-fast); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: calc(var(--navbar-h));
  left: 0; right: 0; bottom: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}
[data-theme="light"] .mobile-menu { background: rgba(245,245,250,0.97); }
.mobile-menu.active { display: block; }
.mobile-menu-inner { padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); }
.mobile-link {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}
.mobile-link:hover { background: var(--bg-card); color: var(--text-primary); }
.mobile-link i { width: 20px; text-align: center; color: var(--accent-violet); }
.mobile-menu hr { border: none; border-top: 1px solid var(--border-glass); margin: var(--space-sm) 0; }

/* ── Page Container ──────────────────────────────────────────── */
.page-container {
  /* Reduce extra bottom spacing by aligning closer to footer height */
  min-height: calc(100vh - var(--navbar-h) - var(--topbar-h) - 140px);
  position: relative;
  z-index: 1;
}

/* ── Glass Card ──────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.glass-card-static {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

/* ── Section Styles ──────────────────────────────────────────── */
.section { padding: var(--space-3xl) 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2xl);
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
}
.section-title .accent-dot { color: var(--accent-violet); }
.section-link {
  color: var(--accent-violet);
  font-weight: 500;
  display: flex; align-items: center; gap: var(--space-xs);
  transition: gap var(--transition-fast);
}
.section-link:hover { gap: var(--space-sm); }

/* ── Ad Card ─────────────────────────────────────────────────── */
.ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}
.ad-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(124,58,237,0.2);
}
.ad-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.ad-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.ad-card:hover .ad-card-img img { transform: scale(1.05); }
.ad-card-badge {
  position: absolute;
  top: var(--space-sm); left: var(--space-sm);
  background: var(--gradient-primary);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.ad-card-badge--right {
  left: auto !important;
  right: 10px;
}
.ad-card-fav {
  position: absolute;
  top: var(--space-sm); right: var(--space-sm);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  color: white;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  border: none; cursor: pointer;
}
.ad-card-fav:hover, .ad-card-fav.active { color: var(--accent-red); background: rgba(0,0,0,0.7); }
.ad-card-body { padding: var(--space-md); }
.ad-card-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
}
.ad-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ad-card-meta i { margin-right: 4px; }

/* ── Listing Grid ────────────────────────────────────────────── */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

/* Latest Listings Grid (4 columns by default) */
.latest-listings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .latest-listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .latest-listings-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(124,58,237,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 80%, rgba(6,182,212,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}
.hero-search {
  max-width: 640px;
  margin: 0 auto;
}
.hero-search .search-box {
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  height: 56px;
}
.hero-search .search-box input { font-size: 1rem; }
.hero-search .search-btn { padding: 12px 28px; font-size: 0.95rem; }

/* ── Category Pills ──────────────────────────────────────────── */
.category-strip {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-2xl);
}
.cat-pill {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.cat-pill:hover {
  background: rgba(124,58,237,0.1);
  border-color: var(--accent-violet);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.cat-pill i { font-size: 1rem; }

/* ── Stats Banner ────────────────────────────────────────────── */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--space-xs); }

/* ── Scroll Row ──────────────────────────────────────────────── */
.scroll-row {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-md);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }
.scroll-row > * { scroll-snap-align: start; flex: 0 0 280px; }

.home-categories-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.home-category-card {
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.home-category-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.home-category-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

/* ── Auth Forms ──────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--navbar-h) - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: var(--space-2xl);
}
.auth-card h2 {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}
.auth-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
}

/* Form Controls */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { cursor: pointer; }
.form-input-icon {
  position: relative;
}
.form-input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-input-icon input { padding-left: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-check {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: 0.85rem; color: var(--text-secondary);
}
.form-check input[type="checkbox"] { accent-color: var(--accent-violet); }
.form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}
.social-auth { display: flex; gap: var(--space-md); }
.social-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}
.social-btn:hover { background: var(--bg-card-hover); border-color: var(--border-glass-hover); color: var(--text-primary); }

.password-rules {
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-rule {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 4px 10px;
}

.password-rule.ok {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.1);
}

/* ── OTP Input ───────────────────────────────────────────────── */
.otp-inputs { display: flex; gap: var(--space-md); justify-content: center; margin: var(--space-2xl) 0; }
.otp-input {
  width: 56px; height: 64px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}
.otp-input:focus { border-color: var(--accent-violet); }

/* ── Profile Page ─────────────────────────────────────────────── */
.profile-banner {
  display: none;
}
.profile-banner-gradient {
  display: none;
}
.profile-header {
  position: relative;
  margin-top: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  padding-top: var(--space-2xl);
  margin-bottom: var(--space-xl);
  text-align: center;
}
.profile-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto var(--space-lg);
}
.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  border: 4px solid var(--bg-card);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.profile-info-section {
  margin-bottom: var(--space-lg);
}
.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}
.profile-email {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}
.profile-location {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}
.profile-location i { margin-right: 4px; color: var(--accent-violet); }
.profile-bio {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.profile-member-since {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}
.profile-member-since i { margin-right: 4px; }

/* Pencil edit button — icon only, expands on hover */
.profile-edit-pencil {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: rgba(124,58,237,0.1);
  color: var(--accent-violet);
  font-size: 0.75rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.profile-edit-pencil i {
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}
.profile-edit-label {
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  font-size: 0.8rem;
  font-weight: 500;
  transition: opacity 0.2s, max-width 0.3s;
}
.profile-edit-pencil:hover {
  width: auto;
  padding: 0 14px 0 0;
  gap: 2px;
  background: var(--accent-violet);
  color: white;
}
.profile-edit-pencil:hover .profile-edit-label {
  opacity: 1;
  max-width: 100px;
}

/* Inline verification icons below member date */
.profile-verify-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.profile-verify-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.verify-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16,185,129,0.12);
  color: var(--accent-green);
  font-size: 0.75rem;
}

/* Verification Badges */
.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.profile-verified-badge.verified {
  background: rgba(16,185,129,0.15);
  color: var(--accent-green);
}
.profile-verified-badge.partial {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}
.profile-verified-badge.unverified {
  background: rgba(239,68,68,0.1);
  color: var(--accent-red);
}

/* Stats Row */
.profile-stats-row {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-bottom: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}
.profile-stat { text-align: center; }
.profile-stat-num {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.profile-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Profile Actions */
.profile-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0;
}
.profile-tab {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active {
  color: var(--accent-violet);
  border-bottom-color: var(--accent-violet);
}
.profile-tab-count {
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}
.profile-tab.active .profile-tab-count {
  background: rgba(124,58,237,0.15);
  color: var(--accent-violet);
}

/* Dashboard split: profile left, listings right */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
  height: calc(100vh - var(--navbar-h) - var(--space-3xl));
  overflow: hidden;
}

.dashboard-profile-left {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-lg));
  align-self: start;
  max-height: calc(100vh - var(--navbar-h) - var(--space-3xl));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-md);
}

.dashboard-profile-left::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dashboard-profile-left .profile-header {
  text-align: left;
  margin-bottom: 0;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.dashboard-profile-left .profile-avatar-wrapper {
  justify-content: center;
}

.dashboard-profile-left .profile-image-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
}

.dashboard-profile-left .profile-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-profile-left .profile-image-bottom-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.18), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.dashboard-profile-left .profile-name-row {
  justify-content: center;
  align-items: center;
}

.dashboard-profile-left .profile-bio {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-profile-left .profile-info-section {
  text-align: center;
}

.dashboard-profile-left .profile-location,
.dashboard-profile-left .profile-member-since {
  justify-content: center;
}

.dashboard-profile-left .profile-location i {
  color: var(--text-secondary);
}

.dashboard-profile-left .profile-verify-inline {
  justify-content: center;
}

.dashboard-profile-left .profile-stats-row {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  padding: 2px 0 0;
  margin-bottom: 0;
  border-top: none;
  border-bottom: none;
}

.dashboard-profile-left .profile-stat {
  min-width: 0;
  text-align: left;
}

.dashboard-profile-left .profile-stat-num {
  font-size: 1rem;
  -webkit-text-fill-color: initial;
  background: none;
  color: var(--text-primary);
}

.dashboard-profile-left .profile-stat-label {
  font-size: 0.74rem;
}

.dashboard-profile-left .profile-stat-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  background: var(--bg-card);
}

.dashboard-profile-left .profile-stat-compact i {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dashboard-profile-left .profile-stat-compact .profile-stat-num {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-listings-right {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.dashboard-listings-right::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dashboard-listings-right {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dashboard-listings-right .profile-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-primary);
  padding-top: 0;
  margin-top: -4px;
}

/* Smaller post cards in profile/dashboard listings area */
#profile-listings-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

#profile-listings-grid .ad-card-img {
  aspect-ratio: 1 / 1;
}

#profile-listings-grid .ad-card-body {
  padding: var(--space-sm);
}

#profile-listings-grid .ad-card-price {
  font-size: 1rem;
}

#profile-listings-grid .ad-card-title {
  font-size: 0.84rem;
}

#profile-listings-grid .ad-card-meta {
  font-size: 0.72rem;
  margin-top: 6px;
}

#profile-listings-grid .profile-card-menu-btn {
  width: 22px;
  height: 22px;
  font-size: 0.68rem;
}

#profile-listings-grid .profile-status-toggle {
  width: 62px;
  height: 21px;
}

#profile-listings-grid .profile-status-toggle-knob {
  width: 17px;
  height: 17px;
  top: 1px;
}

#profile-listings-grid .profile-status-toggle-text {
  font-size: 0.5rem;
}

.profile-listings-empty,
.profile-listings-footer {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.profile-listings-empty {
  grid-column: 1 / -1;
  padding: var(--space-4xl) var(--space-lg);
}

.profile-listings-empty i {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.profile-listings-empty p,
.profile-listings-footer-note {
  color: var(--text-secondary);
  margin: var(--space-sm) 0 var(--space-lg);
}

.profile-listings-footer-end {
  border-top: 1px solid var(--border-glass);
  margin-top: var(--space-md);
}

@media (max-width: 980px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    height: auto;
    overflow: visible;
  }

  .dashboard-profile-left {
    position: static;
    max-height: none;
  }

  .dashboard-profile-left .profile-header {
    text-align: center;
    display: block;
  }

  .dashboard-profile-left .profile-avatar-wrapper,
  .dashboard-profile-left .profile-verify-inline,
  .dashboard-profile-left .profile-name-row,
  .dashboard-profile-left .profile-stats-row {
    justify-content: center;
  }

  .dashboard-profile-left .profile-image-card {
    max-width: 320px;
  }

  .dashboard-profile-left .profile-stat {
    text-align: center;
  }

  .dashboard-profile-left .profile-stats-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .dashboard-profile-left .profile-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-listings-right {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .dashboard-listings-right .profile-tabs {
    position: static;
    top: auto;
  }
}

/* Card overlay actions on hover */
.profile-card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.ad-card:hover .profile-card-actions { opacity: 1; }
.profile-card-action {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  transition: all var(--transition-fast);
  text-decoration: none;
}
.profile-card-action:hover { background: rgba(255,255,255,0.35); transform: scale(1.1); }
.profile-card-action.danger:hover { background: rgba(239,68,68,0.6); }

/* Dashboard card controls redesign */
/* 3-dot kebab menu */
.profile-card-menu-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-card-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.profile-card-menu-btn:hover {
  background: rgba(124,58,237,0.1);
  color: var(--accent-violet);
}
.profile-card-menu-dropdown {
  display: none;
  position: absolute;
  right: calc(100% + 6px);
  top: 0;
  bottom: auto;
  min-width: 148px;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.16);
  overflow: hidden;
  z-index: 200;
}
.profile-card-menu-dropdown.open {
  display: block;
}
.profile-card-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast);
}
.profile-card-menu-item:hover {
  background: var(--bg-card);
}
.profile-card-menu-item.danger {
  color: #ef4444;
}
.profile-card-menu-item i {
  width: 14px;
  text-align: center;
  opacity: 0.7;
}

/* Price row: price + 3-dot menu */
.profile-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.profile-status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  width: 72px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.profile-status-toggle:hover { transform: translateY(-1px); }

.profile-status-toggle-text {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  pointer-events: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.profile-status-toggle-knob {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: 0 1px 3px rgba(2, 6, 23, 0.22);
  transition: left var(--transition-fast), right var(--transition-fast);
  pointer-events: none;
}

.profile-status-toggle.is-on {
  background: #e8f7ef;
}

.profile-status-toggle.is-on .profile-status-toggle-text {
  color: #2f855a;
  transform: translateX(-8px);
}

.profile-status-toggle.is-on .profile-status-toggle-knob {
  right: 1px;
  left: auto;
}

.profile-status-toggle.is-off {
  background: #fdecee;
}

.profile-status-toggle.is-off .profile-status-toggle-text {
  color: #b8323a;
  transform: translateX(8px);
}

.profile-status-toggle.is-off .profile-status-toggle-knob {
  left: 1px;
  right: auto;
}

.profile-status-chip-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
}

@media (max-width: 768px) {
  .profile-status-toggle {
    width: 66px;
    height: 22px;
  }

  .profile-status-toggle-knob {
    width: 18px;
    height: 18px;
  }

  .profile-status-toggle-text {
    font-size: 0.54rem;
  }

  .profile-status-chip-wrap {
    top: 8px;
    right: 8px;
  }
}

/* Verification items on public profile */
.profile-verify-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.profile-verify-item i:first-child { width: 16px; text-align: center; }

/* Verification cards in settings */
.profile-verify-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}
.verify-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 1rem;
}
.verify-icon.done {
  background: rgba(16,185,129,0.15);
  color: var(--accent-green);
}

@media (max-width: 768px) {
  .profile-banner { height: 140px; }
  .profile-header { padding: var(--space-xl); padding-top: 60px; }
  .profile-name { font-size: 1.35rem; }
  .profile-stats-row { gap: var(--space-xl); }
  .profile-stat-num { font-size: 1.35rem; }
  .profile-tabs { overflow-x: auto; }
  .profile-tab { white-space: nowrap; padding: var(--space-sm) var(--space-md); font-size: 0.85rem; }
}

/* ── Dashboard Layout ────────────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}
.dash-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-lg));
  height: fit-content;
}
.dash-nav { display: flex; flex-direction: column; gap: var(--space-xs); }
.dash-nav-link {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.dash-nav-link:hover, .dash-nav-link.active {
  background: var(--bg-card);
  color: var(--text-primary);
}
.dash-nav-link.active { border-left: 3px solid var(--accent-violet); }
.dash-nav-link i { width: 18px; text-align: center; }
.dash-user-card { padding: var(--space-xl); margin-bottom: var(--space-lg); text-align: center; }
.dash-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: white; font-weight: 700;
  margin: 0 auto var(--space-md);
}

/* Dashboard Stats Cards */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.dash-stat-card { padding: var(--space-xl); }
.dash-stat-card .stat-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}
.dash-stat-card .stat-icon.violet { background: rgba(124,58,237,0.15); color: var(--accent-violet); }
.dash-stat-card .stat-icon.cyan { background: rgba(6,182,212,0.15); color: var(--accent-cyan); }
.dash-stat-card .stat-icon.pink { background: rgba(236,72,153,0.15); color: var(--accent-pink); }
.dash-stat-card .stat-icon.green { background: rgba(16,185,129,0.15); color: var(--accent-green); }

/* ── Chat Layout ─────────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - var(--navbar-h) - var(--topbar-h));
  overflow: hidden;
}
.chat-sidebar {
  border-right: 1px solid var(--border-glass);
  overflow-y: auto;
}
.chat-user {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.chat-user:hover, .chat-user.active { background: var(--bg-card); }
.chat-user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; flex-shrink: 0;
}
.chat-user-info { flex: 1; min-width: 0; }
.chat-user-name { font-weight: 500; font-size: 0.9rem; }
.chat-user-msg { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; }
.chat-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-glass);
  display: flex; align-items: center; gap: var(--space-md);
}
.chat-messages { flex: 1; overflow-y: auto; padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-bubble.sent {
  align-self: flex-end;
  background: var(--accent-violet);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 4px;
}
.chat-input-area {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-glass);
  display: flex; gap: var(--space-md); align-items: center;
}
.chat-input-area input { flex: 1; }
.chat-input-area .btn { flex-shrink: 0; }

.chat-ticks {
  display: inline-block;
  margin-left: 2px;
  letter-spacing: -1px;
  transition: color 0.25s ease, transform 0.2s ease, opacity 0.2s ease;
  animation: chatTickPop 0.2s ease;
}
.chat-ticks.sent {
  color: rgba(255,255,255,0.8);
}
.chat-ticks.delivered {
  color: rgba(255,255,255,0.92);
}
.chat-ticks.seen {
  color: #22d3ee;
}

@keyframes chatTickPop {
  from {
    transform: scale(0.85);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Admin Table ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}
.data-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.data-table tr:hover td { background: var(--bg-card); }

/* Status Badges */
.badge-status {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-pending { background: rgba(245,158,11,0.15); color: var(--accent-orange); }
.badge-sold { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-rejected { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.ad-card-sold .ad-card-img img { opacity: 0.6; }
.ad-card-sold .ad-card-body { opacity: 0.7; }

/* ── Listing Detail ──────────────────────────────────────────── */
.listing-detail {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}
.listing-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.listing-gallery-main {
  aspect-ratio: 16/10;
  background: var(--bg-tertiary);
  position: relative;
}
.listing-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
}
.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-nav.prev { left: var(--space-md); }
.gallery-nav.next { right: var(--space-md); }
.gallery-thumbs {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.gallery-thumb {
  width: 72px; height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
  opacity: 0.6;
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent-violet); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}
.listing-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: var(--space-lg);
}
.listing-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.listing-spec {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}
.listing-spec-label { font-size: 0.8rem; color: var(--text-muted); }
.listing-spec-value { font-weight: 600; margin-top: 2px; }

.seller-card { padding: var(--space-xl); }
.seller-card-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
.seller-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1.2rem;
}
.seller-card .seller-name { font-weight: 600; font-size: 1.05rem; }
.seller-card .seller-since { font-size: 0.8rem; color: var(--text-muted); }

/* ── Post Ad Steps ───────────────────────────────────────────── */
.stepper {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.step {
  display: flex; align-items: center; gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.step.active { color: var(--text-primary); }
.step-num {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--border-glass);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.step.active .step-num { background: var(--gradient-primary); border-color: transparent; color: white; }
.step.completed .step-num { background: var(--accent-green); border-color: transparent; color: white; }
.step-line {
  width: 40px;
  height: 2px;
  background: var(--border-glass);
  margin: 0 -var(--space-sm);
}

/* ── Dropzone ────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.dropzone:hover {
  border-color: var(--accent-violet);
  background: rgba(124,58,237,0.05);
}
.dropzone i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.dropzone p { color: var(--text-secondary); }

/* ── Pricing Cards ───────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.pricing-card { padding: var(--space-2xl); text-align: center; position: relative; }
.pricing-card.popular { border-color: var(--accent-violet); }
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-amount {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
}
.pricing-amount sup { font-size: 1rem; }
.pricing-features { list-style: none; margin: var(--space-xl) 0; text-align: left; }
.pricing-features li {
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: var(--space-sm);
}
.pricing-features li i { color: var(--accent-green); }

/* ── FAQ Accordion ───────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border-glass); }
.faq-question {
  width: 100%;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.faq-question:hover { color: var(--accent-violet); }
.faq-question i { transition: transform var(--transition-base); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 var(--space-md) var(--space-lg); color: var(--text-secondary); line-height: 1.8; }

/* ── Notification Items ──────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition-fast);
}
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { border-left: 3px solid var(--accent-violet); }
.notif-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-text { font-size: 0.9rem; }
.notif-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ── Page Header (for inner pages) ───────────────────────────── */
.page-header {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(124,58,237,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.page-header h1 { font-size: 2rem; position: relative; }
.page-header p { color: var(--text-secondary); margin-top: var(--space-sm); position: relative; }
.breadcrumb {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  position: relative;
}
.breadcrumb a { color: var(--accent-violet); }
.breadcrumb span { opacity: 0.5; }

/* ── Legal / Content Pages ───────────────────────────────────── */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-4xl);
}
.content-page h2 { font-size: 1.35rem; margin: var(--space-2xl) 0 var(--space-md); color: var(--accent-violet); }
.content-page h3 { font-size: 1.1rem; margin: var(--space-xl) 0 var(--space-sm); }
.content-page p { color: var(--text-secondary); margin-bottom: var(--space-md); line-height: 1.8; }
.content-page ul { list-style: disc; padding-left: var(--space-xl); color: var(--text-secondary); margin-bottom: var(--space-md); }
.content-page ul li { margin-bottom: var(--space-sm); line-height: 1.7; }

/* ── Filter Sidebar ──────────────────────────────────────────── */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}
.filter-sidebar { position: sticky; top: calc(var(--navbar-h) + var(--space-lg)); height: fit-content; }
.filter-group { margin-bottom: var(--space-xl); }
.filter-group h4 { font-size: 0.9rem; margin-bottom: var(--space-md); }
.filter-option {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-option input { accent-color: var(--accent-violet); }
.browse-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}
.view-toggle { display: flex; gap: var(--space-xs); }
.view-toggle button {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.view-toggle button.active, .view-toggle button:hover {
  background: var(--accent-violet);
  color: white;
  border-color: var(--accent-violet);
}

/* Range slider */
.range-slider { margin-top: var(--space-md); }
.range-slider input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-violet);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(124,58,237,0.4);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
  z-index: 1;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.footer-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}
.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-2xl);
  padding: var(--space-md) 0;
}
.footer-links-row a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  text-decoration: none;
}
.footer-links-row a:hover {
  color: var(--accent-violet);
}
.footer-divider {
  height: 1px;
  background: var(--border-glass);
  margin: var(--space-xl) 0;
}
.footer-divider-mini {
  height: 1px;
  background: var(--border-glass);
  max-width: 200px;
  margin: var(--space-md) auto;
}
.footer-app-tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: var(--space-sm) 0;
}
.footer-app-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.app-badge {
  display: inline-block;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  border-radius: 8px;
  overflow: hidden;
}
.app-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}
.app-badge img {
  display: block;
  height: 42px;
}
.footer-social-row {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.footer-social-row a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition-fast);
}
.footer-social-row a:hover {
  background: var(--accent-violet);
  color: white;
  border-color: var(--accent-violet);
  transform: translateY(-2px);
}
.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* Page transition */
.page-transition { animation: fadeIn 0.3s ease; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: var(--space-sm); justify-content: center; margin-top: var(--space-2xl); }
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}
.page-btn:hover, .page-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: var(--space-xs); margin-bottom: var(--space-xl); border-bottom: 1px solid var(--border-glass); }
.tab-btn {
  padding: var(--space-md) var(--space-lg);
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}
.tab-btn:hover, .tab-btn.active { color: var(--text-primary); border-bottom-color: var(--accent-violet); }

/* ── Tooltip ─────────────────────────────────────────────────── */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.tooltip:hover::after { opacity: 1; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .listing-detail { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .browse-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }

  .stats-banner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --navbar-h: 60px; }
  .container { padding: 0 var(--space-md); }
  .page-header { padding: var(--space-xl) var(--space-md); }
  .page-header h1 { font-size: 1.5rem; }
  .top-bar { display: none; }
  .nav-search { display: none; }
  .location-picker { display: none; }
  .nav-icon-btn { display: none; }
  #nav-login-btn { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { max-height: calc(100vh - var(--navbar-h)); overflow-y: auto; }
  .mobile-menu-inner { padding: var(--space-lg); }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .home-categories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .home-category-card { min-height: 92px; padding: 12px 6px; }
  .home-category-icon { font-size: 1.35rem; margin-bottom: 8px; }
  .home-category-title { font-size: 0.72rem; padding: 0 2px; }

  .stats-banner { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section-title { font-size: 1.4rem; }
  .auth-page { padding: var(--space-lg) var(--space-md); align-items: flex-start; }
  .auth-card { padding: var(--space-xl); }
  .stepper { flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-xl); }
  .step { font-size: 0.82rem; }
  .step-num { width: 28px; height: 28px; font-size: 0.78rem; }
  .tabs { overflow-x: auto; padding-bottom: var(--space-xs); }
  .footer-links-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); }
  .footer-social-row { flex-wrap: wrap; justify-content: center; }
  .login-modal-card { width: min(94vw, 420px); padding: var(--space-xl); max-height: 88vh; overflow-y: auto; }
  #category-modal .login-modal-card { width: 94vw !important; max-width: 94vw !important; padding: 20px !important; }
  #category-modal .login-modal-card > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  #category-selection-area > div,
  #subcategory-grid,
  #subsubcategory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #location-map { height: 220px !important; }
  .otp-inputs { gap: var(--space-sm); }
  .otp-input { width: 48px; height: 56px; }
  .password-rules { gap: 6px; }
  .password-rule { font-size: 0.7rem; padding: 3px 9px; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .container { padding: 0 12px; }
  .listing-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
  .home-categories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .home-category-card { min-height: 82px; padding: 10px 4px; border-radius: 10px; }
  .home-category-icon { font-size: 1.1rem; margin-bottom: 6px; }
  .home-category-title { font-size: 0.64rem; line-height: 1.15; }
  .scroll-row > * { flex: 0 0 220px; }
  .category-strip { gap: var(--space-sm); }
  .cat-pill { padding: 8px 14px; font-size: 0.8rem; }
  .social-auth { flex-direction: column; }
  .auth-page { padding: var(--space-md) 12px; }
  .auth-card { padding: var(--space-lg); border-radius: var(--radius-md); }
  .glass-card-static { border-radius: var(--radius-md); }
  .section-title { font-size: 1.25rem; }
  .page-header h1 { font-size: 1.35rem; }
  .stepper { justify-content: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
  .step { flex: 0 0 auto; }
  .footer-links-row { grid-template-columns: 1fr; text-align: center; }
  .login-modal-card { width: calc(100vw - 20px); padding: var(--space-lg); }
  #category-modal .login-modal-card > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  #category-modal .login-modal-card a.glass-card,
  #category-modal .login-modal-card button.glass-card,
  #category-selection-area .glass-card,
  #subcategory-grid .glass-card,
  #subsubcategory-grid .glass-card {
    padding: 14px 10px !important;
  }
  #category-modal .login-modal-card h2 { font-size: 1.2rem !important; padding-right: 28px; }
  #category-selection-area > div,
  #subcategory-grid,
  #subsubcategory-grid { gap: 10px !important; }
  #location-map { height: 180px !important; }
  .otp-input { width: 44px; height: 52px; font-size: 1.25rem; }
}

/* ── Theme Toggle ────────────────────────────────────────────── */
.theme-toggle {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}
.theme-toggle:hover { background: var(--bg-card); color: var(--accent-orange); }
.theme-toggle .fa-sun,
.theme-toggle .fa-moon {
  position: absolute;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.theme-toggle .fa-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .fa-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .fa-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .fa-moon { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle:hover { color: var(--accent-violet); }

.mobile-theme-toggle {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.mobile-theme-toggle:hover { background: var(--bg-card); color: var(--text-primary); }
.mobile-theme-toggle i { width: 20px; text-align: center; color: var(--accent-orange); }
[data-theme="light"] .mobile-theme-toggle i { color: var(--accent-violet); }
.mobile-theme-toggle .toggle-label-dark { display: inline; }
.mobile-theme-toggle .toggle-label-light { display: none; }
[data-theme="light"] .mobile-theme-toggle .toggle-label-dark { display: none; }
[data-theme="light"] .mobile-theme-toggle .toggle-label-light { display: inline; }
.mobile-theme-toggle .toggle-icon-dark { display: inline; }
.mobile-theme-toggle .toggle-icon-light { display: none; }
[data-theme="light"] .mobile-theme-toggle .toggle-icon-dark { display: none; }
[data-theme="light"] .mobile-theme-toggle .toggle-icon-light { display: inline; }

/* ── Light Theme Overrides ───────────────────────────────────── */
[data-theme="light"] .top-bar { background: rgba(0,0,0,0.02); }
[data-theme="light"] .hero-search .search-box { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .ad-card-fav { background: rgba(0,0,0,0.4); }
[data-theme="light"] .chat-bubble.sent { background: var(--accent-violet); color: white; }
[data-theme="light"] .gallery-nav { background: rgba(0,0,0,0.5); }
[data-theme="light"] .data-table td { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .notif-item { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .hamburger span { background: var(--text-primary); }

/* ── Utility Classes ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-violet); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.gap-md { gap: var(--space-md); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Profile Avatar Menu ─────────────────────────────────────── */
.profile-menu {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
  font-family: var(--font-body);
}
.profile-avatar:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
  transform: scale(1.05);
}
.avatar-initials {
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  pointer-events: none;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.profile-menu.open .profile-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
[data-theme="light"] .profile-dropdown {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.profile-dropdown-header {
  padding: 16px;
  text-align: center;
}
.profile-dropdown-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.avatar-initials-lg {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}
.profile-dropdown-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.profile-dropdown-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.profile-dropdown-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 4px 0;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font-body);
}
.profile-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.profile-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.profile-dropdown-item:hover i {
  color: var(--accent-violet);
}
.profile-dropdown-item.logout-item {
  color: var(--accent-red);
}
.profile-dropdown-item.logout-item i {
  color: var(--accent-red);
}
.profile-dropdown-item.logout-item:hover {
  background: rgba(239,68,68,0.08);
}


/* ── Login Modal ─────────────────────────────────────────────── */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.login-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 90%;
  max-width: 380px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .login-modal-card {
  background: #fff;
}
.login-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color var(--transition-fast);
}
.login-modal-close:hover {
  color: var(--text-primary);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Location Picker ─────────────────────────────────────────── */
.location-picker {
  position: relative;
  flex-shrink: 0;
  margin-left: var(--space-lg);
}
.location-bubble {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 120px;
}
.location-bubble:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}
.location-bubble i { color: var(--accent-violet); }
.location-arrow {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}
.location-picker.open .location-arrow { transform: rotate(180deg); }
.location-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-accuracy {
  font-size: 0.7rem;
  color: var(--accent-green);
  font-weight: 600;
  margin-left: var(--space-xs);
  opacity: 0.8;
}
.location-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: 400px;
  overflow: hidden;
}
.location-picker.open .location-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
[data-theme="light"] .location-dropdown {
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.location-search-wrap {
  position: relative;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-glass);
}
.location-search-wrap i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
#location-search {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
#location-search:focus {
  border-color: var(--accent-violet);
}
.location-detect {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}
.location-detect:hover {
  background: var(--bg-card);
  color: var(--accent-violet);
}
.location-detect i { color: var(--accent-violet); }
.location-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}
.location-list::-webkit-scrollbar {
  width: 6px;
}
.location-list::-webkit-scrollbar-track {
  background: transparent;
}
.location-list::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}
.location-section-title {
  padding: 8px 16px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.location-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.9rem;
}
.location-item:hover {
  background: var(--bg-card);
}
.location-item.active {
  background: rgba(124,58,237,0.1);
  color: var(--accent-violet);
}
.location-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}
.location-item.active i {
  color: var(--accent-violet);
}
.location-item-state {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}
.location-empty {
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════
   Profile Card Navigation Menu
══════════════════════════════════════════════════════════════ */
.profile-card-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-glass);
}

.profile-card-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  width: 100%;
  text-align: left;
}

.profile-card-nav-item i:first-child {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.profile-card-nav-item span {
  flex: 1;
}

.profile-card-nav-item:hover,
.profile-card-nav-item--active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.profile-card-nav-item:hover i:first-child,
.profile-card-nav-item--active i:first-child {
  color: var(--accent-violet);
}

.profile-card-nav-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-violet);
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

/* Account accordion */
.profile-card-nav-accordion {
  position: relative;
}

.profile-card-nav-chevron {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
  margin-left: auto;
  flex-shrink: 0;
  width: auto;
}

.profile-card-nav-group.open .profile-card-nav-chevron {
  transform: rotate(180deg);
  color: var(--accent-violet);
}

.profile-card-nav-submenu {
  display: none;
  flex-direction: column;
  gap: 1px;
  padding-left: 30px;
  padding-top: 2px;
}

.profile-card-nav-group.open .profile-card-nav-submenu {
  display: flex;
}

.profile-card-nav-subitem {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md) 8px var(--space-sm);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.profile-card-nav-subitem i {
  width: 16px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-card-nav-subitem:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.profile-card-nav-subitem--danger {
  color: #ef4444;
}

.profile-card-nav-subitem--danger i {
  color: #ef4444;
}

.profile-card-nav-subitem--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

@media (max-width: 980px) {
  .profile-card-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-xs);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-glass);
  }
  .profile-card-nav-item {
    flex: 1 1 auto;
    min-width: 100px;
    justify-content: center;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
  }
  .profile-card-nav-item span { display: none; }
  .profile-card-nav-item i:first-child { font-size: 1.05rem; }
  .profile-card-nav-badge { display: none; }
  .profile-card-nav-group { flex: 1 1 auto; }
  .profile-card-nav-accordion { justify-content: center; }
  .profile-card-nav-chevron { display: none; }
  .profile-card-nav-submenu {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    min-width: 180px;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 2px;
  }
  .profile-card-nav-group { position: relative; }
  .profile-card-nav-subitem { padding: var(--space-sm) var(--space-md); font-size: 0.88rem; }
  .profile-card-nav-subitem i { width: auto; }
}

/* ══════════════════════════════════════════════════════════════
   Account Settings Page
══════════════════════════════════════════════════════════════ */
.acct-page {
  min-height: calc(100vh - var(--navbar-h) - 120px);
}

.acct-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.acct-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.acct-back-link:hover {
  background: var(--bg-tertiary);
  color: var(--accent-violet);
}

.acct-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.acct-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Side Nav */
.acct-sidenav {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-lg));
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acct-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.acct-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.acct-nav-item:hover,
.acct-nav-item.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.acct-nav-item:hover i,
.acct-nav-item.active i {
  color: var(--accent-violet);
}

.acct-nav-danger {
  color: #ef4444;
}
.acct-nav-danger i { color: #ef4444; }
.acct-nav-danger:hover,
.acct-nav-danger.active {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
}
.acct-nav-danger:hover i { color: #dc2626; }

.acct-nav-divider {
  height: 1px;
  background: var(--border-glass);
  margin: var(--space-sm) 0;
}

/* Panel */
.acct-content {
  min-width: 0;
}

.acct-tab-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.acct-tab-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.acct-tab-title i {
  color: var(--accent-violet);
}

.acct-tab-title--danger { color: #ef4444; }
.acct-tab-title--danger i { color: #ef4444; }

.acct-loading-state {
  text-align: center;
  padding: var(--space-4xl);
  color: var(--text-muted);
  font-size: 1.5rem;
}

.acct-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.acct-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
}

.acct-section-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg);
}

/* Form */
.acct-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.acct-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-note-inline {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.acct-form-status {
  font-size: 0.88rem;
  min-height: 22px;
}

.acct-status-error { color: #ef4444; }
.acct-status-success { color: #22c55e; }

/* Password field */
.pw-field-wrap {
  position: relative;
  display: flex;
}

.pw-field-wrap .form-input {
  padding-right: 44px;
  flex: 1;
}

.pw-eye-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}
.pw-eye-btn:hover { color: var(--accent-violet); }

/* Password strength */
.pw-strength-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-label {
  font-size: 0.75rem;
  margin-top: 3px;
  display: block;
  font-weight: 600;
}

/* Auth factor list */
.auth-factor-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-factor-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-glass);
}
.auth-factor-row:last-child { border-bottom: none; padding-bottom: 0; }

.auth-factor-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent-violet);
  flex-shrink: 0;
}

.auth-factor-info { flex: 1; min-width: 0; }
.auth-factor-name { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.auth-factor-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

/* Toggle switch */
.acct-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.acct-toggle-switch input { opacity: 0; width: 0; height: 0; }
.acct-toggle-knob {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  transition: background var(--transition-fast);
}
.acct-toggle-knob::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.acct-toggle-switch input:checked + .acct-toggle-knob {
  background: var(--accent-violet);
  border-color: var(--accent-violet);
}
.acct-toggle-switch input:checked + .acct-toggle-knob::before {
  transform: translateX(20px);
  background: white;
}
.acct-toggle-switch input:disabled + .acct-toggle-knob {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Devices */
.acct-devices-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.device-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.device-card--current {
  border-color: var(--accent-violet);
  background: rgba(139, 92, 246, 0.04);
}

.device-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-violet);
  flex-shrink: 0;
}

.device-info { flex: 1; min-width: 0; }

.device-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.device-current-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-violet);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.device-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.device-meta i { width: 14px; text-align: center; color: var(--text-muted); }

.acct-btn-danger { color: #ef4444; border-color: #ef4444; }
.acct-btn-danger:hover { background: rgba(239,68,68,0.1); }

.acct-error-note { color: #ef4444; font-size: 0.88rem; }

/* Notifications */
.keyword-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  align-items: center;
  margin-bottom: var(--space-md);
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-violet);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 4px 10px 4px 12px;
  font-size: 0.82rem;
  font-weight: 500;
}

.keyword-tag button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  transition: opacity var(--transition-fast);
}
.keyword-tag button:hover { opacity: 1; }

.keyword-empty {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
}

.keyword-input-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.keyword-input-row .form-input {
  flex: 1;
}

.notif-pref-list {
  display: flex;
  flex-direction: column;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-glass);
}
.notif-pref-row:last-child { border-bottom: none; }

.notif-pref-info { flex: 1; min-width: 0; }
.notif-pref-name { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.notif-pref-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

/* Delete zone */
.acct-danger-zone {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.acct-danger-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.acct-danger-icon {
  font-size: 1.8rem;
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 2px;
}

.acct-danger-header h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  font-weight: 700;
  color: #ef4444;
}

.acct-danger-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.acct-delete-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.acct-delete-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.acct-delete-list i {
  color: #ef4444;
  width: 16px;
  flex-shrink: 0;
}

.acct-consent-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.acct-consent-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
}

.acct-consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent-violet);
  cursor: pointer;
}

.acct-consent-row span {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: 1px solid #ef4444;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-xl);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

/* Cart Page */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: border-color var(--transition-fast);
}
.cart-item-card:hover { border-color: var(--border-glass-hover); }

.cart-item-img-link {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
}
.cart-item-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-title:hover { color: var(--accent-violet); }

.cart-item-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-violet);
  margin-top: 4px;
}

.cart-item-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.cart-item-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: var(--space-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}
.cart-item-remove:hover {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* Account responsive */
@media (max-width: 768px) {
  .acct-layout {
    grid-template-columns: 1fr;
  }
  .acct-sidenav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .acct-nav-item {
    flex: 1 1 auto;
    min-width: 100px;
    justify-content: center;
    font-size: 0.8rem;
    padding: var(--space-sm) var(--space-md);
  }
  .acct-nav-item span { display: none; }
  .acct-nav-item i { width: auto; font-size: 1rem; }
  .acct-nav-divider { width: 100%; height: 1px; margin: 2px 0; }
  .acct-form-grid { grid-template-columns: 1fr; }
  .device-card { flex-wrap: wrap; }
  .auth-factor-row { flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════════════════════
   Dashboard Dynamic Panels (Saved / Messages / Cart)
══════════════════════════════════════════════════════════════ */
.dash-panel-loading {
  text-align: center;
  padding: var(--space-4xl);
  color: var(--text-muted);
  font-size: 1.6rem;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: var(--space-lg);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
}

.dash-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dash-panel-title i {
  color: var(--accent-violet);
  font-size: 1rem;
}

.dash-panel-count {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent-violet);
  color: #fff;
  border-radius: 20px;
  padding: 2px 9px;
  margin-left: 4px;
}

.dash-panel-empty {
  text-align: center;
  padding: var(--space-4xl) var(--space-lg);
}

.dash-panel-empty i {
  font-size: 2.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  display: block;
}

.dash-panel-empty h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.dash-panel-empty p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 var(--space-xl);
}

.dash-panel-section {
  margin-bottom: var(--space-xl);
}

.dash-panel-section:last-child {
  margin-bottom: var(--space-sm);
}

.dash-panel-subtitle {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dash-panel-subtitle i {
  color: var(--accent-violet);
}

.dash-panel-empty--compact {
  text-align: left;
  padding: var(--space-lg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.dash-panel-empty--compact h3 {
  font-size: 0.95rem;
  margin: 0 0 var(--space-xs);
}

.dash-panel-empty--compact p {
  font-size: 0.85rem;
  margin: 0;
}

/* Saved posts grid reuses existing .listing-grid + ad-card styles */

/* ── Messages list ── */
.dash-msg-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-msg-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dash-msg-row:hover {
  background: var(--bg-tertiary);
}

.dash-msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-violet);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-msg-info {
  flex: 1;
  min-width: 0;
}

.dash-msg-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-msg-preview {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dash-msg-meta {
  flex-shrink: 0;
  text-align: right;
}

.dash-msg-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dash-msg-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-violet);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-top: 4px;
}

/* ── Cart list ── */
.dash-cart-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
}

.dash-cart-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: border-color var(--transition-fast);
}

.dash-cart-item:hover {
  border-color: var(--border-glass-hover);
}

.dash-cart-img {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
}

.dash-cart-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-cart-info {
  flex: 1;
  min-width: 0;
}

.dash-cart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-cart-title:hover { color: var(--accent-violet); }

.dash-cart-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-violet);
  margin-top: 4px;
}

.dash-cart-loc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.dash-cart-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: var(--space-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.dash-cart-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Saved grid inside dynamic panel — same size as profile listings grid */
#dash-panel-dynamic .listing-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
}

#dash-panel-dynamic .listing-grid .ad-card-img {
  aspect-ratio: 1 / 1;
}

#dash-panel-dynamic .listing-grid .ad-card-body {
  padding: var(--space-sm);
}

#dash-panel-dynamic .listing-grid .ad-card-price { font-size: 1rem; }
#dash-panel-dynamic .listing-grid .ad-card-title { font-size: 0.84rem; }
#dash-panel-dynamic .listing-grid .ad-card-meta  { font-size: 0.72rem; margin-top: 6px; }
