/* ============================================================
   style.css — Rent It SL
   Modern, responsive, mobile-first design
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary: #1a56db;
  --primary-dark: #1341b5;
  --primary-light: #3b82f6;
  --accent: #ff6b35;
  --accent-dark: #e55a28;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;

  --dark: #0f172a;
  --dark-2: #1e293b;
  --gray-800: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--dark-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--gray-600); }

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- NAVBAR ---------- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.nav-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.nav-brand span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--primary); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  transition: background var(--transition);
}
.user-menu:hover { background: var(--gray-100); }
.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-2);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-600);
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover:not(:disabled) { background: #0da271; border-color: #0da271; }
.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: var(--white); }
.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-outline-danger:hover:not(:disabled) { background: var(--danger); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--dark-2); }
.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn-white:hover:not(:disabled) {
  background: var(--gray-100);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-pending { background: var(--warning-bg); color: #92400e; }
.badge-approved { background: var(--success-bg); color: #065f46; }
.badge-rejected { background: var(--danger-bg); color: #991b1b; }
.badge-featured { background: linear-gradient(135deg, #f59e0b, #ef4444); color: white; }
.badge-category { background: var(--purple-bg); color: #5b21b6; }
.badge-new { background: var(--primary); color: white; }

/* ---------- FORM ELEMENTS ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
}
.form-label span { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--dark-2);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}
.form-control::placeholder { color: var(--gray-400); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.3rem; display: none; }
.form-error.visible { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- PAGINATION ---------- */
#pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 2rem;
  padding-bottom: 1rem;
}
.pag-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--dark-2);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
}
.pag-btn:hover:not(:disabled) {
  background: var(--primary-light, #eff6ff);
  border-color: var(--primary);
  color: var(--primary);
}
.pag-btn.pag-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26,86,219,0.18);
}
.pag-btn.pag-disabled, .pag-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.pag-btn.pag-arrow { font-size: 1rem; font-weight: 700; }
.pag-btn.pag-dots { border: none; background: none; cursor: default; color: var(--gray-400); }
@media (max-width: 480px) {
  .pag-btn { min-width: 34px; height: 34px; font-size: 0.82rem; padding: 0 0.55rem; }
}

/* ---------- CARDS ---------- */
.card {
  display: block;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  border: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1.5px solid transparent;
  transition: border-color 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(26,86,219,0.12), 0 4px 8px rgba(0,0,0,0.06);
}
.card:hover::after {
  border-color: rgba(26,86,219,0.2);
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-100);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.45) 0%, transparent 55%);
  pointer-events: none;
}
.card:hover .card-img-wrap img { transform: scale(1.07); }
.card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  z-index: 2;
}
.card-body {
  padding: 1rem 1.15rem 1.15rem;
  position: relative;
}
.card-title {
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--dark-2);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.card-price {
  display: inline-flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  background: #eff6ff;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  align-items: center;
}
.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.card-meta i { font-size: 0.72rem; color: var(--gray-400); }
.card-footer {
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------- ADS GRID ---------- */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}
.ads-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--dark-2); }
.section-title span { color: var(--primary); }
.section-subtitle { color: var(--gray-500); font-size: 0.9rem; margin-top: 0.25rem; }

/* ---------- HERO SECTION ---------- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #1a56db 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; text-align: center; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  color: #93c5fd;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: #93c5fd; }
.hero p {
  color: #bfdbfe;
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-search {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  display: flex;
  gap: 0.5rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}
.hero-search input,
.hero-search select {
  flex: 1;
  min-width: 150px;
  border: none;
  outline: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--dark-2);
  background: transparent;
}
.hero-search select {
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  appearance: none;
  cursor: pointer;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat { color: var(--white); text-align: center; }
.hero-stat strong { display: block; font-size: 1.5rem; font-weight: 800; }
.hero-stat span { font-size: 0.8rem; color: #93c5fd; }

/* ---------- CATEGORY SECTION ---------- */
.categories-section { padding: 1.5rem 0; background: var(--white); }
.categories-section .section-header { margin-bottom: 0.875rem; }
.categories-section .section-title { font-size: 1.15rem; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.65rem;
}
.category-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.875rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.category-card:hover,
.category-card.active {
  border-color: var(--primary);
  background: #eff6ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.category-icon {
  font-size: 2rem;
  line-height: 1;
}
.category-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.25;
}
.category-card:hover .category-name,
.category-card.active .category-name { color: var(--primary); }
.category-count {
  font-size: 0.65rem;
  color: var(--gray-400);
}

