/* ==========================================================
   VALLEYSALES — PREMIUM REDESIGN
   Color palette: Cactus Green #5B7C55 · Desert Sand #EDC9AF
                  Adobe Clay #A25F3C · Mountain Brown #6E4B3A
                  Sunrise Gold #F4A836
   ========================================================== */

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── CSS VARIABLES ───────────────────────────────────────── */
:root {
  /* Brand — Cactus Green primary */
  --primary:        #5B7C55;
  --primary-dark:   #4A6645;
  --primary-deeper: #334D30;
  --primary-light:  #C8D9C5;
  --primary-xlight: #F0F5EF;

  /* Accent — Sunrise Gold */
  --accent:         #F4A836;
  --accent-dark:    #D98E20;

  /* Supporting palette */
  --clay:           #A25F3C;
  --clay-dark:      #7E4828;
  --mountain:       #6E4B3A;
  --sand:           #EDC9AF;

  /* Neutral warm — Desert Sand base */
  --bg:             #FAF5EF;
  --surface:        #FFFFFF;
  --surface-2:      #FDF8F2;
  --border:         #E8D8C8;
  --border-dark:    #D4BEA8;

  /* Text */
  --text-primary:   #1E1208;
  --text-secondary: #4A3020;
  --text-muted:     #8C6E58;

  /* Radii */
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs:      0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.07);
  --shadow:         0 4px 20px rgba(0,0,0,0.09);
  --shadow-md:      0 8px 32px rgba(0,0,0,0.11);
  --shadow-lg:      0 16px 48px rgba(0,0,0,0.13);
  --shadow-primary: 0 6px 24px rgba(91,124,85,0.35);

  /* Transitions */
  --ease:       0.22s cubic-bezier(0.4,0,0.2,1);
  --ease-slow:  0.4s  cubic-bezier(0.4,0,0.2,1);
  --ease-spring:0.4s  cubic-bezier(0.34,1.56,0.64,1);
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 640px) { .container { padding-inline: 16px; } }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(210,105,30,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-dark);
}
.btn-ghost:hover {
  background: var(--primary-xlight);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-white {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  background: var(--primary-xlight);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.navbar .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-img-footer {
  height: 40px;
  opacity: 0.95;
}

/* ── CITY PICKER ─────────────────────────────────────────── */
.city-picker-wrap { position: relative; }

.city-picker-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
  padding: 4px 2px; white-space: nowrap;
  transition: color 0.15s;
}
.city-picker-btn:hover { color: var(--primary); }
.city-picker-caret { transition: transform 0.2s; flex-shrink: 0; }
.city-picker-btn[aria-expanded="true"] .city-picker-caret { transform: rotate(180deg); }

.city-picker-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  z-index: 900;
  overflow: hidden;
  animation: cpSlideIn 0.18s cubic-bezier(0.34,1.4,0.64,1);
}
.city-picker-panel.open { display: block; }
@keyframes cpSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

.city-picker-search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.city-picker-search {
  flex: 1; border: none; background: transparent;
  font-size: 0.875rem; color: var(--text-primary); outline: none;
}
.city-picker-search::placeholder { color: var(--text-muted); }

.city-picker-body {
  max-height: 340px;
  overflow-y: auto;
  padding: 12px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.city-pill-all {
  display: inline-flex; align-items: center;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 0.8rem; font-weight: 700;
  border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent);
  cursor: pointer; margin-bottom: 12px;
  transition: all 0.15s;
}
.city-pill-all.active,
.city-pill-all:hover { background: var(--accent); color: #fff; }

.city-region-block { margin-bottom: 12px; }
.city-region-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 6px;
}
.city-pills-row { display: flex; flex-wrap: wrap; gap: 6px; }

.city-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--border-dark);
  background: transparent; color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.city-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }
.city-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.city-pill.hidden { display: none; }

/* ── END CITY PICKER ──────────────────────────────────────── */

