@charset "utf-8";
/* ==========================================================================
   Darya Rent — design system
   Persian-first RTL. Desktop and mobile are each designed, not one scaled from
   the other. Body weight 500, base 16px, line-height 1.8, ink #101B33 on white,
   secondary never lighter than #627D98, tap targets >= 44px.
   Every colour pair is asserted by scripts/check-contrast.js.
   ========================================================================== */

@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');   font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');     font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Brand tokens sampled from the client's own logo and live theme, not invented:
     navy #0C1C3D and gold #BA8E4A from darya-logod.png; cream #F6EFE2, ink
     #101B33 and secondary #5F6880 from the live theme's CSS variables. */
  --ink:        #101B33;   /* 17.1:1 on white */
  --ink-soft:   #33465C;   /*  8.6:1 */
  --muted:      #5F6880;   /*  5.6:1 — floor is #627D98, we sit above it */
  --line:       #E2E7F0;
  --line-strong:#C2CBD9;
  --bg:         #FFFFFF;
  --bg-alt:     #F5F7FB;
  --bg-sunk:    #EAEEF6;

  --brand:      #0C1C3D;   /* 16.8:1 on white */
  --brand-dark: #06122A;
  --brand-hover:#1B3E7C;
  --brand-tint: #EDF1F8;
  --gold:       #BA8E4A;   /* decorative — 2.98:1 on white, 5.65:1 on navy */
  --gold-ink:   #7E5A1D;   /* the readable gold, for text on light surfaces */
  --gold-tint:  #F6EFE2;
  --accent:     #7E5A1D;
  --accent-tint:#F6EFE2;
  --ok:         #14603F;
  --ok-tint:    #E5F4EC;
  --warn:       #7A4E00;
  --warn-tint:  #FCF3E0;
  --danger:     #A3231C;
  --danger-tint:#FBEAE9;

  --radius-lg: 20px;
  --radius:    14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(12,28,61,.07), 0 2px 8px rgba(12,28,61,.05);
  --shadow:    0 2px 6px rgba(12,28,61,.06), 0 14px 34px rgba(12,28,61,.09);
  --shadow-lg: 0 8px 20px rgba(12,28,61,.10), 0 30px 60px rgba(12,28,61,.14);

  --tap: 44px;
  --header-h: 68px;
  --bottomnav-h: 62px;
  --maxw: 1200px;
  --gap: 24px;
}

/* --------------------------------------------------------------- dark mode */
/* spec §2 — «حالت تیره» lives in Settings. Only the surface tokens change; the
   navy brand stays the brand, and gold takes over from navy for anything that
   has to read as "ours" on a dark ground, because navy-on-near-black cannot.
   Every pair below is asserted by scripts/check-contrast.js. */