/* ---------- FEATURED SECTION ---------- */
.featured-section { padding: 4rem 0; background: var(--gray-50); }
.featured-badge-overlay {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.featured-card::after { border-color: #f59e0b !important; border-width: 2px; }
.featured-card .card-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245,158,11,0.18) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

/* ---------- LATEST ADS SECTION ---------- */
.latest-section { padding: 4rem 0; background: var(--white); }

/* ---------- HOME INLINE FILTER BAR ---------- */
.home-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.6rem 0.75rem;
}
.home-filter-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 300px;
}
.home-filter-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  font-size: 0.9rem;
}
.home-filter-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  background: white;
  color: var(--dark-2);
  transition: border-color 0.15s;
}
.home-filter-input:focus { border-color: var(--primary); }
.home-filter-select {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  background: white;
  color: var(--dark-2);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.home-filter-select:focus { border-color: var(--primary); }
@media (max-width: 600px) {
  .home-filter-bar { padding: 0.45rem; gap: 0.35rem; }
  .home-filter-search-wrap { max-width: 100%; flex: 1 1 100%; }
  .home-filter-input { font-size: 0.85rem; }
  .home-filter-select { flex: 1; min-width: 0; font-size: 0.85rem; }
}

/* ---------- LISTINGS FILTER DRAWER (mobile) ---------- */
.listings-mobile-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  gap: 0.75rem;
}
.filter-active-badge {
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.42rem;
  border-radius: var(--radius-full);
  margin-left: 0.25rem;
}
.filter-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 0.25rem;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.filter-drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  line-height: 1;
}
.filter-drawer-close-btn:hover { background: var(--gray-100); color: var(--dark-2); }
.filter-drawer-apply-btn { display: none; }

.listings-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 498;
}
.listings-filter-overlay.open { display: block; }

/* ---------- LISTINGS PAGE ---------- */
.listings-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 2.5rem 0;
  color: white;
}
.listings-hero h1 { color: white; font-size: 1.8rem; }
.listings-hero p { color: #bfdbfe; }

.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.filter-bar .container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filter-search-wrap .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.9rem;
}
.filter-search-wrap input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
.filter-search-wrap input:focus { border-color: var(--primary); }
.filter-select {
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  font-size: 0.9rem;
  color: var(--gray-700);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--primary); }
.results-count { font-size: 0.875rem; color: var(--gray-500); margin-left: auto; white-space: nowrap; }

.listings-content { padding: 2.5rem 0 4rem; }
.no-results {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--gray-500);
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1.5px dashed var(--gray-200);
  margin: 1.5rem 0;
}
.no-results .no-icon { font-size: 4rem; margin-bottom: 1rem; }
.no-results h3 { font-size: 1.3rem; font-weight: 700; color: var(--dark-2); margin-bottom: 0.5rem; }
.no-results p { color: var(--gray-500); font-size: 0.95rem; max-width: 380px; margin: 0 auto 1.25rem; line-height: 1.55; }

