/* ==========================================================================
   Kilomètre.ma — Public site
   A garage's showroom: black, white and the red of the logo.
   Dark header and opening block, dark car cards on a white page.
   Fonts are hosted on the site itself (Archivo for Latin, Cairo for Arabic).
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/cairo-arabic-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --ink: #0a0a0a;
  --panel: #15161a;        /* car cards */
  --panel-line: #2b2c33;
  --red: #e63946;
  --red-dark: #c92c39;
  --red-tint: #fdecee;
  --gray: #6b6b6b;
  --paper: #fff;
  --mist: #f4f4f2;
  --line: #e4e4e0;
  --wa: #128c4b;
  --radius: 12px;
  --wrap: 1240px;
  --font: "Archivo", "Cairo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ar: "Cairo", "Archivo", "Geeza Pro", "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
html[dir="rtl"] body { font-family: var(--font-ar); line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--gray); }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 200; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 26px;
  border: 1.5px solid transparent; border-radius: 8px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  background: var(--mist); color: var(--ink);
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #26272c; }
.btn-line { background: transparent; border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--red); color: #fff; }
.btn-ghost:hover { background: var(--red); }
.btn-light { background: #fff; color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #0e7740; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; }   /* login page */

/* ---------- Header (dark, joined to the opening block) ---------- */
.site-header { background: var(--ink); color: #fff; }
.site-header-in { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.logo { display: block; flex: none; }
.logo img { display: block; height: 28px; width: auto; }
.site-nav { display: flex; gap: 34px; margin-inline-start: 28px; margin-inline-end: auto; }
.site-nav a { font-weight: 500; text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--red); }
.header-phone { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 16px; border: 1.5px solid var(--red); color: #fff; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.header-phone:hover { background: var(--red); }
.header-phone-label { font-weight: 400; color: #c9c9c5; }
.header-phone:hover .header-phone-label { color: #fff; }
.lang-switcher { position: relative; flex: none; }
.lang-btn { min-height: 42px; padding: 6px 14px; background: transparent; color: #fff; border: 1.5px solid #3a3b42; border-radius: 8px; font-weight: 500; cursor: pointer; }
.lang-btn:hover { border-color: #fff; }
.lang-menu { display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 100; min-width: 160px; padding: 6px; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35); }
.lang-switcher.open .lang-menu { display: block; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 6px; text-decoration: none; }
.lang-menu a:hover { background: var(--mist); }
.lang-menu a[aria-current="true"] { font-weight: 700; color: var(--red); }

/* ---------- Opening block ---------- */
.hero { background: var(--ink); color: #fff; background-size: cover; background-position: center; }
.hero-photo { position: relative; isolation: isolate; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 10, 10, .9), rgba(10, 10, 10, .45)); }
html[dir="rtl"] .hero-photo::before { background: linear-gradient(270deg, rgba(10, 10, 10, .9), rgba(10, 10, 10, .45)); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: end; padding-top: 56px; }
.hero-in > :only-child { grid-column: 1 / -1; max-width: 820px; }
.hero-text { padding-bottom: 88px; align-self: center; }
.hero-title { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
html[dir="rtl"] .hero-title { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
.hero-sub { margin-top: 22px; font-size: 18px; color: #c9c9c5; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-phone { margin-top: 20px; color: #c9c9c5; }
.hero-phone a { color: #fff; font-weight: 700; font-size: 19px; text-decoration: none; white-space: nowrap; }
.hero-phone a:hover { color: var(--red); }
/* The slideshow hangs below the dark block, onto the white page */
.hero-art { display: block; margin-bottom: -84px; position: relative; z-index: 2; }
.slider-stage { position: relative; aspect-ratio: 4 / 3; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.slide.on { opacity: 1; visibility: visible; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .55); }
/* A picture with no background is shown whole, standing on the edge of the dark block */
.slide-cutout img { object-fit: contain; object-position: center bottom; border-radius: 0; box-shadow: none; filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .35)); }
.slider-nav { position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; margin-top: -21px; padding: 0 0 4px; background: rgba(10, 10, 10, .55); color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.slider-nav:hover { background: var(--red); border-color: var(--red); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; padding: 7px 10px; background: rgba(10, 10, 10, .55); border-radius: 999px; }
.slider-dots button { width: 9px; height: 9px; padding: 0; background: rgba(255, 255, 255, .55); border: 0; border-radius: 50%; cursor: pointer; }
.slider-dots button.on { background: var(--red); width: 22px; border-radius: 999px; }
.hero-has-art + .band { padding-top: 136px; }

/* ---------- Sections ---------- */
.band { padding-block: 84px; }
.band-tint { background: var(--mist); }
.band-ink { background: var(--ink); color: #fff; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 30px; }
.band-title { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
html[dir="rtl"] .band-title { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.band-head .band-title { margin: 0; }
.wrap > .band-title, .duo-text > .band-title { margin-bottom: 24px; }
.band-title-center { text-align: center; margin-bottom: 52px !important; }
.band-intro { max-width: 62ch; margin: -12px 0 30px; font-size: 17px; color: #444; }
.band-foot { display: flex; justify-content: flex-end; margin-top: 30px; }
.band-empty { padding: 40px 20px; text-align: center; color: var(--gray); background: var(--mist); border-radius: var(--radius); }
.band-more { font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.prose { max-width: 62ch; font-size: 17px; line-height: 1.85; color: #3b3b3b; }

/* Available / sold */
.tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 150px; padding: 8px 26px; background: var(--mist); color: var(--ink); border: 1.5px solid transparent; border-radius: 8px; font-weight: 600; text-decoration: none; cursor: pointer; }
.tab:hover { border-color: #c9c9c5; }
.tab.on { background: var(--red-tint); border-color: var(--red); color: var(--red-dark); }
[data-panel][hidden] { display: none; }

/* ---------- Car cards ---------- */
.car-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.car-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.car-mosaic > .car-big { grid-column: span 2; grid-row: span 2; }
.car { position: relative; display: flex; flex-direction: column; background: var(--panel); color: #fff; border-radius: var(--radius); overflow: hidden; outline: 2px solid transparent; outline-offset: -2px; }
.car:hover { outline-color: var(--red); }
.car-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: #23242a; text-decoration: none; overflow: hidden; }
.car-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.car-big .car-photo { flex: 1; aspect-ratio: auto; min-height: 300px; }
.car-nophoto { display: flex; align-items: center; justify-content: center; height: 100%; color: #8d8d88; font-size: 14px; }
.car-flag { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 12px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; border-radius: 4px; }
.car-flag-sold { background: var(--red); color: #fff; }
.car-flag-inline { position: static; display: inline-block; margin-bottom: 12px; }
.car-shots { position: absolute; bottom: 10px; inset-inline-end: 10px; padding: 2px 9px; background: rgba(10, 10, 10, .7); color: #fff; font-size: 12px; border-radius: 4px; }
.car-sold .car-photo img { filter: grayscale(.75) brightness(.8); }
.car-body { padding: 14px 16px 16px; }
.car-name { font-size: 15px; line-height: 1.35; font-weight: 500; color: #e6e6e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-name a { text-decoration: none; }
.car-name a::after { content: ""; position: absolute; inset: 0; }   /* whole card clickable */
.car-version { color: #9d9d98; font-weight: 400; }
.car-price { margin-top: 4px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.car-sold .car-price { color: #ff8a93; }
.car-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--panel-line); font-size: 12.5px; color: #a9a9a4; }
.car-year { padding: 2px 8px; background: var(--red); color: #fff; font-weight: 700; border-radius: 4px; }
.car-sold .car-year { background: #3a3b42; }
.car:not(.car-big) .car-meta li:nth-child(n+4) { display: none; }   /* small cards: year, mileage, fuel */
.car-big .car-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 20px; padding: 24px 26px 26px; }
.car-big .car-head { display: contents; }
.car-big .car-name { grid-column: 1 / -1; font-size: 22px; color: #fff; }
.car-big .car-price { grid-column: 2; grid-row: 2; margin: 0; font-size: 26px; }
.car-big .car-meta { grid-column: 1; grid-row: 2; margin: 0; padding: 0; border: 0; font-size: 14px; }

/* ---------- Photo beside text ("À propos", "Nous rendre visite") ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.duo-photo img { display: block; width: 100%; border-radius: var(--radius); }
.visit { display: grid; gap: 18px; }
.visit dt { font-size: 14px; color: var(--gray); }
.visit dd { font-size: 19px; font-weight: 700; line-height: 1.45; }
.visit dd a { text-decoration: none; }
.visit dd a:hover { color: var(--red); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Services ---------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.features-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
.features-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.feature { text-align: center; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin-bottom: 20px; background: var(--red-tint); color: var(--red); border-radius: 50%; }
.feature h3 { font-size: 19px; line-height: 1.3; font-weight: 700; margin-bottom: 10px; }
.feature p { color: var(--gray); font-size: 15px; line-height: 1.75; max-width: 34ch; margin-inline: auto; }

/* ---------- Banner / call strip / custom ---------- */
.banner { display: block; border-radius: var(--radius); overflow: hidden; }
.banner img { display: block; width: 100%; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-title { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
html[dir="rtl"] .cta-title { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.cta p { margin-top: 8px; color: #c9c9c5; max-width: 52ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Form fields (list filters) ---------- */
.field label, .field legend { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.field input, .field select {
  width: 100%; min-height: 46px; padding: 8px 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
}
.field input:focus, .field select:focus { border-color: var(--ink); outline: none; }
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }

/* ---------- List page ---------- */
.list-head { padding-block: 56px 30px; }
.list-head-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 24px; flex-wrap: wrap; }
.list-head h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -.025em; font-weight: 800; }
html[dir="rtl"] .list-head h1 { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.list-count { margin-top: 8px; color: var(--gray); }
.list-plain { padding-bottom: 84px; }
.list-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 84px; }
.filters { position: sticky; top: 16px; }
.filters-toggle { display: none; }
.filters-form { display: grid; gap: 14px; padding: 20px; background: var(--mist); border-radius: var(--radius); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair legend { grid-column: 1 / -1; }
.filters-actions { display: grid; gap: 8px; margin-top: 4px; }
.filters-n { display: inline-block; min-width: 22px; padding: 0 6px; background: var(--red); color: #fff; border-radius: 999px; font-size: 13px; }
.sort-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 20px; }
.sort-bar label { font-size: 14px; color: var(--gray); }
.sort-bar select { min-height: 44px; padding: 6px 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; }
.empty { padding: 64px 24px; text-align: center; background: var(--mist); border-radius: var(--radius); }
.empty h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }
.pages { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; }

/* ---------- Car page ---------- */
.car-page { padding-block: 30px 72px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--gray); }
.crumbs a { text-underline-offset: 3px; }
.car-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr); gap: 36px; align-items: start; }
.gallery-main { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--mist); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gallery-main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-main[hidden] { display: none; }
.gallery-empty { display: flex; align-items: center; justify-content: center; color: var(--gray); cursor: default; }
.gallery-count { position: absolute; bottom: 12px; inset-inline-end: 12px; padding: 4px 10px; background: rgba(10, 10, 10, .78); color: #fff; border-radius: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 8px; }
.gallery-thumbs button { padding: 0; border: 3px solid transparent; border-radius: 8px; overflow: hidden; background: var(--mist); aspect-ratio: 4 / 3; cursor: pointer; }
.gallery-thumbs button.on { border-color: var(--red); }
.gallery-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Videos: in the gallery (thumbnails with a play mark) and under the description */
.gallery-player { position: relative; aspect-ratio: 4 / 3; background: #000; border-radius: var(--radius); overflow: hidden; }
.gallery-player[hidden] { display: none; }
.gallery-player video, .gallery-player iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.thumb-video { position: relative; background: #000 !important; background-clip: padding-box !important; }
.play-badge { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; background: rgba(10, 10, 10, .72); border: 2px solid #fff; border-radius: 50%; }
.play-badge::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -7px 0 0 -4px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.play-badge-lg { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--red); border-color: var(--red); }
.play-badge-lg::after { margin: -13px 0 0 -8px; border-width: 13px 0 13px 21px; }
.video-grid { display: grid; gap: 16px; }
.video-box { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-box video, .video-box iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.video-yt { display: block; width: 100%; height: 100%; }
.video-yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-yt:hover .play-badge-lg { background: var(--red-dark); border-color: var(--red-dark); }
.car-video { position: absolute; bottom: 10px; inset-inline-start: 10px; padding: 2px 9px 2px 22px; background: rgba(10, 10, 10, .7); color: #fff; font-size: 12px; border-radius: 4px; }
html[dir="rtl"] .car-video { padding: 2px 22px 2px 9px; }
.car-video::before { content: ""; position: absolute; top: 50%; inset-inline-start: 9px; margin-top: -4px; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent #fff; }

.buy { position: sticky; top: 16px; padding: 28px; background: var(--panel); color: #fff; border-radius: var(--radius); }
.buy-name { font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
html[dir="rtl"] .buy-name { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.buy-version { color: #a9a9a4; margin-top: 4px; }
.buy-price { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--panel-line); font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.buy-sold { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--panel-line); color: #d6d6d2; }
.buy-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 22px; }
.buy-keys span { display: block; font-size: 13px; color: #a9a9a4; }
.buy-keys b { font-size: 16px; font-weight: 600; }
.buy-actions { display: grid; gap: 10px; margin-top: 24px; }
.buy-actions .btn-ink { background: #fff; color: var(--ink); }
.buy-actions .btn-ink:hover { background: #e6e6e2; }
.buy-seller { margin-top: 16px; font-size: 14px; color: #a9a9a4; }
.buy-seller b { color: #fff; font-weight: 600; }

.car-detail { max-width: 800px; margin-top: 48px; display: grid; gap: 48px; }
.car-detail h2 { font-size: 26px; letter-spacing: -.02em; font-weight: 800; margin-bottom: 18px; }
html[dir="rtl"] .car-detail h2 { letter-spacing: 0; font-weight: 700; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
.spec-list > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.spec-list dt { color: var(--gray); }
.spec-list dd { font-weight: 600; text-align: end; }
.eq-title { font-size: 15px; color: var(--gray); margin: 18px 0 8px; }
.eq-title:first-of-type { margin-top: 0; }
.eq-list { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-list li { padding: 6px 12px; background: var(--mist); border-radius: 6px; font-size: 14px; }

.buy-bar { display: none; }

/* ---------- Photo viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(10, 10, 10, .96); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lb-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; min-height: 42px; padding: 8px 16px; background: #fff; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 72px; margin-top: -36px; background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 8px; font-size: 40px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 4px 12px; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
body.lb-open { overflow: hidden; }

/* ---------- Contact button at the corner ---------- */
.contact-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 80; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.contact-float-label { padding: 8px 16px; background: #fff; color: var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35); }
.contact-float-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; background: var(--red); color: #fff; border-radius: 50%; box-shadow: 0 12px 28px -8px rgba(230, 57, 70, .7); }
.contact-float:hover .contact-float-icon { background: var(--red-dark); }
body.lb-open .contact-float { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding-top: 64px; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; padding-bottom: 48px; }
.footer-brand img { display: block; height: 30px; width: auto; }
.footer-brand p { margin-top: 18px; color: #a9a9a4; max-width: 44ch; font-size: 15px; line-height: 1.75; }
.footer-links, .footer-contact { display: grid; gap: 12px; align-content: start; font-style: normal; }
.footer-links a { position: relative; padding-inline-start: 16px; color: #fff; text-decoration: none; }
.footer-links a::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
.footer-links a:hover { color: var(--red); }
.footer-contact { justify-items: end; text-align: end; }
.footer-contact a { color: #fff; text-decoration: none; }
.footer-contact a:hover { color: var(--red); }
.footer-phone { font-size: 28px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.footer-copy { padding-block: 20px; border-top: 1px solid var(--panel-line); color: #a9a9a4; font-size: 14px; }

/* ---------- Messages, login, language pop-up, 404 ---------- */
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; font-weight: 600; }
.flash-success { background: #e3f4ea; color: #0b5a2c; }
.flash-error { background: #fde4e6; color: #96151f; }
.flash-info { background: var(--mist); }

.auth-wrap { display: flex; justify-content: center; padding: 72px 20px; background: var(--mist); min-height: 60vh; }
.auth-card { width: 100%; max-width: 410px; align-self: flex-start; padding: 32px; background: #fff; border-radius: var(--radius); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .3); }
.auth-card h1 { font-size: 28px; letter-spacing: -.02em; font-weight: 800; margin-bottom: 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label span { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 8px; direction: ltr; }
.auth-form input:focus { border-color: var(--ink); outline: none; }

.lang-popup { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 10, 10, .72); }
.lang-popup-box { width: 100%; max-width: 390px; padding: 28px; background: #fff; border-radius: 16px; }
.lang-popup-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.lang-popup-box p { color: var(--gray); margin-bottom: 18px; }
.lang-choices { display: grid; gap: 8px; margin-bottom: 20px; }
.lang-choices label { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 600; cursor: pointer; }
.lang-choices label:has(input:checked) { border-color: var(--red); background: var(--red-tint); }
.lang-popup-box .btn { width: 100%; }

.notfound { text-align: center; padding-block: 24px; }
.notfound-code { font-size: clamp(90px, 18vw, 180px); font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.notfound h1 { font-size: 28px; font-weight: 800; margin-top: 8px; }
.notfound p { margin-top: 8px; color: var(--gray); }
.notfound-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .car-mosaic > .car-big { grid-column: 1 / -1; grid-row: auto; }
  .car-big .car-photo { aspect-ratio: 16 / 9; min-height: 0; flex: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo { gap: 44px; }
  .site-nav { gap: 22px; margin-inline-start: 8px; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-phone { margin-inline-start: auto; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 40px; }
  .hero-text { padding-bottom: 0; }
  .hero-art { margin-bottom: -56px; }
  .hero-has-art + .band { padding-top: 108px; }
  .hero:not(.hero-has-art) .hero-in { padding-bottom: 56px; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-contact { justify-items: start; text-align: start; }
  .list-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; }
  .filters-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 10px 16px; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; font-weight: 600; cursor: pointer; }
  .js .filters-form { display: none; margin-top: 10px; }
  .js .filters.open .filters-form { display: grid; }
  .car-top { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .buy { position: static; }
  .spec-list { grid-template-columns: 1fr; }
  .buy-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--ink); color: #fff; }
  .buy-bar-price { margin-inline-end: auto; font-weight: 800; font-size: 17px; white-space: nowrap; }
  .buy-bar .btn { min-height: 42px; padding: 8px 14px; }
  .buy-bar .btn-ink { background: #fff; color: var(--ink); }
  .car-page { padding-bottom: 96px; }
  body:has(.buy-bar) .site-footer { padding-bottom: 72px; }
  body:has(.buy-bar) .contact-float { display: none; }
}
@media (max-width: 760px) {
  .car-grid, .car-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .car-body { padding: 12px 12px 14px; }
  .car-price { font-size: 17px; }
  .car:not(.car-big) .car-meta li:nth-child(n+3) { display: none; }   /* year and mileage only */
  .car.car-big .car-meta li { display: block; }
  .car-big .car-body { padding: 18px; }
  .car-big .car-name { font-size: 19px; }
  .car-big .car-price { font-size: 21px; }
  .tab { min-width: 0; flex: 1; }
  .band-head .tabs, .list-head-in .tabs { width: 100%; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .site-header-in { gap: 10px; min-height: 66px; }
  .logo img { height: 22px; }
  .header-phone { padding: 6px 12px; }
  .header-phone-number { display: none; }
  .header-phone-label { color: #fff; font-weight: 700; }
  .lang-btn { padding: 6px 10px; }
  .band { padding-block: 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .features, .features-3, .features-2 { grid-template-columns: 1fr; gap: 36px; }
  .band-title-center { margin-bottom: 36px !important; }
  .buy-price { font-size: 32px; }
  .lb-nav { width: 44px; height: 60px; }
  .contact-float { bottom: 16px; inset-inline-end: 16px; }
  .contact-float-label { display: none; }
  .contact-float-icon { width: 54px; height: 54px; }
  .car-big .car-body { grid-template-columns: minmax(0, 1fr); }
  .car-big .car-price, .car-big .car-meta { grid-column: 1; grid-row: auto; }
}
@media (max-width: 380px) {
  .car-grid, .car-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .car:not(.car-big) .car-meta li:nth-child(3) { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .car, .tab, .header-phone, .lang-btn, .contact-float-icon { transition: background-color .15s, border-color .15s, color .15s, outline-color .15s; }
  .slide { transition: opacity .6s ease, visibility .6s; }
  .slider-dots button { transition: width .2s, background-color .2s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .site-header, .site-footer, .buy-bar, .contact-float, .lang-popup, .lightbox { display: none !important; }
}
