/* ============================================
   با من آهن — استایل اصلی (نسخه حرفه‌ای)
   ============================================ */

:root {
  --navy: #16337a;
  --navy-600: #1d449f;
  --navy-700: #122a63;
  --orange: #f06a1e;
  --orange-600: #d95812;
  --orange-50: #fff1e8;
  --gold: #eab308;

  --bg: #f2f3f7;
  --surface: #ffffff;
  --surface-2: #eceef4;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #8a93a3;
  --border: #e5e8ef;
  --shadow-sm: 0 1px 2px rgba(17,24,39,.05), 0 2px 6px rgba(17,24,39,.05);
  --shadow: 0 6px 18px rgba(17,24,39,.08), 0 3px 8px rgba(17,24,39,.05);
  --shadow-lg: 0 18px 44px rgba(17,24,39,.14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0e1117;
  --surface: #161b24;
  --surface-2: #1f2632;
  --text: #eef1f6;
  --text-2: #a8b0c0;
  --text-3: #6b7485;
  --border: #262d3a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 6px 18px rgba(0,0,0,.4);
  --shadow-lg: 0 18px 44px rgba(0,0,0,.5);
  --orange-50: #2b1a0d;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s, color .3s;
}

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

/* حذف فلش‌های بالا/پایین ورودی‌های عددی */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container-narrow { width: min(680px, 100% - 32px); margin-inline: auto; }
.section { padding: 32px 0 64px; }
.section-title { font-size: 20px; font-weight: 800; margin: 32px 0 16px; }
.page-title { font-size: 27px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.3px; }
.page-subtitle { color: var(--text-2); margin: 0; font-size: 14px; font-weight: 500; }
.muted { color: var(--text-2); font-size: 13px; }
.center { text-align: center; }

/* ─── Loader ─── */
.app-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,18,32,.55);
  backdrop-filter: blur(10px);
  transition: opacity .5s ease;
}
.app-loader.hide { opacity: 0; pointer-events: none; }
.loader-inner {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 38px 42px;
  text-align: center;
  width: min(440px, 90%);
  box-shadow: var(--shadow-lg);
  animation: fadeUp .5s ease both;
  display: flex; flex-direction: column; align-items: center;
}
.loader-logo-img { height: 64px; width: auto; max-width: 86%; object-fit: contain; margin-bottom: 14px; border-radius: 16px; }
.loader-slogan { font-size: 19px; font-weight: 800; color: #D4AF37; margin: 0 0 14px; letter-spacing: -.3px; }
.loader-sub { font-size: 13px; color: var(--text-2); margin: 0 0 22px; font-weight: 500; }
.loader-bar { width: 100%; height: 5px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.loader-bar span {
  display: block; height: 100%; width: 42%;
  background: linear-gradient(90deg, var(--navy), var(--orange));
  border-radius: 99px;
  animation: loadbar 1.4s ease infinite;
}
@keyframes loadbar {
  0% { transform: translateX(120%); }
  100% { transform: translateX(-260%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; }
.brand { display: flex; align-items: center; height: 100%; }
.brand-logo { height: 44px; width: auto; max-width: 200px; object-fit: contain; border-radius: 14px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  color: var(--text-2); transition: var(--transition);
}
.icon-btn:hover { color: var(--navy); border-color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
[data-theme="light"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }

.avatar-btn {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 700;
  border: 2px solid transparent; transition: var(--transition); flex-shrink: 0; aspect-ratio: 1;
}
.avatar-btn:hover { border-color: var(--orange); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter { font-size: 15px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; transition: var(--transition);
  background: var(--surface-2); color: var(--text);
  line-height: 1.2; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); font-weight: 800; }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 4px 14px rgba(30,58,138,.28);
}
.btn-primary:hover { background: var(--navy-600); box-shadow: 0 8px 24px rgba(30,58,138,.4); font-weight: 800; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 13px 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ─── Card ─── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 15px; font-weight: 800; margin: 0 0 12px; }

/* ─── Page hero slim ─── */
.page-hero-slim { padding: 26px 0 6px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ─── Category dropdown ─── */
.cat-panel { margin-top: 14px; animation: fadeUp .2s ease both; }
.cat-panel-inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.cat-group + .cat-group { margin-top: 14px; }
.cat-group h4 { font-size: 13px; font-weight: 800; color: var(--text-2); margin: 0 0 9px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 13px; font-weight: 700;
  color: var(--text-2); transition: var(--transition);
}
.chip:hover, .chip.active { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 3px 10px rgba(30,58,138,.3); }

/* ─── Filter bar ─── */
.filter-bar {
  margin-top: 16px; display: grid;
  grid-template-columns: 1fr auto auto auto auto; gap: 8px;
}
.search-wrap { position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 0 12px; height: 44px;
  transition: var(--transition); }
.search-wrap:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,138,.12); }
.search-wrap svg { color: var(--text-3); flex-shrink: 0; }
.search-wrap input { border: 0; outline: 0; background: transparent; flex: 1; color: var(--text); height: 100%; font-weight: 500; }
.voice-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; color: var(--text-3); cursor: pointer; transition: var(--transition); flex-shrink: 0; }
.voice-btn:hover { color: var(--navy); background: var(--surface-2); }
.search-suggest {
  position: absolute; top: calc(100% + 6px); right: 0; left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50;
  max-height: 340px; overflow-y: auto;
}
.search-suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
.search-suggest-item:last-child { border-bottom: 0; }
.search-suggest-item:hover { background: var(--surface-2); }
.search-suggest-item img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.search-suggest-item .s-info { flex: 1; min-width: 0; }
.search-suggest-item .s-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest-item .s-meta { font-size: 12px; color: var(--text-2); }

.history-item { color: var(--text-2); cursor: pointer; }
.history-item > svg { color: var(--text-3); flex-shrink: 0; }
.s-history-text { flex: 1; font-size: 13.5px; font-weight: 500; }
.history-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 0; background: transparent; border-radius: 7px;
  color: var(--text-3); transition: var(--transition); flex-shrink: 0;
}
.history-remove:hover { background: rgba(220,38,38,.1); color: #dc2626; }

.select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  padding: 0 12px; height: 44px; color: var(--text); font-size: 13.5px; font-weight: 600;
  transition: var(--transition); outline: 0;
}
.select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,138,.12); }
.price-filter { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-filter-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.price-filter .select { width: 130px; height: 40px; }

/* ─── Ads grid ─── */
.ads-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.ad-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition);
  display: flex; flex-direction: column;
}
.ad-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: rgba(30,58,138,.3);
}
.ad-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ad-card:hover .ad-thumb img { transform: scale(1.05); }
.badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px;
  backdrop-filter: blur(6px);
}
.badge-special { background: rgba(249,115,22,.95); color: #fff; }
.badge-pin { background: rgba(30,58,138,.92); color: #fff; }
.badge-auction { background: #D4AF37; color: #1a1a1a; }
.fav-btn { position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(11,18,32,.35); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); backdrop-filter: blur(4px); }
.fav-btn:hover { color: #f06a1e; transform: scale(1.08); }
.fav-btn.saved { color: #f06a1e; }
.fav-btn.saved svg { fill: #f06a1e; }
.fav-btn-inline { margin: 10px 0 0; }
.fav-btn-inline.saved { color: #E66B3B; border-color: #E66B3B; }
.fav-btn-inline.saved svg { fill: #E66B3B; }
.compare-btn { position: absolute; top: 50px; left: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #6e6e76; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.compare-btn:hover { color: var(--navy); transform: scale(1.05); }
.compare-btn.active { color: #fff; background: var(--navy); }

/* ─── نوار مقایسه ─── */
.compare-bar { position: fixed; bottom: 22px; left: 0; right: 0; margin: 0 auto; z-index: 850; width: min(520px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow-lg); font-weight: 700; font-size: 13.5px; }
.compare-modal-card { width: min(760px, 100%); }
.compare-table td, .compare-table th { text-align: center; }
.compare-table .compare-label { font-weight: 800; color: var(--text-2); }
.badge-verified { background: rgba(16,185,129,.94); color: #fff; right: auto; left: 10px; }
.badge-pending { background: rgba(148,163,184,.95); color: #fff; right: auto; left: 10px; }
.ad-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; }
.ad-card-title {
  font-size: 14.5px; font-weight: 700; margin: 0; line-height: 1.6; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: var(--transition);
}
.ad-card:hover .ad-card-title { font-weight: 800; color: var(--navy); }
[data-theme="dark"] .ad-card:hover .ad-card-title { color: #b3c2ff; }
.ad-card-price { color: var(--navy); font-weight: 800; font-size: 15.5px; }
[data-theme="dark"] .ad-card-price { color: #93b0ff; }
.ad-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.ad-card-city { display: inline-flex; align-items: center; gap: 4px; }
.ad-disclaimer { padding: 8px 14px; font-size: 11px; font-weight: 700; color: #b45309; background: #fdf0e9; border-top: 1px solid var(--border); line-height: 1.6; }

/* skeleton */
.skeleton {
  height: 270px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border: 1px solid var(--border);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.sentinel { height: 1px; }
.empty-state {
  grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state svg { opacity: .35; }

/* ─── Auth ─── */
.auth-section { min-height: 72vh; display: flex; align-items: center; padding: 40px 0; }
.auth-card { padding: 32px 28px; border-radius: var(--radius-lg); }
.auth-logo { height: 56px; width: auto; max-width: 80%; object-fit: contain; margin: 0 auto 8px; border-radius: 14px; }
.auth-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; text-align: center; }
.auth-subtitle { text-align: center; color: var(--text-2); font-size: 13.5px; margin: 0 0 6px; }
.auth-form { margin-top: 18px; display: flex; flex-direction: column; gap: 13px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.auth-alt a { color: var(--navy); font-weight: 800; }

/* ─── Forms ─── */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field > span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 11px; padding: 12px 14px; color: var(--text); outline: none;
  transition: var(--transition); font-size: 14.5px; width: 100%; font-weight: 500;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,138,.13);
}
.form-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── Create ad ─── */
.create-head { margin-bottom: 18px; }
.create-head .page-title { margin-bottom: 6px; }
.create-note { color: var(--orange-600); font-weight: 800; font-size: 14px; margin: 0; }
.create-form { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.form-section { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 1px dashed var(--border); }
.form-section:last-of-type { border-bottom: 0; padding-bottom: 0; }
.form-section-title { font-size: 14px; font-weight: 800; color: var(--navy); margin: 0; display: flex; align-items: center; gap: 8px; }
[data-theme="dark"] .form-section-title { color: #b3c2ff; }
.form-section-title::before { content: ''; width: 4px; height: 16px; border-radius: 99px; background: linear-gradient(180deg, var(--navy), var(--orange)); }

/* ─── Footer ─── */
.site-footer { padding: 28px 0; border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.site-footer p { text-align: center; margin: 0; color: var(--text-2); font-size: 13.5px; font-weight: 500; }

/* ─── PWA install prompt ─── */
.install-prompt {
  position: fixed; bottom: 22px; left: 0; right: 0; margin: 0 auto; z-index: 900;
  width: min(560px, calc(100vw - 24px));
  animation: fadeUp .35s ease both;
}
.install-prompt-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 12px 12px 12px 20px; box-shadow: var(--shadow-lg);
}
.install-prompt-logo { height: 46px; width: 46px; object-fit: contain; border-radius: 50%; flex-shrink: 0; }
.install-prompt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-prompt-body strong { font-size: 14px; font-weight: 800; }
.install-prompt-body span { font-size: 12px; color: var(--text-2); }
.install-prompt-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── Welcome overlay ─── */
.welcome-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(11,18,32,.6); backdrop-filter: blur(10px); }
.welcome-card { background: var(--surface); border-radius: var(--radius-lg); padding: 34px 40px; text-align: center; box-shadow: var(--shadow-lg); animation: fadeUp .3s ease both; display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(360px, 90%); }
.welcome-logo { height: 90px; width: auto; max-width: 80%; object-fit: contain; border-radius: 18px; }
.welcome-text { font-size: 20px; font-weight: 800; color: #D4AF37; margin: 0; }

/* ─── پیام‌های مدیر ─── */
.admin-msg-banner { position: sticky; top: 66px; z-index: 99; margin: 0 auto; width: min(1200px, 100% - 32px); }
.admin-msg-banner-inner { display: flex; align-items: center; gap: 10px; background: #D4AF37; color: #1a1a1a; padding: 11px 16px; border-radius: 12px; font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-lg); }
.admin-msg-banner-inner svg { flex-shrink: 0; }
.admin-msg-banner-inner span { flex: 1; }
.admin-msg-banner-inner button { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: #1a1a1a; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 24px; right: 50%; transform: translate(50%, 140%);
  background: var(--navy); color: #fff; padding: 13px 22px; border-radius: 12px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 9999;
  transition: transform .35s cubic-bezier(.4,0,.2,1); max-width: 90vw;
}
.toast.show { transform: translate(50%, 0); }
.toast.error { background: #dc2626; }
.toast.success { background: #16a34a; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .brand-logo { height: 38px; max-width: 130px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-wrap { grid-column: 1/-1; }
  .form-row { grid-template-columns: 1fr; }
  .ads-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
  .page-title { font-size: 21px; }
  .header-actions .btn { padding: 8px 12px; font-size: 12.5px; }
  .install-prompt-actions { flex-direction: column; }
  .header-inner { height: 58px; }
  .header-actions { gap: 6px; }
  .location-row { grid-template-columns: 1fr; }
  .create-form { padding: 16px; }
  .container { width: calc(100% - 24px); }
  .auction-stats { grid-template-columns: repeat(2, 1fr); }
  .bid-form { flex-direction: column; }
  .bid-form .btn { width: 100%; }
  .auction-box { padding: 12px; }
  .ad-detail-grid { gap: 14px; }
  .seller-card { padding: 14px; }
  .ad-info-card { padding: 14px; }

  /* پنل مدیریت موبایل */
  .admin-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .admin-nav .tab-btn { flex-shrink: 0; }
  .admin-top-actions { margin-inline-start: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .ads-grid { grid-template-columns: 1fr; }
}

/* صفحه‌نمایش خیلی کوچک (ساعت‌های هوشمند) */
@media (max-width: 360px) {
  body { font-size: 14px; }
  .brand-logo { height: 34px; max-width: 120px; }
  .container { width: 100% - 20px; }
  .page-title { font-size: 18px; }
  .btn { padding: 9px 14px; font-size: 13px; }
}

/* صفحه‌نمایش بزرگ (تلویزیون‌های هوشمند) */
@media (min-width: 1600px) {
  .container { width: min(1440px, 100% - 64px); }
  .ads-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  body { font-size: 16px; }
}

/* ─── Breadcrumb ─── */
.breadcrumb { font-size: 13px; color: var(--text-2); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.breadcrumb a:hover { color: var(--navy); }

/* ─── Ad detail ─── */
.ad-detail-grid { display: grid; grid-template-columns: 1fr 350px; gap: 20px; align-items: start; }
.gallery { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.gallery-main { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.gallery-main img { width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; }

/* زوم تصویر */
.zoom-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.zoom-lightbox[hidden] { display: none; }
.zoom-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.zoom-stage img { max-width: 100%; max-height: 100%; transition: transform .1s ease-out; will-change: transform; user-select: none; -webkit-user-drag: none; }
.zoom-close { position: fixed; top: 14px; right: 14px; z-index: 10001; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; background: none; flex: 0 0 74px; cursor: pointer; }
.thumb.active { border-color: var(--navy); }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.ad-info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.ad-title { font-size: 22px; font-weight: 800; margin: 0 0 12px; line-height: 1.6; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 18px; align-items: center; font-size: 13px; }
.pill { background: var(--surface-2); padding: 4px 11px; border-radius: 99px; font-weight: 700; color: var(--text-2); font-size: 12.5px; }
.pill-sell { background: rgba(34,197,94,.14); color: #15803d; }
.pill-buy { background: rgba(59,130,246,.14); color: #1d4ed8; }
.ad-price-row { padding: 14px 0 6px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 6px; }
.price-value { font-size: 22px; font-weight: 800; color: var(--navy); }
[data-theme="dark"] .price-value { color: #93b0ff; }
.ad-desc { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.ad-desc h3 { font-size: 15px; margin: 0 0 8px; font-weight: 800; }
.ad-desc p { color: var(--text-2); line-height: 2; margin: 0; }

/* ─── Seller card ─── */
.seller-card { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.seller-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.seller-avatar { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex-shrink: 0; }
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-name { font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seller-meta { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.verified { display: inline-flex; width: 17px; height: 17px; border-radius: 50%; background: #10b981; color: #fff; font-size: 11px; align-items: center; justify-content: center; flex-shrink: 0; }

.trust-box { margin: 14px 0; padding: 12px; border-radius: 11px; background: var(--surface-2); }
.trust-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.trust-head .t-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.trust-head .t-score { font-size: 16px; font-weight: 800; }
.trust-level-high { color: #16a34a; }
.trust-level-medium { color: var(--orange); }
.trust-level-low { color: #dc2626; }
.trust-bar { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.trust-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy), var(--orange)); }
.trust-flags { margin-top: 8px; font-size: 12px; color: #dc2626; font-weight: 600; }
.trust-flags div { margin-top: 2px; }
.trust-tier { display: inline-block; font-size: 11.5px; font-weight: 800; color: var(--navy); background: rgba(22,51,122,.08); padding: 2px 10px; border-radius: 99px; margin-bottom: 8px; }

/* نشان اعتماد فروشنده روی کارت آگهی */
.trust-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; margin-top: 8px; }
.trust-chip.gold { background: rgba(212,175,55,.16); color: #a67c00; border: 1px solid rgba(212,175,55,.4); }
.trust-chip.silver { background: rgba(120,134,160,.14); color: #56627a; border: 1px solid rgba(120,134,160,.35); }
.trust-chip.bronze { background: rgba(176,104,58,.13); color: #9a5b30; border: 1px solid rgba(176,104,58,.35); }
.trust-chip.none { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

.rank { padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #fff; }
.rank-1 { background: #94a3b8; }
.rank-2 { background: #a78bfa; }
.rank-3 { background: #f59e0b; }
.rank-4 { background: var(--navy); }

.seller-card .btn + .btn { margin-top: 8px; }
.seller-locked { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 12px 0; }
.seller-locked svg { color: var(--text-3); opacity: .6; }
.seller-locked p { margin: 0; color: var(--text-2); font-weight: 700; font-size: 14px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--text-2); }

/* ─── Inquiry result ─── */
.inquiry-result { margin-top: 14px; display: flex; flex-direction: column; }
.inquiry-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.inquiry-row:last-child { border-bottom: 0; }
.inquiry-row span { color: var(--text-2); font-weight: 600; }
.inquiry-row strong { font-weight: 800; }
.inquiry-empty { text-align: center; color: var(--text-2); padding: 24px 8px; font-weight: 700; line-height: 2; }

/* ─── رنگ‌بندی کارد استعلام ─── */
.inquiry-card { border-radius: var(--radius); padding: 14px 16px; margin-top: 8px; }
.inquiry-green { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.35); }
.inquiry-red { background: rgba(220,38,38,.1); border: 1px solid rgba(220,38,38,.3); }
.inquiry-orange { background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.35); }

/* ─── Auction ─── */
.auction-box { margin-top: 16px; padding: 16px; border: 1.5px solid #D4AF37; border-radius: var(--radius); background: color-mix(in srgb, #D4AF37 8%, var(--surface)); }
.auction-box h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; color: #B8930A; display: flex; align-items: center; gap: 8px; }
[data-theme="dark"] .auction-box h3 { color: #E8C64A; }
.auction-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.auction-stats > div { background: var(--surface); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); }
.auction-stats .label { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 3px; font-weight: 600; }
.auction-stats strong { font-size: 14.5px; font-weight: 800; }
.auction-stats .price { color: var(--navy); }
.bid-form { display: flex; gap: 8px; }
.bid-form input { flex: 1; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 13px; color: var(--text); font-weight: 700; }
.bid-form input:focus { border-color: #D4AF37; box-shadow: 0 0 0 3px rgba(212,175,55,.18); outline: 0; }
.countdown { font-size: 12.5px; color: var(--text-2); margin-top: 10px; font-weight: 600; }
.bid-success { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(16,185,129,.12); color: #15803d; font-weight: 800; font-size: 14px; }

/* ─── Chat ─── */
.chat-section { padding: 20px 0 40px; }
.chat-layout { display: grid; grid-template-columns: 300px 1fr; padding: 0; overflow: hidden; height: calc(100vh - 120px); min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.chat-list { border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-list-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.chat-list-head h2 { font-size: 15px; margin: 0; font-weight: 800; }
.chat-items { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); transition: var(--transition); cursor: pointer; }
.chat-item:hover, .chat-item.active { background: var(--surface-2); }
.chat-item-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.chat-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-item-body { flex: 1; min-width: 0; }
.chat-item-title { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; display: flex; justify-content: space-between; gap: 8px; }
.chat-item-last { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-unread { background: var(--orange); color: #fff; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.chat-window { display: flex; flex-direction: column; min-width: 0; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); }
.chat-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chat-head strong { font-size: 14px; }
.chat-head small { color: var(--text-2); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 76%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.8; word-break: break-word; animation: fadeUp .25s ease; position: relative; }
.msg.them { background: var(--surface); border: 1px solid var(--border); border-bottom-right-radius: 4px; align-self: flex-start; }
.msg.mine { background: var(--navy); color: #fff; border-bottom-left-radius: 4px; align-self: flex-end; }
.msg img { border-radius: 10px; margin-top: 4px; max-width: 220px; }
.msg .msg-time { display: block; font-size: 10.5px; margin-top: 4px; opacity: .75; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-form input[type="text"] { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; background: var(--surface-2); outline: none; color: var(--text); font-weight: 500; }
.chat-form input[type="text"]:focus { border-color: var(--navy); background: var(--surface); }
.attach-btn { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text-2); }
.attach-btn:hover { color: var(--navy); }
.loading-row { padding: 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ─── Profile ─── */
.profile-head { display: flex; gap: 18px; align-items: center; padding: 22px; flex-wrap: wrap; }
.profile-avatar { width: 86px; height: 86px; min-width: 86px; min-height: 86px; border-radius: 50%; overflow: hidden; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 32px; flex-shrink: 0; aspect-ratio: 1; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; min-width: 200px; }
.profile-info h1 { font-size: 20px; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; font-weight: 800; }
.profile-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--text-2); }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th, .table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--border); }
.table th { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 12.5px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.user-mobile { cursor: help; border-bottom: 1px dashed var(--text-3); font-weight: 700; }

/* ─── Admin ─── */
.admin-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 90; }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.admin-top-actions { display: flex; align-items: center; gap: 10px; }
.notif-badge { position: absolute; top: -4px; left: -4px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
#notifBtn { position: relative; }
.notif-panel { position: fixed; top: 70px; left: 16px; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 300; overflow: hidden; }
.notif-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-head strong { font-size: 14px; font-weight: 800; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: color-mix(in srgb, #dc2626 5%, transparent); }
.notif-item strong { font-size: 12.5px; color: var(--orange-600); }
.notif-item p { margin: 4px 0; font-size: 13px; }
.notif-item small { color: var(--text-3); font-size: 11px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.admin-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tab-btn { padding: 8px 14px; border-radius: 9px; background: transparent; border: 1px solid transparent; font-weight: 700; color: var(--text-2); font-size: 13.5px; transition: var(--transition); }
.tab-btn:hover { color: var(--navy); background: var(--surface-2); }
.tab-btn.active { background: var(--navy); color: #fff; }
.admin-main { padding: 24px 0 60px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s ease; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card .stat-label { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: var(--navy); }
[data-theme="dark"] .stat-card .stat-value { color: #93b0ff; }

/* ─── Modal ─── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,18,32,.6); backdrop-filter: blur(4px); }
.modal-card { position: relative; background: var(--surface); border-radius: var(--radius-lg); padding: 26px 24px; width: min(480px, 100%); box-shadow: var(--shadow-lg); animation: fadeUp .3s ease; max-height: 90vh; overflow-y: auto; }
.modal-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.modal-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.modal-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.modal-card input, .modal-card textarea { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 500; }
.modal-close { position: absolute; top: 10px; left: 12px; background: none; border: 0; font-size: 24px; color: var(--text-2); line-height: 1; cursor: pointer; }

/* ─── Banners ─── */
.banner-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.banner { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/6; box-shadow: var(--shadow-sm); transition: var(--transition); }
.banner:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-title { position: absolute; bottom: 10px; right: 12px; color: #fff; font-weight: 800; font-size: 14px; background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 99px; backdrop-filter: blur(4px); }

/* ─── Banner carousel ─── */
.banner-carousel { margin-top: 18px; position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.banner-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.banner-slide { flex: 0 0 100%; position: relative; aspect-ratio: 21/9; overflow: hidden; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide .banner-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.12)); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 18px; }
.banner-slide .banner-title { color: #fff; font-weight: 800; font-size: 16px; margin: 0 0 4px; }
.banner-slide .banner-sub { color: #FFD700; font-weight: 700; font-size: 13px; }
.banner-slide .banner-type { position: absolute; top: 12px; right: 12px; background: rgba(212,175,55,.95); color: #1a1a1a; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.banner-nav { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banner-nav button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--border); padding: 0; transition: var(--transition); cursor: pointer; }
.banner-nav button.active { background: #D4AF37; width: 22px; border-radius: 99px; }

/* ─── Verification ─── */
.verify-status { padding: 14px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.verify-status.none { background: var(--surface-2); color: var(--text-2); }
.verify-status.pending { background: rgba(249,115,22,.12); color: var(--orange-600); }
.verify-status.approved { background: rgba(16,185,129,.12); color: #15803d; }
.verify-status.rejected { background: rgba(220,38,38,.12); color: #dc2626; }
.image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 8px; }
.image-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.img-preview-item { position: relative; }
.img-preview-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.img-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(220,38,38,.9); color: #fff; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.location-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.location-row select { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; color: var(--text); outline: none; font-size: 13.5px; font-weight: 600; width: 100%; }
.location-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ─── Location card / nav chooser ─── */
.location-card { margin-top: 16px; padding: 14px; border: 1.5px solid #D4AF37; border-radius: var(--radius); background: color-mix(in srgb, #D4AF37 6%, var(--surface)); }
.location-card-head { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #B8930A; font-size: 14px; margin-bottom: 6px; }
[data-theme="dark"] .location-card-head { color: #E8C64A; }
.nav-apps { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.nav-app { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; font-weight: 700; font-size: 14px; transition: var(--transition); }
.nav-app:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-2); }

/* ─── دراپ‌داون قیمت روز ─── */
.price-dropdown { position: relative; }
.price-sheet { position: absolute; top: calc(100% + 8px); left: 0; z-index: 300; width: 240px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; }
.price-sheet-head { font-size: 13px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.price-sheet-item { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; }
.ps-iron { font-size: 14px; font-weight: 800; }
.price-sheet-item .muted { font-size: 11px; }

/* ─── کد دعوت ─── */
.invite-code-box { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: 12px; flex-wrap: wrap; }
.invite-code-box span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.invite-code-box strong { font-size: 16px; letter-spacing: 1px; color: var(--navy); direction: ltr; }

/* ─── نمودار بازدید ─── */
.vbar-chart { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding: 10px 4px; min-height: 200px; }
.vbar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 38px; }
.vbar-val { font-size: 10.5px; font-weight: 700; color: var(--text-2); }
.vbar { width: 22px; background: linear-gradient(180deg, var(--navy), var(--orange)); border-radius: 6px 6px 0 0; }
.vbar-date { font-size: 9.5px; color: var(--text-3); white-space: nowrap; }

/* ─── وضعیت آگهی ─── */
@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.status-pending { animation: statusPulse 1.6s ease infinite; display: inline-flex; align-items: center; gap: 4px; }
@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.status-check { display: inline-flex; align-items: center; gap: 4px; }
.status-check svg { animation: popIn .5s ease both; }

/* ─── Responsive additions ─── */
@media (max-width: 900px) {
  .ad-detail-grid { grid-template-columns: 1fr; }
  .seller-card { position: static; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 260px; border-inline-end: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .ad-title { font-size: 18px; }
  .price-value { font-size: 18px; }
}

/* ============================================
   UI جدید — کامپوننت‌های اضافه‌شده
   ============================================ */

/* ─── عنوان برند + هدر ─── */
.brand { gap: 10px; }
.brand-title { display: flex; flex-direction: column; line-height: 1.35; }
.brand-title strong { font-size: 15px; font-weight: 800; }
.brand-title span { font-size: 11px; color: var(--text-3); }

.header-nav { display: none; gap: 4px; flex: 1; justify-content: center; }
.header-nav a { padding: 8px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.header-nav a:hover { color: var(--navy); background: var(--surface-2); }
.header-nav a.active { color: var(--navy); background: var(--surface-2); }
[data-theme="dark"] .header-nav a.active { color: #93b0ff; }

.price-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 11px; padding: 5px 10px; color: var(--navy);
  box-shadow: var(--shadow-sm); transition: var(--transition); flex-shrink: 0;
}
[data-theme="dark"] .price-btn { color: #93b0ff; }
.price-btn svg { width: 18px; height: 18px; }
.price-btn span { font-size: 9.5px; font-weight: 800; line-height: 1.4; }

/* ─── ردیف جستجو ─── */
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row .search-wrap { height: 46px; flex: 1; min-width: 0; padding: 4px 4px 4px 10px; }
.search-row .search-wrap > svg { flex-shrink: 0; }
.go-btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-600));
  color: #fff; border: 0; border-radius: 11px; width: 38px; height: 38px;
  font-weight: 800; font-size: 13px; box-shadow: 0 4px 12px rgba(240,106,30,.35);
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
}
.go-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.filter-btn {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.filter-btn svg { width: 20px; height: 20px; }
.voice-btn { position: relative; width: 38px; height: 38px; flex-shrink: 0; }
.voice-btn .ai-dot { position: absolute; top: 5px; left: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--surface); }

/* ─── دسته‌بندی سریع ─── */
.quick-cats { display: flex; gap: 10px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.quick-cats::-webkit-scrollbar { display: none; }
.qcat {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 62px; background: none; border: 0; cursor: pointer;
}
.qcat .ico {
  width: 52px; height: 52px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.qcat.active .ico { background: linear-gradient(135deg, var(--navy), var(--navy-600)); border-color: transparent; }
.qcat span { font-size: 11px; font-weight: 700; color: var(--text-2); }

/* ─── دکمه‌های ویژه / مزایده ─── */
.cta-area { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cta-special {
  display: block; border: 0; border-radius: 12px; padding: 13px 18px;
  background: linear-gradient(135deg, var(--orange), var(--orange-600)); color: #fff;
  font-size: 14.5px; font-weight: 800; box-shadow: 0 4px 14px rgba(240,106,30,.3);
  text-align: center; transition: var(--transition);
}
.cta-special:hover { transform: translateY(-1px); }
.cta-map {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--navy); border-radius: 12px; padding: 13px 18px;
  background: var(--surface); color: var(--navy);
  font-size: 14.5px; font-weight: 800; text-align: center; width: 100%; transition: var(--transition);
}
.cta-map:hover { transform: translateY(-1px); background: var(--surface-2); }
.cta-auction {
  display: block; border: 1.5px solid var(--gold); border-radius: 12px; padding: 13px 18px;
  background: linear-gradient(135deg, #1a1a1a, #3a3a3a); color: #fff;
  font-size: 14.5px; font-weight: 800; text-align: center; width: 100%; transition: var(--transition);
}
.cta-auction:hover { transform: translateY(-1px); }
.auction-slogan { font-size: 11px; font-weight: 800; color: var(--gold); text-align: center; margin-top: 4px; }

/* ─── چیپ‌های فیلتر ─── */
.filter-chips { display: flex; gap: 7px; overflow-x: auto; padding: 14px 0 0; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 99px; background: var(--surface);
  border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--text-2);
  white-space: nowrap; cursor: pointer; transition: var(--transition);
}
.fchip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ─── نوار پایین (موبایل) ─── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--text-3); }
.nav-item.active { color: var(--navy); }
[data-theme="dark"] .nav-item.active { color: #93b0ff; }
.nav-item .n-ico { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.fab {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-600)); color: #fff;
  border: 4px solid var(--surface); box-shadow: 0 6px 16px rgba(240,106,30,.45);
  display: flex; align-items: center; justify-content: center; margin-top: -30px;
}

/* ─── فیلتر پایین‌شیت ─── */
.sheet-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.filter-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,.25); max-width: 520px; margin: 0 auto;
  max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.filter-sheet.open { transform: translateY(0); }
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--border); margin: 0 auto 14px; }
.sheet-title { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.sheet-close { background: none; border: 0; font-size: 22px; color: var(--text-3); line-height: 1; }
.sheet-field { margin-bottom: 13px; }
.sheet-field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.sheet-seg { display: flex; gap: 6px; }
.sheet-seg button { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.sheet-seg button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.sheet-select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-size: 13px; color: var(--text); }
.sheet-price-row { display: flex; gap: 8px; align-items: center; }
.sheet-price-row input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-family: inherit; font-size: 13px; color: var(--text); width: 100%; }

/* ─── ریسپانسیو کامپوننت‌های جدید ─── */
.desktop-only { display: none; }
@media (min-width: 768px) {
  .header-nav { display: flex; }
  .bottom-nav { display: none; }
  .desktop-only { display: inline-flex; }
}

/* ─── فیکس همپوشانی نوار پایین با محتوا (موبایل) ─── */
@media (max-width: 768px) {
  .site-footer { padding-bottom: 86px; }
  .site-main { padding-bottom: 20px; }
}
@media (max-width: 640px) {
  .header-inner { gap: 8px; }
  .brand-title strong { font-size: 14px; }
  .price-btn { padding: 4px 7px; }
  .price-btn svg { width: 16px; height: 16px; }
  .search-row { gap: 6px; }
  .search-wrap { padding: 4px 4px 4px 8px; }
  .price-sheet { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 24px)); }
}
@media (max-width: 400px) {
  .brand-title { display: none; }
  .brand-logo { height: 36px; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (min-width: 1024px) {
  .cta-area { flex-direction: row; }
  .cta-special, .cta-auction, .cta-map { flex: 1; }
  .auction-slogan { text-align: right; }
}

/* ─── آکاردئون پروفایل ─── */
.acc-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 15px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.acc-item:hover { border-color: var(--navy); }
.acc-item .ai { font-size: 20px; }
.acc-item .at { flex: 1; text-align: right; }
.acc-item .ar { color: var(--text-3); transition: var(--transition); font-size: 15px; }
.acc-item.open .ar { transform: rotate(180deg); }
.acc-panel {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px; margin-top: 8px;
  font-size: 13px; box-shadow: var(--shadow-sm);
}
.acc-panel.open { display: block; animation: fadeUp .2s ease; }

/* ─── صفحه دسته‌بندی ─── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm); transition: var(--transition); text-align: center;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--navy); }
.cat-card .ci { font-size: 34px; }
.cat-card b { font-size: 14px; font-weight: 800; }
.cat-card span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.cat-group-title { font-size: 13px; font-weight: 800; color: var(--text-2); margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.cat-group-title::before { content: ''; width: 4px; height: 16px; border-radius: 99px; background: linear-gradient(180deg, var(--navy), var(--orange)); }

/* ─── نقشه آگهی‌ها ─── */
.map-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.map-search-row { display: flex; gap: 8px; }
.map-search-row .search-wrap { flex: 1; }
.map-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.map-field { display: flex; flex-direction: column; gap: 6px; }
.map-field span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.map-field select { width: 100%; }
.map-filters > input,
.map-filters > select { flex: 1; min-width: 140px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-family: inherit; font-size: 13px; color: var(--text); }
.map-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.map-hint { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; }
.bma-legend { display: inline-flex; align-items: center; gap: 5px; }
.bma-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.bma-legend .dot.exact { background: var(--navy); }
.bma-legend .dot.approx { background: #94a3b8; }
.bma-legend .dot.special { background: var(--orange); }
.map-container { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.map-canvas { width: 100%; height: 62vh; min-height: 380px; z-index: 1; background: #dfe8ef; }
.map-loading { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: var(--surface); font-weight: 800; color: var(--text-2); }
.map-empty { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; background: var(--surface); color: var(--text-2); font-weight: 700; }
.map-empty[hidden] { display: none; }
.bma-pin { background: none; border: none; }
.bma-pin-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); cursor: pointer; transition: transform .12s ease; }
.bma-pin-dot:hover { transform: scale(1.25); }
.bma-pin-dot.special { background: var(--orange); }
.bma-pin-dot.approx { background: #64748b; }
.map-popup { display: flex; gap: 8px; text-decoration: none; color: inherit; min-width: 210px; }
.map-popup .mp-thumb { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; flex: 0 0 58px; background: var(--surface-2); }
.map-popup .mp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.map-popup .mp-body { display: flex; flex-direction: column; gap: 3px; }
.map-popup .mp-body strong { font-size: 13px; line-height: 1.5; }
.map-popup .mp-price { color: var(--navy); font-weight: 800; font-size: 13px; }
.map-popup .mp-meta { color: var(--text-3); font-size: 11px; }
.mp-badge { align-self: flex-start; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.mp-badge.exact { background: rgba(22, 51, 122, .12); color: var(--navy); }
.mp-badge.approx { background: rgba(100, 116, 139, .14); color: #64748b; }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: 10px 12px; }

/* لیست نتایج نقشه */
.map-results { margin-top: 14px; }
.map-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.map-results-head strong { font-weight: 800; font-size: 15px; }
.map-result-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.map-result-card { display: flex; gap: 10px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; transition: transform .12s ease, box-shadow .12s ease; }
.map-result-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mrc-thumb { width: 64px; height: 64px; border-radius: 9px; overflow: hidden; flex: 0 0 64px; background: var(--surface-2); }
.mrc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mrc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mrc-body strong { font-size: 13px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrc-body .mp-meta { font-size: 11px; }

/* نقشه در حالت تاریک */
html.dark .map-canvas { filter: brightness(.82) invert(1) hue-rotate(180deg); }
html.dark .map-canvas img { filter: invert(1) hue-rotate(180deg); }

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