/* ---------- SINGLE AD PAGE ---------- */
.ad-page { padding: 2.5rem 0 4rem; }
.ad-page .container { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.ad-gallery { border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); margin-bottom: 1.5rem; }
.gallery-main {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--gray-900);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.gallery-main img.active { display: block; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  border: none;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  z-index: 5;
}
.gallery-nav:hover { background: white; transform: translateY(-50%) scale(1.05); }
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem;
  background: var(--gray-900);
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.gallery-dot.active { background: white; width: 24px; border-radius: 4px; }
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}
.gallery-thumb {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition);
  border: 2px solid transparent;
  flex-shrink: 0;
}
.gallery-thumb.active { opacity: 1; border-color: var(--primary); }
.gallery-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.ad-details-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
}
.ad-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ad-main-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.ad-info-list { margin: 1.25rem 0; }
.ad-info-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.ad-info-item:last-child { border-bottom: none; }
.ad-info-label { color: var(--gray-500); min-width: 90px; font-weight: 500; }
.ad-info-value { color: var(--dark-2); font-weight: 600; }
.ad-description { padding: 1.25rem 0; border-top: 1px solid var(--gray-200); }
.ad-description h4 { margin-bottom: 0.75rem; }
.ad-description p { color: var(--gray-600); line-height: 1.8; white-space: pre-wrap; }

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 80px;
}
.contact-card h3 { margin-bottom: 1.25rem; }
.phone-reveal-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-2);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.phone-reveal-btn:hover { border-color: var(--primary); background: #eff6ff; }
.phone-reveal-btn.revealed { color: var(--primary); border-color: var(--primary); font-size: 1.15rem; }
.whatsapp-btn {
  width: 100%;
  padding: 0.875rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
}
.whatsapp-btn:hover { background: #1fb855; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- DASHBOARD ---------- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-header {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 1rem;
}
.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  margin-bottom: 0.5rem;
}
.sidebar-name { font-weight: 700; font-size: 0.95rem; color: var(--dark-2); }
.sidebar-email { font-size: 0.75rem; color: var(--gray-500); }
.sidebar-nav { padding: 0 0.75rem; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-bottom: 0.2rem;
}
.sidebar-nav a:hover { background: var(--gray-100); color: var(--dark-2); }
.sidebar-nav a.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.main-content { padding: 2rem 2rem 4rem; background: var(--gray-50); }
.page-header { margin-bottom: 2rem; }
.page-header h2 { font-size: 1.5rem; }
.page-header p { color: var(--gray-500); font-size: 0.9rem; margin-top: 0.25rem; }

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

/* Image upload area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: #eff6ff;
}
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-area h4 { color: var(--gray-700); margin-bottom: 0.4rem; }
.upload-area p { font-size: 0.85rem; color: var(--gray-400); }
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.preview-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-100);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.preview-remove:hover { background: var(--danger); }

/* My Ads List */
.my-ads-list { display: flex; flex-direction: column; gap: 1rem; }
.my-ad-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: box-shadow var(--transition);
}
.my-ad-item:hover { box-shadow: var(--shadow); }
.my-ad-thumb {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--gray-100);
}
.my-ad-info { flex: 1; min-width: 0; }
.my-ad-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-2);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-ad-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.my-ad-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ---------- ADMIN PANEL ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: #eff6ff; }
.stat-icon.yellow { background: var(--warning-bg); }
.stat-icon.green { background: var(--success-bg); }
.stat-icon.red { background: var(--danger-bg); }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--dark-2); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.2rem; }

