/* PakMobiles - Main Stylesheet */
:root {
  --bg: #0a1628;
  --bg2: #0e1f3a;
  --bg3: #122040;
  --card: #111f3a;
  --card-hover: #172a4e;
  --border: #1c3356;
  --border2: #254878;
  --text: #e8f0fe;
  --text2: #8ba4cc;
  --text3: #506a90;
  --accent: #2196f3;
  --accent2: #00bcd4;
  --accent-hover: #1976d2;
  --price: #4fc3f7;
  --featured: #f59e0b;
  --pta: #22c55e;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 70px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Container ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ─── Header ───────────────────────────────────────────────── */
.site-header {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.logo strong { color: var(--accent2); }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--bg3); }
#nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.nav-user-wrap { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.875rem;
  transition: background 0.2s;
}
.nav-user-btn:hover { background: var(--card-hover); }
.user-dropdown {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text2);
  transition: background 0.15s;
}
.user-dropdown a:hover { background: var(--bg3); color: var(--text); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.avatar-xs {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}

/* ─── Bottom Nav (mobile) ──────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 62px;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex; z-index: 100;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text3);
  font-size: 0.65rem;
  transition: color 0.2s;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a svg { width: 22px; height: 22px; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--card-hover); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-feature {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.18);
}
.btn-feature:hover {
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  color: #111827;
  transform: translateY(-1px);
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--text2); font-weight: 500; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,150,243,0.15); }
.form-control::placeholder { color: var(--text3); }
.form-control option { background: var(--bg3); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.75rem; color: var(--text3); margin-top: 4px; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 6px; }

/* ─── Cards ────────────────────────────────────────────────── */
.listing-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border2);
}
.card-img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg3); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.listing-card:hover .card-img-wrap img { transform: scale(1.04); }
.card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 800; color: rgba(255,255,255,0.4);
}
.badge-featured {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--featured);
  color: #000;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}
.save-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px;
  background: rgba(10,22,40,0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: all 0.2s;
}
.save-btn:hover { background: rgba(10,22,40,0.9); color: var(--danger); border-color: var(--danger); }
.save-btn.saved { color: var(--danger); }

.card-body { padding: 12px; }
.card-title { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.card-price { font-size: 1rem; font-weight: 700; color: var(--price); margin-bottom: 8px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag {
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text2);
}
.tag-pta { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: var(--pta); }
.tag-cond { background: rgba(33,150,243,0.1); border-color: rgba(33,150,243,0.3); color: var(--accent); }
.card-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text3); }