/* Nav search */
.nav-search { flex: 1; max-width: 420px; }
.nav-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 16px;
  gap: 8px;
  transition: all var(--ease);
}
.nav-search-bar:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(210,105,30,0.12);
}
.nav-search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.nav-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.nav-search-bar input::placeholder { color: var(--text-muted); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--ease);
  padding: 6px 2px;
}
.nav-link:hover { color: var(--primary); }
.nav-link svg { width: 18px; height: 18px; }

/* Mobile menu button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--ease);
}
.mobile-menu a:hover { background: var(--primary-xlight); color: var(--primary); }
.mobile-menu .mobile-search {
  margin-bottom: 8px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}
.mobile-menu .mobile-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
}
.mobile-menu .mobile-btn { margin-top: 8px; }

@media (max-width: 900px) {
  .nav-search { display: none; }
}
@media (max-width: 700px) {
  .nav-actions .nav-link { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .hamburger { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: #1a120a url('../images/hero-bg.png') center center / cover no-repeat;
  padding: 80px 0 90px;
}

.hero-desert-scene {
  display: none;
}

/* Animated blob background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,15,5,0.76) 0%, rgba(5,15,5,0.58) 55%, rgba(5,10,3,0.38) 100%);
  z-index: 2;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--r-full);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.hero-title .highlight {
  color: #FFD4A8;
  position: relative;
}
.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* Hero search bar */
.hero-search {
  width: 100%;
  max-width: 680px;
  margin-bottom: 28px;
}
.hero-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--r-full);
  padding: 8px 8px 8px 20px;
  gap: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  transition: box-shadow var(--ease);
}
.hero-search-bar:focus-within {
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
}
.hero-search-bar svg { color: var(--text-muted); flex-shrink: 0; }
.hero-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  min-width: 0;
}
.hero-search-bar input::placeholder { color: var(--text-muted); }
.search-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}
.hero-search-bar select {
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  padding-right: 4px;
  white-space: nowrap;
}
.hero-search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
}
.hero-search-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.03);
}

/* Hero CTAs */
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 52px;
}
.hero-cta-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 36px;
  gap: 2px;
}
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}
.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

@media (max-width: 640px) {
  .hero { padding: 60px 0 80px; }
  .hero-desert-scene {
    background-position: 62% bottom;
  }
  .hero-search-bar { flex-wrap: wrap; border-radius: var(--r-lg); padding: 12px 16px; }
  .search-divider { display: none; }
  .hero-search-bar select { display: none; }
  .hero-search-btn { width: 100%; justify-content: center; border-radius: var(--r); }
  .hero-stat { padding: 14px 20px; }
  .hero-stat-number { font-size: 1.2rem; }
  .hero-stats { border-radius: var(--r-lg); }
}

/* ── CATEGORIES ──────────────────────────────────────────── */
.categories-section {
  padding: 28px 0 0;
  position: relative;
}
.categories-section .container {
  position: relative;
}
.categories-section .container::before,
.categories-section .container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 28px;
  pointer-events: none;
  z-index: 1;
}
.categories-section .container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), rgba(249,245,240,0));
}
.categories-section .container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), rgba(249,245,240,0));
}
.categories-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 12px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  white-space: nowrap;
  transition: all var(--ease);
  flex-shrink: 0;
  cursor: pointer;
}
.category-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-xlight);
}
.category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.cat-emoji { font-size: 1.1em; line-height: 1; }

@media (min-width: 900px) {
  .categories-scroll {
    gap: 18px;
    padding-inline: 18px;
  }

  .category-pill {
    padding-inline: 24px;
  }
}

/* ── LISTINGS SECTION ────────────────────────────────────── */
.listings-section {
  padding: 32px 0 64px;
}

.listings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.listings-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.listings-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}
.listings-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: border-color var(--ease);
}
.sort-select:focus { border-color: var(--primary); }

/* Grid & list toggle */
.view-toggle {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.view-btn {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--ease);
}
.view-btn.active {
  background: var(--primary);
  color: #fff;
}
.view-btn:not(.active):hover { background: var(--surface-2); }

