/* Nimat Cars — the same family as Nimat Melk: a white page, navy for actions
   and headings, and red kept for the few things that must catch the eye
   (the sell button, «sold», the slider's red line and speed streaks). */

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn.woff2") format("woff2-variations"), url("/static/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --asphalt: #ffffff;      /* page */
  --surface: #ffffff;      /* cards, panels */
  --surface-2: #f6f7f9;    /* soft fills */
  --line: #e3e6eb;
  --chrome: #555c68;       /* secondary text */
  --text: #111111;
  --navy: #14274e;
  --navy-dark: #0d1b38;
  --navy-soft: #e9edf5;
  --navy-line: #c9d2e3;
  --blue: var(--navy);
  --blue-hi: #2a4a8c;      /* links and focus */
  --brake: #b23b3b;        /* red */
  --red-dark: #8f2c2c;
  --good: #1d7a50;
  --warn: #a47a1f;
  --radius: 14px;
  --wrap: 1240px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --glass: var(--asphalt);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--asphalt);
  color: var(--text);
  font: 400 16px/1.75 "Vazirmatn", Tahoma, sans-serif;
  font-feature-settings: "ss01";
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-hi); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 99; background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 760px); margin-inline: auto; }
.muted { color: var(--chrome); }
.small { font-size: .875rem; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.i-lg { width: 1.8rem; height: 1.8rem; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* type scale: 14 / 16 / 20 / 28 / 40 / 72+ */
.h1 { color: var(--navy); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 850; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
.h2 { color: var(--navy); font-size: 1.5rem; font-weight: 800; line-height: 1.35; margin: 0 0 1rem; }
.h3 { font-size: 1.15rem; font-weight: 750; margin: 1.5rem 0 .5rem; }
.lead { font-size: 1.2rem; color: var(--chrome); }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-red { background: var(--brake); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { background: #fff; border-color: var(--navy-line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); background: var(--navy-soft); }
.btn-danger { background: transparent; border-color: #e7c3c3; color: var(--brake); }
.btn-sm { min-height: 38px; padding: .35rem .9rem; font-size: .9rem; }
.btn-xs { min-height: 30px; padding: .2rem .6rem; font-size: .8rem; }
.btn-lg { min-height: 52px; padding: .7rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue-hi); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem max(1rem, calc((100% - var(--wrap)) / 2));
  background: color-mix(in srgb, var(--asphalt) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.page-home .topbar { position: fixed; inset-inline: 0; background: linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,0)); border-color: transparent; backdrop-filter: none; }
.page-home .topbar.is-scrolled { background: color-mix(in srgb, var(--asphalt) 88%, transparent); backdrop-filter: blur(14px); border-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 900; font-size: 1.2rem; color: var(--navy); }
.logo svg { width: 38px; height: 38px; }
.nav { display: flex; gap: .25rem; margin-inline-start: auto; }
.nav a { text-decoration: none; padding: .4rem .75rem; border-radius: 8px; color: var(--chrome); font-weight: 600; }
.nav a:hover, .nav a[aria-current] { color: var(--navy); background: var(--navy-soft); }
.nav-admin { color: var(--brake) !important; }
.fav-count { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .3em; border-radius: 99px; background: var(--brake); color: #fff; font-size: .75rem; }
.top-actions { display: flex; gap: .5rem; }

/* bottom tab bar: the web app's own navigation on phones */
.tabbar { display: none; }
@media (max-width: 860px) {
  .nav, .hide-sm { display: none; }
  .top-actions { margin-inline-start: auto; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94); backdrop-filter: blur(16px); box-shadow: 0 -4px 20px rgba(20,39,78,.06);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; text-decoration: none; font-size: .72rem; color: var(--chrome); padding: .3rem 0; border-radius: 10px; }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--navy); font-weight: 700; }
  .tabbar .tab-sell .i { width: 40px; height: 40px; padding: 9px; margin-top: -18px; background: var(--brake); color: #fff; border-radius: 14px; box-shadow: 0 0 0 4px #fff; }
}

/* ---------------------------------------------------------- price */
.price { display: inline-flex; align-items: baseline; gap: .35rem; color: var(--navy); white-space: nowrap; }
.price b { font-size: 1.15rem; font-weight: 850; letter-spacing: -.01em; }
.price small { font-size: .8rem; font-weight: 600; color: var(--chrome); }
.price-ask b { color: var(--chrome); font-weight: 700; }
.price-lg b { font-size: 2rem; font-weight: 900; }
.price-lg small { font-size: 1rem; }
.price-toman { display: block; margin-top: .2rem; font-size: .95rem; font-weight: 700; color: var(--navy); }
.usd-note { margin: .15rem 0 0; font-size: .78rem; color: var(--chrome); }

/* ---------------------------------------------------------- hero slider */
.hero {
  position: relative; height: min(100svh, 860px); min-height: 600px; overflow: hidden;
  isolation: isolate; background: radial-gradient(90% 80% at 25% 75%, var(--navy-soft) 0%, #fff 65%);
  perspective: 1200px;
}
.hero-track { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; visibility: hidden; }
.slide-copy { grid-column: 1; grid-row: 1; }
.slide-car { grid-column: 2; grid-row: 1; }
.slide.is-active, .slide.is-leaving { visibility: visible; }
.slide-bg { position: absolute; inset: -40px; background-image: var(--img); background-size: cover; background-position: center; filter: blur(28px) saturate(1.2); transform: scale(1.1) translateZ(0); opacity: .16; }
.slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, var(--asphalt) 92%), linear-gradient(transparent 55%, var(--asphalt)); }
.slide-bg-sedan, .slide-bg-suv, .slide-bg-hatch { background: radial-gradient(55% 45% at 30% 62%, var(--navy-soft), transparent); filter: none; opacity: 1; }
.slide-bg-suv { background: radial-gradient(55% 45% at 30% 62%, #f6e6e6, transparent); }

/* RTL: the copy sits on the right (first column), the car on the left */
.slide-copy { position: relative; z-index: 2; padding: 0 max(1.25rem, calc((100vw - var(--wrap)) / 2)); padding-inline-end: 1rem; padding-top: 4rem; }
.slide-brand { margin: 0; color: var(--chrome); font-weight: 600; font-size: 1.05rem; }
.slide-brand span { opacity: .6; margin-inline-start: .4rem; font-family: system-ui, sans-serif; }
.slide-title {
  margin: .2rem 0 1.4rem; font-weight: 900; line-height: 1.02; letter-spacing: -.02em;
  font-size: clamp(2.8rem, 1.5rem + 5.2vw, 6.2rem);
  color: var(--navy);
}
.slide-lead { font-size: 1.15rem; color: var(--chrome); max-width: 34ch; margin: -.6rem 0 1.6rem; }
.slide-specs { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; gap: 2rem; }
.slide-specs li { display: grid; }
.slide-specs b { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.slide-specs span { color: var(--chrome); font-size: .85rem; }
.slide-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.slide-car { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; padding: 6rem 2rem 9rem; transform-style: preserve-3d; transition: transform .25s ease-out; }
.slide-car img {
  box-shadow: 0 30px 60px rgba(20,39,78,.18);
  width: 100%; max-height: 62vh; object-fit: cover; border-radius: 22px;
  aspect-ratio: 16 / 10;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  transform: translateZ(40px);
}
.slide-silhouette svg { width: min(92%, 760px); color: var(--navy); --glass: #dfe5ef; filter: drop-shadow(0 30px 30px rgba(20,39,78,.25)); transform: translateZ(40px); }
.slide-silhouette::after { content: ""; position: absolute; bottom: 30%; inset-inline: 12%; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(20,39,78,.35), transparent); }

/* entering: the car drives in from the edge with a slight overshoot; leaving: it
   blasts out the other way, stretched and blurred like a long exposure */
.slide.is-active .slide-car { animation: car-in 1.1s var(--ease-out) both; }
.slide.is-active .slide-copy > * { animation: copy-in .9s var(--ease-out) both; }
.slide.is-active .slide-copy > :nth-child(2) { animation-delay: .08s; }
.slide.is-active .slide-copy > :nth-child(3) { animation-delay: .16s; }
.slide.is-active .slide-copy > :nth-child(4) { animation-delay: .24s; }
.slide.is-active .slide-bg { animation: bg-in 1.2s ease both; }
.slide.is-leaving .slide-car { animation: car-out .6s cubic-bezier(.45, 0, .7, .2) both; }
.slide.is-leaving .slide-copy { animation: copy-out .45s ease-in both; }
.slide.is-leaving .slide-bg { animation: bg-out .7s ease both; }
.hero.go-back .slide.is-active .slide-car { animation-name: car-in-back; }
.hero.go-back .slide.is-leaving .slide-car { animation-name: car-out-back; }

@keyframes car-in { 0% { transform: translateX(70vw) skewX(-12deg); filter: blur(14px); opacity: 0; } 60% { transform: translateX(-3vw) skewX(3deg); filter: blur(0); opacity: 1; } 100% { transform: none; } }
@keyframes car-in-back { 0% { transform: translateX(-70vw) skewX(12deg); filter: blur(14px); opacity: 0; } 60% { transform: translateX(3vw) skewX(-3deg); filter: blur(0); opacity: 1; } 100% { transform: none; } }
@keyframes car-out { to { transform: translateX(-90vw) scaleX(1.25) skewX(14deg); filter: blur(18px); opacity: 0; } }
@keyframes car-out-back { to { transform: translateX(90vw) scaleX(1.25) skewX(-14deg); filter: blur(18px); opacity: 0; } }
@keyframes copy-in { from { transform: translateY(26px); opacity: 0; clip-path: inset(0 0 100% 0); } to { transform: none; opacity: 1; clip-path: inset(0 0 -20% 0); } }
@keyframes copy-out { to { transform: translateY(-14px); opacity: 0; } }
@keyframes bg-in { from { opacity: 0; } }
@keyframes bg-out { to { opacity: 0; } }

/* the speed streaks: brake-light and headlight lines that sweep across on a change */
.streaks { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
/* physical sides on purpose: the cars drive nose-left, so forward motion runs right to left */
.streaks i { position: absolute; height: 2px; width: 40vw; right: -40vw; border-radius: 2px; opacity: 0; background: linear-gradient(270deg, transparent, var(--c, #fff)); }
.streaks i:nth-child(1) { top: 38%; --c: #b23b3b; height: 3px; }
.streaks i:nth-child(2) { top: 44%; --c: #14274e; }
.streaks i:nth-child(3) { top: 52%; --c: #b23b3b; width: 60vw; }
.streaks i:nth-child(4) { top: 57%; --c: #2a4a8c; }
.streaks i:nth-child(5) { top: 63%; --c: #b23b3b; height: 3px; width: 30vw; }
.streaks i:nth-child(6) { top: 69%; --c: #14274e; width: 50vw; }
.streaks i:nth-child(7) { top: 74%; --c: #b23b3b; }
.hero.is-shifting .streaks i { animation: streak .75s cubic-bezier(.5, 0, .2, 1) both; }
.hero.is-shifting .streaks i:nth-child(2n) { animation-delay: .06s; }
.hero.is-shifting .streaks i:nth-child(3n) { animation-delay: .12s; }
.hero.go-back .streaks i { right: auto; left: -40vw; background: linear-gradient(90deg, transparent, var(--c, #fff)); }
.hero.go-back.is-shifting .streaks i { animation-name: streak-back; }
@keyframes streak { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateX(-180vw); opacity: 0; } }
@keyframes streak-back { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateX(180vw); opacity: 0; } }

/* the tachometer: the slider's position as a dial; the needle swings to each slide */
.tacho { position: absolute; z-index: 4; inset-inline-end: max(1.25rem, calc((100vw - var(--wrap)) / 2)); bottom: 2.2rem; width: 196px; display: grid; justify-items: center; gap: .4rem; }
.tacho > svg { width: 196px; height: 196px; overflow: visible; }
.tacho-face { fill: var(--navy); stroke: var(--navy-dark); stroke-width: 3; }
.tacho-arc { fill: none; stroke: #3d5280; stroke-width: 5; stroke-linecap: round; }
.tacho-red { fill: none; stroke-width: 5; stroke-linecap: round; }
.tacho-ticks text { fill: #b9c4da; font: 700 15px "Vazirmatn", sans-serif; cursor: pointer; transition: fill .2s; }
.tacho-ticks text:hover, .tacho-ticks text.is-on { fill: #fff; }
.tacho-ticks line { stroke: #8b9bbd; stroke-width: 2; }
.tacho-ticks line.minor { stroke-width: 1; stroke: #4a5f8c; }
.tacho-needle { transform-origin: 100px 100px; transition: transform .9s cubic-bezier(.34, 1.56, .64, 1); }
.tacho-needle line { stroke: #ff4b3e; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(255, 90, 80, .7)); }
.tacho-needle circle { fill: var(--navy-dark); stroke: #ff4b3e; stroke-width: 2; }
.tacho-gear { fill: #fff; font: 900 28px "Vazirmatn", sans-serif; }
.tacho-label { fill: #b9c4da; font: 600 11px "Vazirmatn", sans-serif; }
.tacho.is-revving .tacho-needle { transition-duration: .35s; transition-timing-function: ease-in; }
.tacho-btns { display: flex; gap: .4rem; }
.tacho-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--navy-line); background: #fff; color: var(--navy); cursor: pointer; }
.tacho-btn:hover { border-color: var(--navy); background: var(--navy-soft); }

@media (max-width: 860px) {
  .hero { height: auto; min-height: 0; }
  .hero-track { position: relative; height: 640px; }
  .slide { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
  .slide-car { grid-column: 1; grid-row: 1; padding: 4.5rem 0 0; }
  .slide-car img { max-height: none; height: 100%; border-radius: 0; -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 15%, #000 70%, transparent); }
  .slide-copy { grid-column: 1; grid-row: 2; align-self: start; padding: 0 1.25rem; }
  .slide-title { font-size: clamp(2.4rem, 10vw, 3.6rem); margin-bottom: 1rem; }
  .slide-specs { gap: 1.25rem; margin-bottom: 1.2rem; }
  .slide-specs b { font-size: 1.2rem; }
  .tacho { position: relative; inset: auto; bottom: auto; margin: -1rem auto 0; width: auto; grid-auto-flow: column; align-items: center; gap: 1rem; }
  .tacho > svg { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide.is-active .slide-car, .slide.is-active .slide-copy > *, .slide.is-leaving .slide-car,
  .slide.is-leaving .slide-copy, .hero.is-shifting .streaks i, .slide-bg { animation: none !important; }
  .slide.is-leaving { visibility: hidden; }
  .tacho-needle { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------- finder */
.finder { position: relative; z-index: 5; margin-top: -1.5rem; }
.finder-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(20,39,78,.12); }
.finder-form label { display: grid; gap: .25rem; }
.finder-form label span { font-size: .85rem; color: var(--chrome); padding-inline-start: .2rem; }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.quick a { text-decoration: none; padding: .35rem .9rem; border-radius: 99px; border: 1px solid var(--line); color: var(--chrome); font-size: .9rem; }
.quick a:hover { color: var(--navy); border-color: var(--navy); background: var(--navy-soft); }
@media (max-width: 860px) { .finder { margin-top: 1rem; } .finder-form { grid-template-columns: 1fr 1fr; } .finder-form .btn { grid-column: 1 / -1; } }

/* ---------------------------------------------------------- form controls */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: .55rem .8rem; border-radius: 10px;
  background: #fff; border: 1px solid #d5dae2; transition: border-color .15s;
}
textarea { resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-hi); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239aa7b4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: left .85rem center; background-size: 12px 8px; background-repeat: no-repeat; padding-inline-end: 2.2rem; }
select:disabled { opacity: .5; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 18px; height: 18px; }
input[type=range] { width: 100%; accent-color: var(--blue); }
.field { display: grid; gap: .3rem; margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.field > span, .field-label, .field legend { font-size: .9rem; color: var(--chrome); font-weight: 600; }
.field.pair { grid-template-columns: 1fr 1fr; gap: .5rem; }
.field.pair legend { grid-column: 1 / -1; margin-bottom: .3rem; }
.hint { color: var(--chrome); font-size: .8rem; }
.checks { gap: .5rem; }
.checks label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; padding: .45rem .95rem; border-radius: 10px; border: 1px solid #d5dae2; color: var(--chrome); font-weight: 600; background: #fff; }
.segmented input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--blue-hi); outline-offset: 2px; }
.row2, .row3 { display: grid; gap: 0 1rem; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.trap { position: absolute; inset-inline-start: -9999px; }

/* ---------------------------------------------------------- sections */
.section { margin-block: 4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.more { color: var(--brake); font-weight: 700; text-decoration: none; }
.page-head { margin: 2.5rem auto 1.5rem; }

.brand-row { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.brand-chip { flex: none; scroll-snap-align: start; display: grid; gap: .1rem; min-width: 140px; padding: .9rem 1.1rem; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; background: var(--surface); }
.brand-chip strong { font-size: 1.05rem; color: var(--navy); }
.brand-chip span { color: var(--chrome); font-size: .85rem; }
.brand-chip:hover { border-color: var(--navy); background: var(--navy-soft); }

/* ---------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { transition: box-shadow .2s, border-color .2s; }
.card:hover { border-color: var(--navy-line); box-shadow: 0 14px 36px rgba(20,39,78,.12); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.04); }
.card-ghost { width: 70%; color: var(--navy-line); --glass: var(--surface-2); }
.card.is-sold .card-media img { filter: grayscale(.9) brightness(.6); }
.ribbon { position: absolute; top: .75rem; inset-inline-start: .75rem; background: var(--brake); color: #fff; font-weight: 800; font-size: .8rem; padding: .2rem .65rem; border-radius: 6px; }
.ribbon-blue { background: var(--blue); }
.ribbon-lg { font-size: 1rem; padding: .35rem 1rem; z-index: 2; }
.count { position: absolute; bottom: .6rem; inset-inline-start: .6rem; display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .15rem .5rem; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; }
.fav { position: absolute; top: .6rem; inset-inline-end: .6rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; z-index: 2; }
.fav[aria-pressed=true], .tool[data-fav][aria-pressed=true] { color: var(--brake); --heart-fill: var(--brake); }
.card-body { padding: .9rem 1rem 1rem; display: grid; align-content: start; gap: .35rem; }
.card-title { margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.45; }
.card-title a { text-decoration: none; color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: var(--chrome); font-size: .88rem; }
.specs li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #b8c0cc; margin-inline-end: .9rem; vertical-align: middle; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.cmp { position: relative; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: none; cursor: pointer; color: var(--chrome); }
.cmp[aria-pressed=true], .tool[data-compare][aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; }

.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--navy-line); background: var(--surface-2); border-radius: 18px; display: grid; justify-items: center; gap: .5rem; }
.empty svg { width: 180px; color: var(--navy-line); --glass: #fff; }
.empty h3 { margin: 0; }

/* ---------------------------------------------------------- listing page */
.listing { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 2rem; align-items: start; }
.filters { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; max-height: calc(100vh - 100px); overflow-y: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.filters-head h2 { margin: 0; font-size: 1.1rem; }
.filters-head { gap: .75rem; }
.filters-head .linklike { margin-inline-start: auto; }
.close-filters { display: none; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sort { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.sort span { color: var(--chrome); font-size: .9rem; white-space: nowrap; }
.show-filters { display: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 2rem; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.pager [aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .gap { border: 0; }
[data-results].is-loading { opacity: .5; transition: opacity .2s; }
@media (max-width: 960px) {
  .listing { grid-template-columns: 1fr; }
  .show-filters { display: inline-flex; }
  .filters { position: fixed; inset: auto 0 0 0; top: auto; z-index: 60; max-height: 86vh; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .35s var(--ease-out); padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
  .filters.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(13, 27, 56, .45); }
  .close-filters { display: inline-flex; }
  .price-lg b { font-size: 1.6rem; }
}

/* ---------------------------------------------------------- car page */
.crumbs { display: flex; gap: .5rem; margin-top: 1.5rem; color: var(--chrome); font-size: .9rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.car-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 4fr); gap: 2rem; margin-top: 1rem; align-items: start; }
.gallery { position: relative; min-width: 0; }
.gallery-main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; background: var(--surface-2); }
.gallery-main::-webkit-scrollbar { display: none; }
.gallery-main figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: .5rem; overflow-x: auto; margin-top: .6rem; padding-bottom: .3rem; }
.gallery-thumbs button { flex: none; width: 84px; aspect-ratio: 4/3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .6; }
.gallery-thumbs button[aria-current] { border-color: var(--blue-hi); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { aspect-ratio: 4/3; border-radius: 18px; background: var(--surface-2); display: grid; place-content: center; justify-items: center; text-align: center; color: var(--chrome); }
.gallery-empty svg { width: 260px; color: var(--navy-line); --glass: var(--surface-2); }
.gallery .ribbon-lg { top: 1rem; inset-inline-start: 1rem; }
.buybox { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; display: grid; gap: 1rem; box-shadow: 0 18px 50px rgba(20,39,78,.08); }
.buybox .h1 { color: var(--navy); }
.buybox-brand { margin: 0; color: var(--chrome); }
.buybox .price { justify-self: start; }
.buybox .h1 { margin: -.6rem 0 0; }
.buybox-specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; }
.buybox-specs li { display: grid; padding: .6rem .8rem; }
.buybox-specs li + li { border-inline-start: 1px solid var(--line); }
.buybox-specs span { color: var(--chrome); font-size: .8rem; }
.buybox-specs b { font-size: 1rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { padding: .2rem .7rem; border-radius: 99px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.badge-good { border-color: color-mix(in srgb, var(--good) 60%, transparent); color: var(--good); }
.badge-warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); color: var(--warn); }
.buybox-actions { display: grid; gap: .5rem; }
.buybox-tools { display: flex; gap: .5rem; }
.tool { flex: 1; display: grid; justify-items: center; gap: .2rem; padding: .6rem .3rem; border-radius: 12px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: .82rem; color: var(--chrome); }
.tool:hover { color: var(--navy); border-color: var(--navy-line); background: var(--navy-soft); }
.meta-line { display: flex; gap: 1rem; margin: 0; }
.car-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-top: 3rem; }
.spec-sheet { max-width: 920px; }
.spec-sheet dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--line); }
.spec-sheet dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
.spec-sheet dl div:nth-child(odd) { padding-inline-end: 1.5rem; }
.spec-sheet dl div:nth-child(even) { padding-inline-start: 1.5rem; border-inline-start: 1px solid var(--line); }
.spec-sheet dt { color: var(--chrome); }
.spec-sheet dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--line); }
.desc { white-space: pre-line; max-width: 70ch; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--navy-dark); margin-bottom: .4rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.count-video { inset-inline-start: auto; inset-inline-end: .6rem; background: var(--brake); }
.ai-btn { justify-self: start; margin-top: .4rem; }

.lead-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; align-self: start; }
.lead-box .h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.lead-box { grid-column: 1 / -1; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.lead-form .field-wide { grid-column: 1 / -1; }
.lead-form .btn { justify-self: start; }
@media (max-width: 960px) {
  .car-layout, .car-details { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .gallery-main { border-radius: 0; margin-inline: -1rem; }
  .spec-sheet dl { grid-template-columns: 1fr; }
  .spec-sheet dl div:nth-child(n) { padding-inline: .2rem; border-inline-start: 0; }
  .lead-form { grid-template-columns: 1fr; }
}

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(13, 27, 56, .92); }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }
.lightbox-close { position: fixed; top: 1rem; inset-inline-end: 1rem; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; font-size: 1.8rem; cursor: pointer; }

/* ---------------------------------------------------------- sell band, app band */
.sell-band { display: grid; grid-template-columns: 1.2fr 1.4fr auto; gap: 2rem; align-items: center; padding: 2rem; border-radius: 22px; background: var(--navy); color: #fff; border: 0; }
.sell-band p { color: #c9d2e3; margin: 0; max-width: 46ch; }
.sell-band .h2 { color: #fff; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { counter-increment: s; display: grid; gap: .1rem; padding-top: .9rem; border-top: 2px solid #3d5280; position: relative; }
.steps li::before { content: counter(s, persian); position: absolute; top: -.85rem; inset-inline-start: 0; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--brake); color: #fff; font-weight: 800; font-size: .85rem; }
.steps span { color: #c9d2e3; font-size: .85rem; }
@media (max-width: 960px) { .sell-band { grid-template-columns: 1fr; } .steps { grid-template-columns: 1fr; gap: 1.6rem; } }

.app-band { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; }
.app-band p { color: var(--chrome); max-width: 52ch; }
.phone-mock { width: 170px; aspect-ratio: 9 / 18.5; border-radius: 30px; border: 6px solid var(--navy-dark); background: var(--navy-dark); padding: 10px; box-shadow: 0 30px 60px rgba(20,39,78,.25); }
.phone-screen { height: 100%; border-radius: 20px; background: radial-gradient(circle at 50% 30%, #fff, var(--navy-soft)); color: var(--navy); display: grid; place-content: center; justify-items: center; gap: .4rem; }
.phone-screen svg { width: 64px; height: 64px; filter: drop-shadow(0 8px 16px rgba(20, 39, 78, .3)); }
.phone-screen b { font-size: .8rem; }
@media (max-width: 640px) { .app-band { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------------------------------------------------------- forms pages */
.sell-form fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1.2rem .4rem; margin: 0 0 1.25rem; background: var(--surface-2); }
.sell-form legend { padding: 0 .5rem; font-weight: 800; color: var(--navy); }
.dropzone { position: relative; display: grid; justify-items: center; gap: .3rem; text-align: center; padding: 1.6rem 1rem; background: #fff; color: var(--navy); border: 2px dashed var(--navy-line); border-radius: 14px; cursor: pointer; margin-bottom: 1rem; }
.dropzone.is-over, .dropzone:hover { border-color: var(--blue-hi); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.previews figure { margin: 0; position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; }
.previews img { width: 100%; height: 100%; object-fit: cover; }
.previews figure:first-child::after { content: "عکس اصلی"; position: absolute; bottom: 4px; inset-inline-start: 4px; font-size: .7rem; padding: 0 .4rem; border-radius: 4px; background: var(--navy); color: #fff; }
.notice { padding: .9rem 1.1rem; border-radius: 12px; background: var(--navy-soft); border: 1px solid var(--navy-line); }
.notice ul { margin: 0; padding-inline-start: 1.2rem; }
.notice-ok { border-color: #bfe0cf; background: #eef8f2; color: var(--good); }
.notice-bad { border-color: #e7c3c3; background: #fbf1f1; color: var(--red-dark); }
.done { text-align: center; padding: 4rem 0; display: grid; justify-items: center; gap: .5rem; }
.done-mark { width: 110px; height: 110px; }
.done-mark circle { fill: none; stroke: var(--good); stroke-width: 5; stroke-dasharray: 330; animation: draw 1s var(--ease-out) both; }
.done-mark path { fill: none; stroke: var(--good); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; animation: draw .6s .5s var(--ease-out) both; }
.done-off circle, .done-off path { stroke: var(--chrome); }
@keyframes draw { from { stroke-dashoffset: 330; } }
.big-code { font-size: 6rem; font-weight: 900; margin: 0; line-height: 1; color: var(--navy-line); }
.row-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1rem; }
.prose p { max-width: 68ch; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 2rem; }
.facts b { display: block; font-size: 2.2rem; font-weight: 900; color: var(--navy); }
.contact-list { display: grid; gap: .75rem; margin-bottom: 4rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--navy); text-decoration: none; }
.contact-item span { display: grid; }
.contact-item b { font-size: .85rem; color: var(--chrome); font-weight: 600; }
a.contact-item:hover { border-color: var(--navy); background: var(--navy-soft); }

/* ---------------------------------------------------------- compare */
.compare-scroll { overflow-x: auto; margin-bottom: 4rem; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 600px; table-layout: fixed; }
.compare-table th, .compare-table td { padding: .9rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.compare-table tbody th { color: var(--chrome); font-weight: 600; width: 140px; }
.compare-table td.best { color: var(--good); font-weight: 800; }
.cmp-head { display: grid; gap: .5rem; text-decoration: none; }
.cmp-head img, .cmp-head svg { width: 100%; max-width: 320px; border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; background: var(--surface-2); }
.cmp-head svg { color: var(--navy-line); padding: 1.5rem; }
.compare-table td.best .price b { color: var(--good); }
.compare-bar { position: fixed; z-index: 45; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem .5rem 1rem; border-radius: 16px; background: #fff; border: 1px solid var(--navy-line); box-shadow: 0 20px 50px rgba(20,39,78,.2); white-space: nowrap; }
@media (max-width: 860px) { .compare-bar { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.toast { position: fixed; z-index: 70; top: 1rem; left: 50%; transform: translate(-50%, -200%); visibility: hidden; padding: .7rem 1.2rem; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; transition: transform .35s var(--ease-out), visibility 0s .35s; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease-out); }

/* ---------------------------------------------------------- footer */
.footer { margin-top: 5rem; padding: 3rem 0 1rem; background: var(--navy); color: #fff; }
.footer .logo { color: #fff; }
.footer .muted, .footer .links a, .footer .links button { color: #c9d2e3; }
.footer .links a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer h3 { font-size: 1rem; margin: .3rem 0 .8rem; }
.footer p { max-width: 46ch; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.links a, .links button { color: var(--chrome); text-decoration: none; font-size: .95rem; }
.links a:hover { color: var(--text); }
.copyright { font-size: .85rem; margin-top: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- admin */
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.admin-nav > a:not(.btn) { text-decoration: none; padding: .4rem .8rem; border-radius: 8px; color: var(--chrome); font-weight: 600; }
.admin-nav > a[aria-current] { background: var(--navy-soft); color: var(--navy); }
.admin-nav b { font-weight: 800; color: var(--text); margin-inline-start: .2rem; }
.admin-nav .btn { margin-inline-start: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin: 1.5rem 0; }
.admin-stats div { display: grid; padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.admin-stats b { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.admin-stats span { color: var(--chrome); font-size: .85rem; }
@media (max-width: 760px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
.admin-search { display: flex; gap: .5rem; margin-bottom: 1rem; }
.admin-list { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: .6rem; }
.admin-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem; align-items: center; padding: .7rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.admin-row.is-done { opacity: .55; }
.admin-thumb { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-thumb svg { width: 80%; color: var(--navy-line); }
.admin-info { display: grid; gap: .3rem; justify-items: start; }
.admin-info a { text-decoration: none; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: end; margin-bottom: 2rem; }
.admin-row .admin-actions { margin: 0; }
@media (max-width: 760px) { .admin-row { grid-template-columns: 90px 1fr; } .admin-row .admin-actions { grid-column: 1 / -1; justify-content: start; } }
.admin-photos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 2rem; }
.admin-photos li { position: relative; display: grid; gap: .4rem; }
.admin-photos img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; }
.admin-photos .badge { position: absolute; top: .4rem; inset-inline-start: .4rem; background: #fff; }
.admin-photos form { display: flex; gap: .3rem; }
.paste { margin-bottom: 1.5rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 14px; }
.paste summary { cursor: pointer; font-weight: 700; margin-bottom: .6rem; }
.paste textarea { margin-bottom: .6rem; }
.login { padding: 3rem 0 5rem; max-width: 420px; }

.footer [data-install-only]:not(:has(button:not([hidden]))) { visibility: hidden; }
.page-admin .compare-bar { display: none !important; }
.page-compare .compare-bar { display: none !important; }

/* ---------------------------------------------------------- paint map */
.bodymap { width: 100%; max-width: 230px; height: auto; display: block; }
.bm-part { fill: #fff; stroke: var(--navy-line); stroke-width: 2; transition: fill .15s; }
.bm-part.is-paint { fill: #d94848; stroke: #a32f2f; }
.bm-part.is-replace { fill: url(#bm-hatch); stroke: #7a2323; }
.bodymap-edit .bm-part { cursor: pointer; }
.bodymap-edit .bm-part:hover { stroke: var(--navy); stroke-width: 3; }
.bodymap-edit .bm-part:focus-visible { outline: none; stroke: var(--blue-hi); stroke-width: 4; }
.bm-glass path { fill: #c9d4e6; }
.bm-wheels rect { fill: #2b2f36; }
.bm-dir { font: 700 11px "Vazirmatn", sans-serif; fill: var(--chrome); }
.bodymap-view, .bodymap-edit-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1rem; }
.bm-legend, .bm-list { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .4rem; }
.bm-legend { grid-auto-flow: column; justify-content: start; gap: 1rem; font-size: .9rem; color: var(--chrome); }
.bm-legend li, .bm-list li { display: flex; align-items: center; gap: .45rem; }
.bm-key { width: 16px; height: 16px; border-radius: 4px; background: #fff; border: 2px solid var(--navy-line); flex: none; }
.bm-key.is-paint { background: #d94848; border-color: #a32f2f; }
.bm-key.is-replace { background: repeating-linear-gradient(45deg, #8f2c2c 0 4px, #d96b6b 4px 7px); border-color: #7a2323; }
.bm-list { font-weight: 600; }
.bm-clean { color: var(--good); font-weight: 700; }
.bm-summary { font-weight: 600; color: var(--navy); min-height: 1.5em; }
@media (max-width: 640px) { .bodymap-view, .bodymap-edit-wrap { grid-template-columns: 1fr; justify-items: center; } .bm-legend { justify-content: center; } }

/* ---------------------------------------------------------- flags, tabs, extras */
.verified { display: inline-flex; color: var(--navy); vertical-align: -2px; }
.verified .i { width: 1.05em; height: 1.05em; }
.flags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: -.4rem; }
.flag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border-radius: 99px; font-size: .85rem; font-weight: 700; }
.flag-verified { background: var(--navy-soft); color: var(--navy); }
.flag-urgent { background: var(--brake); color: #fff; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.action-row .btn { padding-inline: .4rem; font-size: .9rem; }
.watch-btn { color: var(--brake); border-color: #e7c3c3; }
.hot { margin: 0; color: var(--brake); font-weight: 700; font-size: .9rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.tab { padding: .45rem 1rem; border-radius: 99px; border: 1px solid var(--navy-line); text-decoration: none; color: var(--navy); font-weight: 600; background: #fff; }
.tab[aria-selected=true] { background: var(--navy); color: #fff; border-color: var(--navy); }
.lead-extra { grid-column: 1 / -1; }
.lead-extra.row2 { display: grid; }
.lead-extra[hidden] { display: none; }
.gallery-main figure { position: relative; }
.gallery-main figcaption { position: absolute; bottom: .8rem; inset-inline-start: .8rem; background: rgba(13,27,56,.8); color: #fff; padding: .2rem .7rem; border-radius: 8px; font-size: .85rem; }
.odometer-field { margin-top: .5rem; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.article-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: box-shadow .2s, border-color .2s; }
.article-card:hover { border-color: var(--navy-line); box-shadow: 0 14px 36px rgba(20,39,78,.1); }
.article-card-link { display: grid; gap: .5rem; padding: 1.4rem; text-decoration: none; height: 100%; align-content: start; }
.article-card h2 { margin: 0; font-size: 1.15rem; color: var(--navy); line-height: 1.6; }
.article-card p { margin: 0; color: var(--chrome); font-size: .95rem; }
.article-date { color: var(--brake); font-size: .85rem; font-weight: 700; }
.article { margin-top: 1rem; margin-bottom: 3rem; }
.article header { border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; padding-bottom: 1rem; }
.article p { font-size: 1.08rem; line-height: 2; max-width: 68ch; }
.article .h2 { margin-top: 2rem; font-size: 1.35rem; }
.article-cta { margin-top: 2.5rem; padding: 1.4rem; border-radius: 18px; background: var(--navy-soft); display: grid; gap: .5rem; justify-items: start; }
.article-cta .row-actions { justify-content: start; margin: 0; }
.row-actions.start { justify-content: start; }
.value-result { padding: 1.6rem; border-radius: 18px; background: var(--navy-soft); margin-bottom: 1.5rem; text-align: center; }
.value-range { font-size: 1.5rem; color: var(--navy); margin: .3rem 0; }
.value-range b { font-weight: 900; }
.swap-want { border-color: #e7c3c3 !important; }
.setting-box { padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 1.25rem; background: #fff; }
.setting-box .h2 { font-size: 1.2rem; }
.danger-box { border-color: #e7c3c3; background: #fffafa; }
.reset-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.reset-form .field { margin: 0; flex: 1 1 220px; }
.inline-form { display: inline-block; margin-inline-end: .5rem; }
.admin-row-text { grid-template-columns: 1fr auto; }

.tools-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tool-card { display: grid; gap: .3rem; padding: 1.3rem 1.4rem; border-radius: 18px; border: 1px solid var(--navy-line); background: var(--navy-soft); text-decoration: none; }
.tool-card b { color: var(--navy); font-size: 1.15rem; }
.tool-card span { color: var(--chrome); font-size: .95rem; }
.tool-card:hover { border-color: var(--navy); }
.article-card .h3 { color: var(--navy); }
.footer .logo svg { background: #fff; border-radius: 12px; padding: 2px; }
@media (max-width: 1280px) { .nav a { padding-inline: .5rem; font-size: .92rem; } .top-actions .hide-sm { display: none; } }
@media (max-width: 1100px) { .nav a[href="/contact"], .nav a[href="/favorites"] { display: none; } }

/* price box with a toman / dollar choice */
.price-row { display: flex; gap: .4rem; }
.price-row input { flex: 1; min-width: 0; }
.price-row .currency { flex: 0 0 auto; width: auto; }

/* settings typed in the panel */
.panel-form fieldset { border: 1px solid var(--line, #e3e7ef); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; }
.panel-form legend { font-weight: 800; color: var(--navy); padding: 0 .4rem; }
.saved-mark { font-style: normal; font-size: .78rem; color: var(--good, #1f8a4c); font-weight: 700; }

/* phones: a menu button with every page, the panel login included (like Nimat Melk) */
.m-menu { display: none; position: relative; }
.m-menu summary { list-style: none; width: 42px; height: 38px; display: grid; place-content: center; gap: 5px; border-radius: 10px; background: var(--navy-soft); cursor: pointer; }
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu summary span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--navy); }
.m-menu nav { position: absolute; inset-inline-end: 0; top: calc(100% + .5rem); z-index: 60; min-width: 220px; display: grid; padding: .5rem; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(13, 27, 56, .2); }
.m-menu nav a { text-decoration: none; padding: .65rem .9rem; border-radius: 10px; color: var(--navy); font-weight: 600; }
.m-menu nav a[aria-current] { background: var(--navy-soft); }
.m-menu nav .nav-admin { margin-top: .3rem; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
@media (max-width: 860px) { .m-menu { display: block; } }