:root[data-theme="dark"] {
  --ink:        #EDF1F8;   /* 15.0:1 on the dark surface */
  --ink-soft:   #C3CDDD;
  --muted:      #9AA7BD;   /*  7.1:1 — the dark-mode floor */
  --line:       #26314A;
  --line-strong:#3A4763;
  --bg:         #131A2B;
  --bg-alt:     #0D1320;
  --bg-sunk:    #1C2438;

  --brand:      #E7ECF6;   /* primary buttons invert: light fill, dark label */
  --brand-dark: #FFFFFF;
  --brand-hover:#FFFFFF;
  --brand-tint: #1E2942;
  --gold:       #D8A85E;
  --gold-ink:   #E2B76F;   /* readable gold on a dark ground */
  --gold-tint:  #2A2418;
  --accent:     #E2B76F;
  --accent-tint:#2A2418;
  --ok:         #6FD3A2;
  --ok-tint:    #13291F;
  --warn:       #E6BE72;
  --warn-tint:  #2A2314;
  --danger:     #F0918A;
  --danger-tint:#2D1817;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow:    0 2px 6px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 20px rgba(0,0,0,.5), 0 30px 60px rgba(0,0,0,.55);
}
/* On a dark ground a primary button is a light fill with a dark label. */
:root[data-theme="dark"] .btn-primary { background: var(--brand); color: #0D1320; }
:root[data-theme="dark"] .btn-primary:hover { background: #FFFFFF; }
:root[data-theme="dark"] .btn-gold { background: var(--accent); color: #241C0C; }
:root[data-theme="dark"] .header,
:root[data-theme="dark"] .bottomnav,
:root[data-theme="dark"] .searchpeek { background: rgba(19,26,43,.95); }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .car-card,
:root[data-theme="dark"] .searchpanel,
:root[data-theme="dark"] .searchstrip,
:root[data-theme="dark"] .branch,
:root[data-theme="dark"] .prop,
:root[data-theme="dark"] .filter-panel,
:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .drawer,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .jdp,
:root[data-theme="dark"] .section-alt { background: var(--bg); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: var(--bg-sunk); color: var(--ink); }
:root[data-theme="dark"] .btn-ghost { background: var(--bg-sunk); color: var(--ink); }
:root[data-theme="dark"] .stat { background: var(--bg-sunk); }
:root[data-theme="dark"] .stats-grid .stat { background: var(--bg-sunk); }
:root[data-theme="dark"] .tag { background: var(--bg-sunk); color: var(--ink-soft); }
/* the seal artwork is fixed-palette and still needs a white tile */
:root[data-theme="dark"] .trust-slot { background: #fff; }

*, *::before, *::after { box-sizing: border-box; }
/* `display` on a component class otherwise beats the UA rule for [hidden]. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  font-size: 16px; font-weight: 500; line-height: 1.8;
  color: var(--ink); background: var(--bg-alt);
  direction: rtl; text-align: right;
  overflow-x: hidden;
}

/* Persian is cursive: negative tracking pulls the letter joins together and
   reads as Latin type that was translated. Display sizes tighten leading only. */
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; color: var(--ink); letter-spacing: 0; line-height: 1.32; }
h3, h4 { line-height: 1.45; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p  { margin: 0 0 1em; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .875rem; color: var(--muted); }
ul, ol { padding-inline-start: 1.4em; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--brand-hover); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; z-index: 200; background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { inset-inline-start: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.hidden { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: start; }
a[href^="tel:"], a[href^="mailto:"], code { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.gold-rule { height: 3px; width: 54px; background: linear-gradient(90deg, var(--gold), rgba(186,142,74,0)); border: 0; margin: 0 0 18px; border-radius: 3px; }

/* ================================================================= header */
.header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
}
.header .wrap { display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; min-height: var(--tap); flex: none; }
.brand:hover { text-decoration: none; }
.logo-img { height: 38px; width: auto; display: block; }
.header-spacer { flex: 1; }

/* desktop primary nav — mirrors the hamburger's top-level items (spec §2) */
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
}
.mainnav a:hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.mainnav a[aria-current="page"] { color: var(--brand); background: var(--brand-tint); }

.icon-btn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm);
  color: var(--ink-soft); cursor: pointer; padding: 0 12px; font: inherit; font-size: .92rem; font-weight: 600;
}
.icon-btn:hover { background: var(--bg-alt); }

/* ================================================================= drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(12,28,61,.5); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; width: min(340px, 88vw);
  background: #fff; z-index: 100; transition: transform .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow-y: auto; box-shadow: 0 0 40px rgba(12,28,61,.22);
  /* `inset-inline-end` resolves to the LEFT edge in RTL, so the off-screen
     transform has to flip with the direction. */
  transform: translateX(100%);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open, [dir="rtl"] .drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a, .drawer-nav button {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); background: none; border: 0; font: inherit; font-weight: 600;
  text-align: right; cursor: pointer; width: 100%;
}
.drawer-nav a:hover, .drawer-nav button:hover { background: var(--bg-alt); text-decoration: none; }
.drawer-nav .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.drawer-nav .group-title { font-size: .78rem; color: var(--muted); padding: 8px 12px 2px; font-weight: 700; letter-spacing: .04em; }
/* spec §2 — «خودرو خود را اجاره دهید» in a visibly different colour */
.drawer-nav a.highlight { background: var(--accent-tint); color: var(--accent); border: 1px solid #E4D3B6; }
.drawer-nav a.highlight:hover { background: #F0E4D0; }

/* ============================================================= bottom nav */
/* spec §3 — mobile breakpoint only; RTL order خانه · خودروها · رزروها · پروفایل */
.bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: none; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav ul { display: flex; margin: 0; padding: 0; list-style: none; }
.bottomnav li { flex: 1; }
.bottomnav a { min-height: var(--bottomnav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .74rem; font-weight: 600; color: var(--muted); padding: 6px 2px; }
.bottomnav a:hover { text-decoration: none; }
.bottomnav a[aria-current="page"] { color: var(--brand); }
.bottomnav a[aria-current="page"] svg { stroke-width: 2.4; }
.bottomnav svg { width: 22px; height: 22px; }

/* ============================================================= search box */
/* Two shapes: a card beside the headline on the home banner, and a compact
   one-row strip everywhere else. Both keep province and branch as separate
   cascading selects (spec 1.4). */
.searchband { position: relative; isolation: isolate; overflow: hidden; background: var(--brand); padding-block: 40px 44px; }
.searchband-media { position: absolute; inset: 0; z-index: -2; }
.searchband-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.searchband::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  /* Heaviest where the card and the copy sit; the car stays readable at the far
     side rather than the whole photograph being flattened to black. */
  background:
    linear-gradient(to right, rgba(6,18,42,.18) 0%, rgba(6,18,42,.58) 44%, rgba(6,18,42,.90) 100%),
    linear-gradient(to top, rgba(6,18,42,.42), rgba(6,18,42,.06));
}
.searchband .wrap { display: grid; grid-template-columns: minmax(470px, 560px) minmax(0, 1fr); gap: 44px; align-items: center; }
/* The copy sits over photography, so it carries its own shadow rather than
   relying on the scrim being heavy enough to flatten the car behind it. */
.searchband-copy { color: #fff; text-shadow: 0 1px 2px rgba(6,18,42,.6), 0 6px 26px rgba(6,18,42,.75); }
.searchband-copy h1 { color: #fff; margin-bottom: 10px; }
.searchband-copy p { color: #DFE6F2; margin: 0; font-size: clamp(1rem, .95rem + .25vw, 1.12rem); max-width: 46ch; }
.searchband .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; font-size: .85rem; letter-spacing: .06em; margin-bottom: 12px; }
.searchband .eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats b { display: block; font-size: 1.5rem; line-height: 1.2; color: var(--gold); }
.hero-stats span { font-size: .85rem; color: #CBD6E6; }

/* --- the card on the banner --- */
.searchpanel { background: #fff; border-radius: var(--radius-lg); padding: 20px; }
.searchpanel.panel { box-shadow: var(--shadow-lg); }
.searchpanel-title { margin: 0 0 14px; font-size: 1.1rem; }
.searchpanel .sp-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.searchpanel.panel .sp-submit { grid-column: 1 / -1; }
.searchpanel .field, .searchpanel .field + .field { margin: 0; }
.searchpanel label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.sp-cap { color: var(--muted); }

/* --- the compact strip on every other page --- */
.searchstrip { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.searchstrip .wrap { padding-block: 14px; }
.searchpanel.strip { padding: 0; border-radius: 0; box-shadow: none; }
.searchpanel.strip .sp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) 140px; align-items: end; gap: 10px; }
.searchpanel.strip .sp-foot { margin-top: 8px; }
.searchpanel.strip .tickline { min-height: 32px; font-size: .9rem; font-weight: 600; }

.dt { display: grid; grid-template-columns: minmax(0, 1fr) 96px; }
.dt > .jdate { border-start-end-radius: 0; border-end-end-radius: 0; }
.dt > select { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; padding-inline: 8px; }
.dt > select:focus, .dt > .jdate:focus { position: relative; z-index: 1; }

.tickline { display: flex; align-items: center; gap: 9px; min-height: var(--tap); font-weight: 600; cursor: pointer; }
.tickline input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }

/* Once the panel scrolls away it returns as a slim summary bar, not the whole
   card — a sticky panel eats the mobile viewport. */
.searchpeek {
  position: fixed; inset-inline: 0; top: var(--header-h); z-index: 55;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transform: translateY(-130%); transition: transform .22s ease; will-change: transform;
}
.searchpeek.show { transform: translateY(0); }
.searchpeek .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.searchpeek .sum { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: .92rem; overflow: hidden; }
.searchpeek .sum svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.searchpeek .sum span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchpeek .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); flex: none; }

/* ================================================================= inputs */
.field { display: block; position: relative; }
.field + .field { margin-top: 16px; }
.field > label { display: block; font-size: .875rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: 11px 14px;
  font: inherit; font-weight: 500; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #A9B5C7; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-hover); box-shadow: 0 0 0 3px rgba(27,62,124,.13); outline: none; }
textarea { min-height: 118px; line-height: 1.8; }
input::placeholder, textarea::placeholder { color: #5E7188; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-sunk); color: var(--muted); }
input[type=file] { padding: 9px 12px; background: var(--bg-alt); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 6px; font-weight: 600; }
.field-hint { color: var(--muted); font-size: .84rem; margin-top: 6px; }
.otp-input { letter-spacing: .55em; text-align: center; font-size: 1.6rem; font-weight: 700; padding-inline-start: .55em; }

/* ================================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); min-width: var(--tap); padding: 11px 22px;
  border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; background: var(--bg-sunk); color: var(--ink);
  text-decoration: none; transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 10px rgba(12,28,61,.22); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-gold { background: var(--accent); color: #fff; }
.btn-gold:hover { background: #6A4C18; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: #fff; border-color: #E4B8B5; color: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-sunk); color: #5C6E80; border-color: var(--line-strong); cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================================================================== cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
a.card { display: block; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.section { padding-block: 52px; }
.section.tight { padding-block: 32px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }

/* ============================================================== car cards */
.car-row { display: flex; gap: var(--gap); overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x mandatory; }
.car-row > * { scroll-snap-align: start; flex: 0 0 320px; }
.car-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.car-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.car-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.car-card .thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bg-sunk); overflow: hidden; }
.car-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s cubic-bezier(.2,.6,.2,1); }
.car-card:hover .thumb img { transform: scale(1.05); }
.car-card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,18,42,.5), rgba(6,18,42,0) 46%); }
.car-card .thumb .overlay { position: absolute; inset-block-end: 10px; inset-inline-start: 12px; inset-inline-end: 12px; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.car-card .body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.car-card h3 { margin: 0; font-size: 1.1rem; }
.car-card h3 a { color: var(--ink); display: inline-flex; align-items: center; min-height: var(--tap); padding-block: 9px; margin-block: -9px; }
.car-card .year { color: var(--muted); font-weight: 600; font-size: .85rem; }

.tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-sunk); color: var(--ink-soft); }
.tag-luxury  { background: #F1EAF7; color: #5B2E86; }
.tag-economy { background: var(--ok-tint); color: var(--ok); }
.tag-popular { background: var(--warn-tint); color: var(--warn); }
.tag-suv     { background: var(--brand-tint); color: var(--brand); }
.tag-family  { background: #E9EEF9; color: #2B4A8C; }
.tag-on-photo { background: rgba(255,255,255,.95); color: var(--brand); }
.sample-badge { position: absolute; inset-block-start: 10px; inset-inline-end: 12px; z-index: 1; background: rgba(6,18,42,.82); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { display: flex; align-items: center; gap: 6px; min-width: 0; }
.stat .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.stat .ico svg { width: 16px; height: 16px; }
.stat .v { font-size: .84rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .k { display: none; }
/* the detail page keeps the labelled grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats-grid .stat { display: block; text-align: center; background: var(--bg-alt); border-radius: var(--radius-sm); padding: 10px 6px; }
.stats-grid .stat .k { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
.stats-grid .stat .v { display: block; font-size: .88rem; white-space: normal; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.price-was { text-decoration: line-through; color: var(--muted); font-size: .9rem; }
.per { color: var(--muted); font-size: .85rem; font-weight: 600; }
.offer-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 12px; z-index: 1; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
/* the security cheque is disclosed on the card, before the flow starts */
.cheque-note { display: flex; gap: 7px; align-items: flex-start; background: var(--warn-tint); color: var(--warn); border-radius: var(--radius-sm); padding: 9px 11px; font-size: .8rem; font-weight: 600; }

/* ================================================================ notices */
.notice { border-radius: var(--radius-sm); padding: 13px 15px; font-size: .93rem; border: 1px solid; margin: 0 0 16px; }
.notice p:last-child { margin-bottom: 0; }
.notice-info  { background: var(--brand-tint);  border-color: #C4D2EA; color: var(--brand); }
.notice-ok    { background: var(--ok-tint);     border-color: #B6DCC8; color: var(--ok); }
.notice-warn  { background: var(--warn-tint);   border-color: #EBD6A6; color: var(--warn); }
.notice-error { background: var(--danger-tint); border-color: #E9BEBB; color: var(--danger); }
.notice-todo  { background: #FFF8E1; border-color: #E7D08A; color: #6B5200; }
.notice-legal { background: var(--danger-tint); border-color: #E9BEBB; color: var(--danger); }
.todo-block { color: var(--muted); }

/* ================================================================ stepper */
.stepper { overflow-x: auto; padding-bottom: 8px; margin-bottom: 24px; }
.stepper ol { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.stepper li { display: flex; align-items: center; gap: 4px; }
.stepper .node { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: .85rem; font-weight: 600; min-height: 42px; white-space: nowrap; }
.stepper a.node:hover { background: var(--bg-alt); text-decoration: none; }
.stepper .num { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunk); color: var(--ink-soft); font-size: .75rem; font-weight: 700; }
.stepper .done .node    { border-color: #B6DCC8; background: var(--ok-tint); color: var(--ok); }
.stepper .done .num     { background: var(--ok); color: #fff; }
.stepper .current .node { border-color: var(--brand); background: var(--brand); color: #fff; }
.stepper .current .num  { background: rgba(255,255,255,.24); color: #fff; }
.stepper .bar { width: 16px; height: 2px; background: var(--line-strong); flex: none; }

/* ================================================================ chooser */
.choice-list { display: grid; gap: 12px; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; min-height: var(--tap); transition: border-color .15s ease, background .15s ease; }
.choice:hover { background: var(--bg-alt); border-color: #A9B5C7; }
.choice input { margin-top: 4px; width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.choice-body { flex: 1; min-width: 0; }
.choice-title { font-weight: 700; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.choice-desc { color: var(--muted); font-size: .89rem; display: block; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand) inset; }

/* ============================================================= price list */
.pricelist { width: 100%; border-collapse: collapse; }
.pricelist th, .pricelist td { padding: 11px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.pricelist td:last-child, .pricelist th:last-child { text-align: left; white-space: nowrap; }
.pricelist tr:last-child td { border-bottom: 0; }
.pricelist .total td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--line-strong); padding-top: 15px; }
.pricelist .discount td { color: var(--ok); }

/* ============================================================= doc states */
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.state-pending  { background: var(--warn-tint); color: var(--warn); }
.state-approved { background: var(--ok-tint); color: var(--ok); }
.state-rejected { background: var(--danger-tint); color: var(--danger); }
.state-none     { background: var(--bg-sunk); color: var(--muted); }

/* ================================================================== modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12,28,61,.55); z-index: 120; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; width: min(760px, 100%); max-height: 88vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; display: flex; flex-direction: column; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 16px 20px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .modal-backdrop { align-items: center; } .modal { border-radius: var(--radius-lg); } }

.terms-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-alt); min-height: var(--tap); }
.terms-check input { width: 24px; height: 24px; margin-top: 4px; accent-color: var(--brand); flex: none; }
.terms-check input:disabled + span { color: var(--muted); }

/* ================================================================= footer */
.footer { background: var(--brand-dark); color: #C6D4E0; padding-block: 54px calc(30px + var(--bottomnav-h)); }
.footer a { color: #E4ECF3; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-cols { display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer li a { display: inline-flex; align-items: center; min-height: var(--tap); }
.trust-strip { border-top: 1px solid #23334C; margin-top: 34px; padding-top: 26px; display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.footer-bottom { border-top: 1px solid #23334C; margin-top: 26px; padding-top: 20px; font-size: .85rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .logo-img { height: 44px; margin-bottom: 14px; }

.trust-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; margin-top: 12px; }
.trust-slot { background: #fff; border-radius: var(--radius-sm); padding: 12px; min-width: 108px; min-height: 108px; display: grid; place-items: center; text-align: center; color: #5F6880; font-size: .72rem; font-weight: 600; }
/* the group's own mark sits beside the eNamad seal */
.partner-slot { background: rgba(255,255,255,.06); border: 1px solid #23334C; border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.partner-slot img { height: 88px; width: auto; display: block; }
.partner-slot span { font-size: .74rem; color: #A9BACD; line-height: 1.6; }

/* ================================================================== misc */
.badge-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; font-weight: 700; }
.badge-gold { background: var(--gold-tint); color: var(--gold-ink); border: 1px solid #E4D3B6; border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 700; display: inline-block; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; }
.empty { text-align: center; padding: 52px 24px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.table th { color: var(--muted); font-size: .82rem; font-weight: 700; }
.table-scroll { overflow-x: auto; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 150px; }
.readmore-body { max-height: 9.6em; overflow: hidden; position: relative; }
.readmore-body.open { max-height: none; }

/* value props */
.props { display: grid; gap: var(--gap); grid-template-columns: repeat(4, 1fr); }
.prop { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.prop .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.prop .ico svg { width: 23px; height: 23px; }
.prop h3 { margin: 0 0 6px; font-size: 1.02rem; }
.prop p { margin: 0; color: var(--muted); font-size: .92rem; }

/* how it works — the six reservation stages of spec 8.2 */
.flow { display: grid; gap: 18px; grid-template-columns: repeat(6, 1fr); }
.flow-step { position: relative; padding-top: 48px; }
.flow-step .n { position: absolute; top: 0; inset-inline-start: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.flow-step::after { content: ''; position: absolute; top: 17px; inset-inline-start: 44px; inset-inline-end: -18px; height: 2px; background: var(--line-strong); }
.flow-step:last-child::after { display: none; }
.flow-step b { display: block; font-size: .98rem; }
.flow-step span { color: var(--muted); font-size: .86rem; }

/* perks band */
.perks { display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
.perk { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 20px; color: #fff; }
.perk .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: var(--brand-dark); display: grid; place-items: center; }
.perk .ico svg { width: 22px; height: 22px; }
.perk b { color: #fff; display: block; }
.perk span { color: #D7DEEC; font-size: .92rem; }
.band { position: relative; isolation: isolate; overflow: hidden; background: var(--brand); color: #fff; padding-block: 56px; }
.band-media { position: absolute; inset: 0; z-index: -2; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(6,18,42,.95), rgba(6,18,42,.82)); }
.band h2 { color: #fff; }
.band p { color: #D7DEEC; }

/* category chips */
.cats { display: grid; gap: 14px; grid-template-columns: repeat(5, 1fr); }
.cat { display: block; position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; padding: 20px 16px; text-align: center; color: var(--ink); font-weight: 700; transition: transform .15s ease, box-shadow .15s ease; }
.cat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.cat svg { width: 30px; height: 30px; color: var(--brand); display: block; margin: 0 auto 8px; }
.cat span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }

/* branches */
.branch-list { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.branch { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.branch h3 { margin: 0 0 6px; font-size: 1.02rem; }

/* banner slider (spec 1.3) */
.banner-slider { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.banner-slider > * { flex: 0 0 100%; scroll-snap-align: center; }
.banner { border-radius: var(--radius); overflow: hidden; background: linear-gradient(120deg, var(--brand), var(--brand-hover)); color: #fff; min-height: 140px; display: flex; align-items: center; padding: 22px 24px; }
.banner h2 { color: #fff; margin: 0 0 6px; }
.banner p { margin: 0; color: #D7DEEC; }

/* tiered pricing (spec 6.3) */
.tier-table { width: 100%; border-collapse: collapse; }
.tier-table th, .tier-table td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.tier-table th { font-size: .82rem; color: var(--muted); }
.tier-table td:last-child { text-align: left; font-weight: 700; }

/* reservation timeline (spec 8.2) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 12px; inset-block-start: 28px; bottom: 0; width: 2px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunk); color: var(--muted); font-size: .72rem; font-weight: 700; z-index: 1; }
.timeline .done .dot { background: var(--ok); color: #fff; }
.timeline .current .dot { background: var(--brand); color: #fff; }
.timeline .label { font-weight: 600; }
.timeline .todo .label { color: var(--muted); font-weight: 500; }

/* page shells */
.split { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 16px); }
.listing { display: grid; gap: 28px; grid-template-columns: 288px minmax(0, 1fr); align-items: start; }
.listing .car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1180px) { .listing .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .listing .car-grid { grid-template-columns: 1fr; } }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.filter-panel h3 { font-size: .95rem; margin: 0 0 12px; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }

/* gallery on the car page */
.gallery { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; position: relative; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }

/* jalali date picker */
.jdp { position: absolute; z-index: 80; margin-top: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; width: 300px; }
.jdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
.jdp-nav { min-width: 38px; min-height: 38px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.15rem; color: var(--ink); }
.jdp-nav:hover { background: var(--bg-alt); }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.jdp-wd { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; padding: 4px 0; }
/* Square cells, Fridays in red, and a small Gregorian sub-date — the three
   things Persian users expect from a Jalali picker. The grid stays RTL: only a
   Gregorian calendar would flip to ltr. */
.jdp-day { position: relative; aspect-ratio: 1; min-height: 36px; border: 0; background: none; border-radius: 9px; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.jdp-day .g { direction: ltr; font-size: .58rem; font-weight: 500; color: var(--muted); }
.jdp-day.friday { color: var(--danger); }
.jdp-day.sel .g { color: rgba(255,255,255,.8); }
.jdp-day:hover:not(:disabled) { background: var(--brand-tint); }
.jdp-day:disabled, .jdp-day:disabled.friday { color: #A9B3C2; cursor: not-allowed; }
.jdp-day:disabled .g { color: #BFC7D3; }
.jdp-day.sel { background: var(--brand); color: #fff; font-weight: 700; }

/* =========================================================== breakpoints */
@media (max-width: 1080px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .props { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .flow-step:nth-child(3n)::after { display: none; }
  .listing { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .searchband .wrap { grid-template-columns: 1fr; gap: 24px; }
  .searchpanel.strip .sp-grid { grid-template-columns: 1fr 1fr; }
  .searchpanel.strip .sp-submit { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .mainnav { display: none; }
}
@media (max-width: 780px) {
  :root { --header-h: 60px; --gap: 16px; }
  body { padding-bottom: var(--bottomnav-h); }
  .bottomnav { display: block; }             /* spec §3 — mobile only */
  .desktop-only { display: none !important; }
  .section { padding-block: 34px; }
  .searchband { padding-block: 18px 22px; }
  /* On a phone the card would fill the screen and push every word of the brand
     below the fold. The headline comes first, trimmed to the eyebrow and the
     line itself; the lede and the counters repeat further down the page. */
  .searchband-copy { order: -1; }
  .searchband-copy p.lede, .searchband-copy > p, .hero-stats { display: none; }
  .searchband-copy h1 { font-size: 1.45rem; margin-bottom: 0; }
  .searchpanel { padding: 16px; }
  .searchpanel-title { display: none; }
  .searchpanel .sp-grid, .searchpanel.strip .sp-grid { grid-template-columns: 1fr; gap: 10px; }
  .searchpanel label { margin-bottom: 4px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .props, .perks { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .flow-step { padding-top: 0; padding-inline-start: 46px; min-height: 40px; }
  .flow-step::after { display: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
  .car-row > * { flex: 0 0 84vw; }
}
@media (min-width: 781px) { .mobile-only { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print { .header, .bottomnav, .searchband, .searchpeek, .footer, .btn, .drawer { display: none !important; } }

/* ------------------------------------------------- tap-target corrections */
/* WCAG 2.2 SC 2.5.8 requires >= 24x24; the brief's mobile guidance is 44x44.
   Negative margins grow the hit area without disturbing the visual rhythm. */
.section-head a,
.footer li a,
.car-card h3 a {
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.section-head a { padding-inline: 10px; margin-inline: -10px; }
.car-card h3 a { padding-block: 9px; margin-block: -9px; }
/* Small buttons keep their compact look on a mouse, but never shrink the touch
   target on a phone. */
@media (max-width: 780px), (pointer: coarse) {
  .btn-sm { min-height: var(--tap); }
}