.filter-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-tab:hover { color: var(--primary); background: var(--gray-50); }
.filter-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count {
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}
.filter-tab.active .tab-count { background: #dbeafe; color: var(--primary); }

.admin-ad-list { display: flex; flex-direction: column; gap: 1rem; }
.admin-ad-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.admin-ad-thumb {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--gray-100);
}
.admin-ad-info { flex: 1; min-width: 0; }
.admin-ad-title { font-weight: 700; font-size: 0.95rem; color: var(--dark-2); margin-bottom: 0.3rem; }
.admin-ad-meta { font-size: 0.78rem; color: var(--gray-500); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.admin-ad-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-ad-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: flex-end;
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal h3 { margin-bottom: 1rem; }
.modal p { margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
.days-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.day-option {
  padding: 0.875rem 0.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.day-option:hover { border-color: var(--primary); background: #eff6ff; }
.day-option.selected { border-color: var(--primary); background: var(--primary); color: white; }
.day-option strong { display: block; font-size: 1.25rem; }
.day-option span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- TOAST ---------- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--dark-2);
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideInRight 0.3s ease forwards;
  max-width: 320px;
  min-width: 240px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--dark); }
.toast.exit { animation: slideOutRight 0.3s ease forwards; }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ---------- LOADING ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-weight: 600; color: var(--gray-600); }

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { height: 300px; border-radius: var(--radius-lg); }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }

/* ---------- ALERT / EMPTY STATE ---------- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fcd34d; }
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fca5a5; }

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--gray-400);
}
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.7; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.875rem; margin-bottom: 1.25rem; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
footer h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
footer ul li { margin-bottom: 0.5rem; }
footer ul li a { font-size: 0.875rem; color: var(--gray-400); transition: color var(--transition); }
footer ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .ad-page .container { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile sidebar overlay system */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--primary);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  border: none;
  width: fit-content;
  margin-bottom: 1.25rem;
  text-align: left;
  font-family: inherit;
}
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 199;
}
.mobile-sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Dashboard & Admin: slide-in sidebar */
  .dashboard-layout,
  .admin-layout { grid-template-columns: 1fr; }

  .mobile-sidebar-toggle { display: flex; }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    z-index: 200;
    border-right: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transition: left 0.28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    padding-top: 1rem;
  }
  .sidebar.mobile-open { left: 0; }

  /* Hero compact on tablet/mobile */
  .hero { padding: 2.25rem 0 1.75rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 0.93rem; margin-bottom: 1.25rem; }
  .hero-eyebrow { font-size: 0.8rem; margin-bottom: 0.875rem; }
  .hero-stats { margin-top: 1.5rem; gap: 1.5rem; }
  .hero-stat strong { font-size: 1.3rem; }

  /* Tighter section padding */
  .categories-section { padding: 2rem 0; }
  .latest-section { padding: 2rem 0; }

  .main-content { padding: 1.25rem 1rem 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .price-input-group { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search select { border-left: none; border-right: none; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-ad-item { flex-direction: column; }
  .admin-ad-actions-col { flex-direction: row; align-items: center; }
  /* Listings filter bar → slide-in drawer on mobile */
  .listings-mobile-toolbar { display: flex; }

  .filter-bar {
    position: fixed !important;
    top: 0;
    left: -310px;
    bottom: 0;
    width: 290px;
    height: 100vh;
    z-index: 499;
    overflow-y: auto;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: left 0.28s cubic-bezier(.4,0,.2,1);
    padding: 0 !important;
    border-bottom: none !important;
  }
  .filter-bar.drawer-open { left: 0; }

  .filter-bar .container {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1.25rem 1.5rem;
    gap: 0.75rem;
    max-width: none;
    width: 100%;
  }
  .filter-search-wrap { min-width: 0; }
  .filter-search-wrap input { padding-left: 2.25rem; }
  .filter-bar .filter-select,
  .filter-bar .filter-search-wrap { width: 100%; }
  .filter-bar .results-count { display: none; }
  .filter-drawer-header { display: flex; }
  .filter-drawer-apply-btn { display: flex; width: 100%; justify-content: center; margin-top: 0.25rem; }

  .results-count { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .days-grid { grid-template-columns: repeat(2, 1fr); }

  /* Admin ad actions wrap nicely */
  .admin-ad-actions { flex-wrap: wrap; gap: 0.35rem; }
  .admin-ad-actions .btn { font-size: 0.78rem; padding: 0.3rem 0.6rem; }

  /* User cards on mobile */
  .user-card-header { flex-direction: column; gap: 0.5rem; }
  .user-stats-row { gap: 0.75rem; }

  /* Ad detail page on mobile */
  .ad-content-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ad-contact-card { position: static; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }

  /* Hero: very compact on phones */
  .hero { padding: 1.5rem 0 1.25rem; }
  .hero-eyebrow { display: none; }
  .hero h1 { font-size: 1.35rem; margin-bottom: 0.5rem; }
  .hero p { font-size: 0.83rem; margin-bottom: 0.875rem; }
  .hero-search { padding: 0.35rem; gap: 0.3rem; margin-bottom: 1rem; }
  .hero-search input,
  .hero-search select { font-size: 0.85rem; padding: 0.45rem 0.6rem; min-width: 0; }
  .hero-stats { gap: 0.875rem; margin-top: 1rem; }
  .hero-stat strong { font-size: 1.1rem; }
  .hero-stat span { font-size: 0.68rem; }

  /* Sections: tight on phones */
  .categories-section { padding: 1.5rem 0; }
  .latest-section { padding: 1.5rem 0; }
  .section-title { font-size: 1.15rem; }
  .section-badge { font-size: 0.7rem; padding: 0.2rem 0.55rem; margin-bottom: 0.3rem; }
  .section-header { margin-bottom: 1rem; }

  /* Category cards: smaller */
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
  .category-card { padding: 0.65rem 0.25rem; gap: 0.3rem; border-radius: var(--radius); }
  .cat-icon-wrap { width: 34px; height: 34px; border-radius: var(--radius-sm); margin-bottom: 0; }
  .cat-icon-wrap i { font-size: 1rem; }
  .category-name { font-size: 0.65rem; line-height: 1.2; }
  .category-count { display: none; }

  /* Filter bar: compact row */
  .home-filter-bar { padding: 0.4rem; gap: 0.3rem; margin-bottom: 0.875rem; }
  .home-filter-search-wrap { flex: 1 1 100%; max-width: 100%; }
  .home-filter-input { font-size: 0.82rem; padding: 0.42rem 0.5rem 0.42rem 1.85rem; }
  .home-filter-select { font-size: 0.82rem; padding: 0.42rem 0.4rem; flex: 1; min-width: 0; }

  /* Ads grid — single column, horizontal card layout on phones */
  .ads-grid { grid-template-columns: 1fr; gap: 0.65rem; }

  .card {
    display: flex;
    flex-direction: row;
    border-radius: 14px;
    min-height: 110px;
  }
  .card::after { border-radius: 14px; }
  .card-img-wrap {
    flex: 0 0 120px;
    width: 120px;
    aspect-ratio: unset;
    align-self: stretch;
    border-radius: 14px 0 0 14px;
  }
  .card-img-wrap::after {
    background: linear-gradient(to right, rgba(15,23,42,0.3) 0%, transparent 60%);
  }
  .card-body {
    flex: 1;
    padding: 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }
  .card-title { font-size: 0.88rem; -webkit-line-clamp: 2; margin-bottom: 0.35rem; }
  .card-price { font-size: 0.9rem; padding: 0.15rem 0.5rem; margin-bottom: 0.4rem; }
  .card-meta { font-size: 0.72rem; gap: 0.25rem 0.75rem; }
  .card-badges { top: 0.5rem; left: 0.5rem; }
  .card-verified-badge { font-size: 0.7rem; padding: 0.2rem 0.45rem; margin-top: 0.3rem; }

  /* My ads */
  .my-ad-item { flex-direction: column; }
  .my-ad-thumb { width: 100%; height: 140px; }

  /* Modal full-screen on small phones */
  .modal { margin: 0.5rem; }
  .modal-overlay .modal { width: calc(100vw - 1rem); max-width: none; }

  /* Stats grid 2-col */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 0.875rem; }
  .stat-value { font-size: 1.5rem; }
}

/* ---------- USER DROPDOWN ---------- */
.nav-user-wrap {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.user-menu-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.user-name { font-size: 0.875rem; font-weight: 600; color: var(--dark-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-arrow { font-size: 0.7rem; color: var(--gray-400); transition: transform var(--transition); }
.user-menu-btn[aria-expanded="true"] .dropdown-arrow { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 150;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.18s ease;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-user-email {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--dark-2); }
.dropdown-item i { font-size: 1rem; color: var(--gray-500); width: 16px; }
.dropdown-item:hover i { color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 0.25rem 0; }
.dropdown-logout { color: var(--danger) !important; }
.dropdown-logout i { color: var(--danger) !important; }
.dropdown-logout:hover { background: var(--danger-bg) !important; }

/* ---------- CATEGORY CARD — icon via BI ---------- */
.cat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.25rem;
  transition: all var(--transition);
}
.cat-icon-wrap i { font-size: 1.1rem; color: var(--primary); }
.category-card:hover .cat-icon-wrap,
.category-card.active .cat-icon-wrap {
  background: var(--primary);
}
.category-card:hover .cat-icon-wrap i,
.category-card.active .cat-icon-wrap i { color: white; }

/* ---------- HERO STATS redesign ---------- */
.hero-stats { margin-top: 2.5rem; }
.hero-stat strong { font-size: 1.75rem; }

/* ---------- SECTION BADGE ---------- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.section-badge.gold { background: var(--warning-bg); color: #92400e; }

/* ---------- PRINT / Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   VERIFIED SELLER BADGE — ad.html poster section
   ============================================================ */
#poster-status {
  font-size: 0.75rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

/* ============================================================
   VERIFICATION SECTION — dashboard.html
   ============================================================ */
.verify-status-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.verify-status-box i { font-size: 2rem; flex-shrink: 0; margin-top: 0.15rem; }
.verify-doc-preview {
  max-height: 200px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-top: 0.75rem;
  display: block;
}

/* ============================================================
   ADMIN — User Management Cards
   ============================================================ */
.user-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow var(--transition);
}
.user-card:hover { box-shadow: var(--shadow); }

.user-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.user-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-stats-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--gray-100);
}
.user-stat { text-align: center; min-width: 60px; }
.user-stat-val { font-size: 1.3rem; font-weight: 700; color: var(--dark-2); line-height: 1; }
.user-stat-lbl { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.2rem; }
.user-verify-section {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--gray-100);
}
.verify-doc-img {
  max-height: 180px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-top: 0.5rem;
  display: block;
  cursor: pointer;
}
.verify-doc-img:hover { opacity: 0.85; }