/* ─── Grid ─────────────────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ─── Section Headers ──────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 1.1rem; font-weight: 700; }
.section-link { font-size: 0.85rem; color: var(--accent); }
.section-link:hover { text-decoration: underline; }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0e2040 0%, #0a2a50 50%, #0a1628 100%);
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
}
.hero-inner { text-align: center; }
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.hero h1 span { color: var(--accent2); }
.hero p { color: var(--text2); margin-bottom: 24px; font-size: 1rem; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-top: 24px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.4rem; color: var(--accent2); }
.hero-stat span { font-size: 0.75rem; color: var(--text3); }

/* ─── Search Bar ───────────────────────────────────────────── */
.search-bar {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 30px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.search-bar input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.search-bar input::placeholder { color: var(--text3); }
.search-bar button {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 30px 30px 0;
  transition: background 0.2s;
}
.search-bar button:hover { background: var(--accent-hover); }

/* ─── Brand Pills ──────────────────────────────────────────── */
.brand-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 20px 0; scrollbar-width: none; }
.brand-pills::-webkit-scrollbar { display: none; }
.brand-pill {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.brand-pill:hover, .brand-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Browse page ──────────────────────────────────────────── */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
}
.filter-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 76px;
}
.filter-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 0.8rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover, .filter-chip.active {
  background: rgba(33,150,243,0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { flex: 1; padding: 8px 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.8rem; outline: none; }
.price-inputs input:focus { border-color: var(--accent); }
.price-inputs span { color: var(--text3); font-size: 0.8rem; }
.browse-main {}
.browse-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.browse-count { font-size: 0.85rem; color: var(--text2); }
.sort-select {
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination button {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  font-size: 0.85rem;
  transition: all 0.15s;
}
.pagination button.active, .pagination button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── Listing Detail ───────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px 0;
  align-items: start;
}
.detail-gallery { margin-bottom: 20px; }
.gallery-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.detail-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.detail-price { font-size: 1.8rem; font-weight: 800; color: var(--price); margin-bottom: 16px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-pta { background: rgba(34,197,94,0.15); color: var(--pta); border: 1px solid rgba(34,197,94,0.3); }
.badge-condition { background: rgba(33,150,243,0.15); color: var(--accent); border: 1px solid rgba(33,150,243,0.3); }
.badge-info { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.detail-specs { margin: 16px 0; }
.spec-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text3); }
.spec-value { font-weight: 600; }
.detail-desc { padding: 16px 0; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--text2); line-height: 1.6; }
.detail-sidebar {}
.seller-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.seller-card h3 { font-size: 0.85rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.seller-info { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar-md {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.seller-name { font-weight: 700; font-size: 1rem; }
.seller-meta { font-size: 0.8rem; color: var(--text3); }
.phone-reveal { width: 100%; margin-bottom: 10px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }
.views-count { text-align: center; font-size: 0.75rem; color: var(--text3); margin-top: 8px; }

/* ─── Auth page ────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { width: 52px; height: 52px; font-size: 20px; margin: 0 auto 12px; border-radius: 14px; }
.auth-logo h2 { font-size: 1.4rem; font-weight: 700; }
.auth-logo p { color: var(--text2); font-size: 0.875rem; margin-top: 4px; }
.auth-tabs { display: flex; background: var(--bg3); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 8px; text-align: center; border-radius: 6px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  color: var(--text2); transition: all 0.2s; border: none; background: none;
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.auth-divider span { font-size: 0.75rem; color: var(--text3); }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text2); }
.auth-footer a { color: var(--accent); }

/* ─── Post Ad ──────────────────────────────────────────────── */
.post-ad-page { padding: 24px 0 40px; }
.post-ad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
  margin: 0 auto;
}
.post-ad-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.form-section-title { font-size: 0.9rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.image-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 12px;
}
.image-upload-area:hover { border-color: var(--accent); background: rgba(33,150,243,0.05); }
.image-upload-area p { color: var(--text2); font-size: 0.875rem; margin-top: 8px; }
.image-upload-area small { color: var(--text3); font-size: 0.75rem; }
.image-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.img-preview {
  position: relative; width: 80px; height: 80px;
  border-radius: 8px; overflow: hidden; background: var(--bg3);
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview button {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,0.7);
  border: none; border-radius: 50%;
  color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.checkbox-group { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-group input { width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-group span { font-size: 0.875rem; }

/* ─── Profile ──────────────────────────────────────────────── */
.profile-page { padding: 24px 0 40px; }
.profile-header {
  display: flex; align-items: center; gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.avatar-lg {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.profile-info h2 { font-size: 1.3rem; font-weight: 700; }
.profile-info p { font-size: 0.85rem; color: var(--text2); margin-top: 3px; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; gap: 4px; }
.profile-tab {
  padding: 10px 20px;
  border: none; background: none;
  color: var(--text2); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 0.2s;
  margin-bottom: -1px;
}
.profile-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text2); }
.empty-state p { font-size: 0.875rem; margin-bottom: 20px; }

/* ─── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 20px;
  font-size: 0.875rem; opacity: 0;
  transition: all 0.3s; z-index: 9999;
  pointer-events: none; white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { border-color: var(--danger); color: var(--danger); }
.toast-success { border-color: var(--success); color: var(--success); }

/* ─── Loading ──────────────────────────────────────────────── */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FAB ──────────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: 76px; right: 20px;
  width: 54px; height: 54px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 1.4rem; font-weight: 300;
  box-shadow: 0 4px 20px rgba(33,150,243,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 90;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(33,150,243,0.6); }

/* ─── Alert ────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }

/* ─── Misc ─────────────────────────────────────────────────── */
.page-title { font-size: 1.3rem; font-weight: 700; padding: 20px 0 16px; }
.text-muted { color: var(--text2); }
.text-price { color: var(--price); font-weight: 700; }
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-active { background: rgba(34,197,94,0.15); color: var(--pta); }
.status-sold { background: rgba(239,68,68,0.15); color: var(--danger); }
.listing-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  margin-bottom: 10px; transition: border-color 0.2s;
}
.listing-row:hover { border-color: var(--border2); }
.listing-row-img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg3); }
.listing-row-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-row-body { flex: 1; min-width: 0; }
.listing-row-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-row-price { font-size: 0.9rem; font-weight: 700; color: var(--price); margin-bottom: 6px; }
.listing-row-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .fab { display: none; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 767px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; display: none; }
  .filter-sidebar.mobile-open { display: block; }
  .detail-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .post-ad-card { padding: 20px 16px; }
  .profile-header { flex-direction: column; text-align: center; }
  .browse-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .main-nav { display: none; }
}
@media (max-width: 480px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 9px; }
  .card-title { font-size: 0.8rem; }
  .card-price { font-size: 0.9rem; }
}