/* Listings grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.listings-grid.list-view {
  grid-template-columns: 1fr;
}

/* ── LISTING CARD ─────────────────────────────────────────── */
.listing-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 32px rgba(210,105,30,0.14);
  transform: translateY(-3px);
}

/* Card image */
.card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface-2);
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.listing-card:hover .card-image-wrap img {
  transform: scale(1.06);
}
.card-price-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--r-full);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  letter-spacing: -0.01em;
}
.card-price-badge.free {
  background: #16a34a;
}
.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  color: var(--text-muted);
}
.card-fav-btn:hover {
  background: #fff;
  color: var(--accent);
  transform: scale(1.1);
}
.card-fav-btn.saved {
  color: var(--accent);
}
.card-condition-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Card body */
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}
.card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.card-location svg { width: 13px; height: 13px; flex-shrink: 0; }
.card-time {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* List view card variant */
.listings-grid.list-view .listing-card {
  flex-direction: row;
}
.listings-grid.list-view .card-image-wrap {
  width: 160px;
  min-width: 160px;
  aspect-ratio: unset;
  height: auto;
  border-radius: 0;
}
.listings-grid.list-view .card-body {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.listings-grid.list-view .card-title {
  font-size: 1.05rem;
  -webkit-line-clamp: 1;
}
.listings-grid.list-view .card-price-badge {
  position: static;
  background: var(--primary-xlight);
  color: var(--primary);
  font-size: 1rem;
  box-shadow: none;
}
@media (max-width: 500px) {
  .listings-grid.list-view .card-image-wrap { width: 110px; min-width: 110px; }
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--border-dark);
}
.no-results h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.no-results a { color: var(--primary); font-weight: 600; }
.no-results a:hover { text-decoration: underline; }

/* ── HOW IT WORKS ─────────────────────────────────────────── */
.how-section {
  padding: 72px 0;
  background: var(--surface);
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 780px) { .steps-grid { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; } }

.step-card {
  position: relative;
  padding: 36px 28px;
  border-radius: var(--r-xl);
  background: var(--primary-xlight);
  border: 1.5px solid var(--primary-light);
  text-align: center;
  transition: all var(--ease);
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(210,105,30,0.06);
  border-radius: 50%;
}
.step-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-4px);
}
.step-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.05em;
}
.step-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
}
.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Connector line between steps (desktop) */
@media (min-width: 780px) {
  .steps-grid {
    position: relative;
  }
  .steps-grid::before {
    content: '';
    position: absolute;
    top: 72px;
    left: calc(33.33% - 10px);
    right: calc(33.33% - 10px);
    height: 2px;
    background: linear-gradient(to right, var(--primary-light), var(--primary), var(--primary-light));
    pointer-events: none;
    z-index: 0;
  }
  .step-card { z-index: 1; }
}

/* ── TRUST SECTION ───────────────────────────────────────── */
.trust-section {
  padding: 64px 0;
  background: linear-gradient(135deg, var(--primary-xlight) 0%, #fff 100%);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .trust-grid { grid-template-columns: 1fr; } }

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--ease);
}
.trust-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.trust-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-xlight);
  border-radius: var(--r);
}
.trust-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.trust-item p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── CTA BANNER ──────────────────────────────────────────── */
.cta-section {
  padding: 32px 0 72px;
}
.cta-card {
  background: linear-gradient(135deg, var(--primary-deeper) 0%, var(--primary-dark) 40%, var(--primary) 70%, var(--accent) 100%);
  border-radius: var(--r-xl);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cta-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  position: relative;
}
.cta-card p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  position: relative;
}
.cta-card .btn {
  position: relative;
  font-size: 1.05rem;
  padding: 16px 40px;
}
@media (max-width: 640px) {
  .cta-card { padding: 44px 24px; }
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--mountain);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text span { color: var(--primary-light); }
.footer-brand p {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 260px;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  transition: all var(--ease);
  letter-spacing: 0.02em;
}
.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-links h5 {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ── LISTING DETAIL PAGE ─────────────────────────────────── */
.listing-detail-page {
  padding: 32px 0 72px;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color var(--ease);
}
.detail-back:hover { color: var(--primary); }
.detail-back svg { width: 16px; height: 16px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

/* Gallery */
.gallery-main {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface-2);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.gallery-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--ease);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Detail info */
.detail-info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}
.detail-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-orange { background: var(--primary-xlight); color: var(--primary-dark); }
.badge-green { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.detail-location svg { width: 16px; height: 16px; color: var(--primary); }

.detail-description {
  margin-bottom: 28px;
}
.detail-description h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.detail-description p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-wrap;
}