/* ============================================================
   ADMIN — Category Management Chips
   ============================================================ */
.cat-group-header {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-600);
  margin: 1.1rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cat-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.cat-chip {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  color: var(--gray-700);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.cat-chip.custom {
  background: var(--purple-bg);
  border-color: #c4b5fd;
  color: var(--purple);
}
.cat-chip-del {
  cursor: pointer;
  color: var(--danger);
  opacity: 0.65;
  font-size: 0.85rem;
  transition: opacity var(--transition);
}
.cat-chip-del:hover { opacity: 1; }

/* ============================================================
   ADMIN — Preview Modal wide layout
   ============================================================ */
.modal.modal-lg {
  max-width: 780px;
  width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
}
.modal.modal-md {
  max-width: 600px;
  width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
}
.preview-images {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
}
.preview-images img {
  height: 160px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.preview-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}
@media (max-width: 580px) {
  .preview-info-grid { grid-template-columns: 1fr; }
}
.preview-info-item label {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}
.preview-info-item p {
  color: var(--dark-2);
  margin-top: 0.1rem;
  font-size: 0.9rem;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 0.75rem;
}
@media (max-width: 420px) { .price-row { grid-template-columns: 1fr; } }

/* ============================================================
   FEATURED RIBBON — card overlay top-left
   ============================================================ */
.card { position: relative; overflow: hidden; }
.featured-ribbon {
  position: absolute;
  top: 10px;
  left: -1px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem 0.2rem 0.55rem;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(245,158,11,0.4);
  letter-spacing: 0.02em;
}
.featured-card {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.08);
}

/* ============================================================
   VERIFIED BADGE — on listing cards
   ============================================================ */
.card-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-top: 0.4rem;
}
.card-verified-badge i { color: var(--success); font-size: 0.75rem; }

/* ==================== ADSPOTMEDIA PROMO BANNER ==================== */
.adspot-promo {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 1.35rem 0;
  border-top: 3px solid #f59e0b;
  border-bottom: 3px solid #f59e0b;
}
.adspot-promo-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.adspot-promo-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(245,158,11,0.15);
  border: 1.5px solid rgba(245,158,11,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.adspot-promo-text { flex: 1; min-width: 180px; }
.adspot-promo-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 0.15rem;
}
.adspot-promo-title { color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.adspot-promo-sub { color: #94a3b8; font-size: 0.8rem; margin-top: 0.2rem; }
.adspot-cta-btn {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
  border: none;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.18s, transform 0.1s;
  cursor: pointer;
}
.adspot-cta-btn:hover { background: #d97706; color: #0f172a; transform: translateY(-1px); }
@media (max-width: 600px) {
  .adspot-promo-inner { flex-direction: column; align-items: flex-start; gap: 0.875rem; }
  .adspot-cta-btn { width: 100%; justify-content: center; }
}

/* Footer powered-by */
.powered-by-adspot {
  font-size: 0.73rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.powered-by-adspot a { color: var(--gray-400); text-decoration: none; }
.powered-by-adspot a:hover { color: var(--primary); text-decoration: underline; }

/* ==================== RATINGS & REVIEWS ==================== */
.reviews-section {
  margin-top: 2.5rem;
  border-top: 1.5px solid var(--gray-200);
  padding-top: 2rem;
}
.reviews-summary-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.rating-avg-num {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark-1);
  line-height: 1;
}
.rating-stars-row { display: flex; gap: 0.15rem; margin: 0.25rem 0 0.2rem; }
.rating-stars-row .sf { color: #f59e0b; font-size: 1rem; }
.rating-stars-row .se { color: var(--gray-300); font-size: 1rem; }
.rating-count-txt { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.1rem; }

.review-form-box {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.star-picker { display: flex; gap: 0.3rem; margin-bottom: 0.875rem; cursor: pointer; }
.star-pick {
  font-size: 1.75rem;
  color: var(--gray-300);
  cursor: pointer;
  transition: color 0.1s, transform 0.1s;
  user-select: none;
  line-height: 1;
}
.star-pick.lit { color: #f59e0b; }
.star-pick:hover { transform: scale(1.15); }

.reviews-list { display: flex; flex-direction: column; }
.review-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.review-item:last-child { border-bottom: none; }
.review-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  overflow: hidden;
}
.review-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.review-name { font-weight: 600; font-size: 0.88rem; color: var(--dark-2); }
.review-meta { display: flex; align-items: center; gap: 0.5rem; margin: 0.15rem 0 0.35rem; flex-wrap: wrap; }
.review-stars-sm { display: flex; gap: 0.1rem; }
.review-stars-sm i { font-size: 0.73rem; color: #f59e0b; }
.review-stars-sm i.empty { color: var(--gray-300); }
.review-date { font-size: 0.72rem; color: var(--gray-400); }
.review-comment-text { font-size: 0.875rem; color: var(--gray-700); line-height: 1.55; }

/* Listings page: compact title bar (replaces old listings-hero) */
.listings-page-title-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}
@media (max-width: 768px) {
  .listings-page-title-bar { display: none; }
}