/* Detail sidebar */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-buy-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.detail-buy-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}
.detail-buy-card .price-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.detail-buy-card .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}
.buy-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.seller-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
}
.seller-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.seller-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.seller-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.seller-since { font-size: 0.78rem; color: var(--text-muted); }

.contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--ease);
  margin-bottom: 10px;
}
.contact-form textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
.contact-form .btn { width: 100%; justify-content: center; }

/* ── SELL PAGE ───────────────────────────────────────────── */
.sell-page {
  max-width: 720px;
  margin-inline: auto;
  padding: 48px 0 80px;
}
.sell-header {
  text-align: center;
  margin-bottom: 40px;
}
.sell-header h1 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.sell-header p { color: var(--text-muted); }

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.step-dot-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--ease);
  position: relative;
  z-index: 1;
}
.step-dot.active .step-dot-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.step-dot.done .step-dot-circle {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.step-dot-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.step-dot.active .step-dot-label { color: var(--primary); }
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-top: -18px;
  position: relative;
  z-index: 0;
}
.step-connector.done { background: #16a34a; }

/* Form styling */
.form-section {
  display: none;
  animation: fadeUp 0.3s ease;
}
.form-section.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-xs);
}
.form-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 500px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  border-radius: var(--r-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--ease);
  text-align: center;
  background: var(--surface);
}
.cat-option:hover {
  border-color: var(--primary);
  background: var(--primary-xlight);
}
.cat-option.selected {
  border-color: var(--primary);
  background: var(--primary-xlight);
  box-shadow: 0 0 0 3px rgba(210,105,30,0.1);
}
.cat-option .cat-emoji { font-size: 2rem; }
.cat-option span:last-child {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.form-group label span { color: var(--accent); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
  transition: all var(--ease);
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(210,105,30,0.1);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
.price-input-wrap {
  position: relative;
}
.price-input-wrap::before {
  content: '$';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 600;
  pointer-events: none;
}
.price-input-wrap .form-control { padding-left: 28px; }

/* Photo upload */
.photo-upload-area {
  border: 2px dashed var(--border-dark);
  border-radius: var(--r-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--ease);
  background: var(--surface-2);
  margin-bottom: 20px;
}
.photo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-xlight);
}
.photo-upload-area .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.photo-upload-area p { font-size: 0.9rem; color: var(--text-muted); }
.photo-upload-area strong { color: var(--primary); }
.photo-upload-area input[type="file"] { display: none; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.form-nav .btn { flex: 1; justify-content: center; }

/* ── SIGN IN PAGE ────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.auth-card .logo { justify-content: center; margin-bottom: 28px; }
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--ease);
  margin-bottom: 10px;
}
.oauth-btn:hover {
  border-color: var(--border-dark);
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
}
.oauth-btn img { width: 18px; height: 18px; }

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
}
.auth-footer-text a { color: var(--primary); font-weight: 600; }
.auth-footer-text a:hover { text-decoration: underline; }

/* ── SCROLL ANIMATIONS ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── SKELETON LOADER ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -700px 0; }
  100% { background-position: 700px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #ece8e4 50%, var(--surface-2) 75%);
  background-size: 700px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}

/* ── MISC ────────────────────────────────────────────────── */
.text-primary-color { color: var(--primary); }
.badge-new { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.badge-used { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.badge-fair { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── MOBILE POLISH ──────────────────────────────────────── */
@media (max-width: 760px) {
  .hero-ctas {
    width: 100%;
    gap: 10px;
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .listings-header {
    align-items: stretch;
    gap: 10px;
  }
  .listings-title-group {
    justify-content: space-between;
    width: 100%;
  }
  .listings-controls {
    width: 100%;
    justify-content: space-between;
  }
  .sort-select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .form-card {
    padding: 22px 16px;
    border-radius: 16px;
  }
  .step-indicator {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .step-dot {
    min-width: 88px;
  }
  .step-dot-label {
    font-size: 0.66rem;
  }
  .form-nav {
    flex-direction: column;
  }

  .detail-buy-card,
  .seller-card {
    padding: 18px;
  }
}

/* ===== Nav message badge ===== */
.nav-link,
.nav-actions a {
  position: relative;
}
.nav-msg-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent, #f97316);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* ===== Typing indicator ===== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  width: fit-content;
  align-self: flex-start;
  margin-top: 2px;
}
.typing-indicator span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── MOBILE CITY SELECT (hero search — ≤640px only) ────────── */
.mobile-city-select {
  display: none;
}
@media (max-width: 640px) {
  /* Hide the complex city picker panel button on mobile */
  .city-picker-wrap { display: none; }

  /* Show native select for city */
  .mobile-city-select {
    display: block;
    width: 100%;
    border: none;
    background: var(--surface-2);
    border-radius: var(--r);
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    border: 1.5px solid var(--border);
  }

  /* Hero search: stack vertically on mobile */
  .hero-search-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--r-xl) !important;
    padding: 14px 16px !important;
    gap: 10px !important;
  }
  /* Row 1: icon + input */
  .hero-search-bar > svg:first-child { display: none; }
  .hero-search-bar input[type="text"] {
    font-size: 1rem;
    padding: 4px 0;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 10px;
  }
  .search-divider { display: none !important; }
  /* Location icon — hide on mobile too */
  .hero-search-bar > svg:nth-child(4) { display: none; }

  /* Search button full-width */
  .hero-search-btn {
    width: 100% !important;
    justify-content: center !important;
    border-radius: var(--r) !important;
    padding: 14px !important;
    font-size: 1rem !important;
  }
}

/* ── LISTINGS GRID — 2 cols on small mobile ─────────────────── */
@media (max-width: 480px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card-body { padding: 10px 12px; }
  .card-title { font-size: 0.84rem; }
  .card-category { display: none; }
  .card-time { display: none; }
}

/* ── CATEGORY PILLS — stop auto-scroll on touch, use swipe ──── */
@media (max-width: 768px) {
  .categories-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .category-pill {
    scroll-snap-align: start;
    padding: 10px 18px;
    font-size: 0.84rem;
  }
  /* Pause the JS auto-scroll ticker on mobile (CSS flag) */
  .categories-scroll { overscroll-behavior-x: contain; }
}

/* ── HERO STATS — wrap on very small screens ────────────────── */
@media (max-width: 480px) {
  .hero-stats {
    flex-wrap: wrap;
    border-radius: var(--r-lg);
  }
  .hero-stat {
    flex: 1;
    min-width: 100px;
    padding: 14px 16px;
  }
  .hero-stat-divider:nth-of-type(3) { display: none; }
}

/* ── SELL PAGE — full-width city preview on mobile ──────────── */
@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .cat-option {
    padding: 14px 8px !important;
    font-size: 0.76rem !important;
  }
  .cat-emoji { font-size: 1.4rem !important; }
}

/* ── PROFILE PAGE — stack on mobile ────────────────────────── */
@media (max-width: 640px) {
  .profile-shell { gap: 14px; }
  .profile-card { padding: 20px 16px; }
  .profile-listings-panel { padding: 18px 14px; }
  .profile-listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ── GENERAL TOUCH IMPROVEMENTS ────────────────────────────── */
@media (max-width: 768px) {
  /* Ensure tap targets are at least 44px */
  .btn { min-height: 44px; }
  .auth-tab { min-height: 44px; padding: 12px; }
  .nav-link { padding: 10px 4px; }
  .hamburger { padding: 8px; }
  /* Prevent text size auto-adjustment on iOS */
  body { -webkit-text-size-adjust: 100%; }
}
