/* =========================================================================
   ATCCAR'S — Global stylesheet
   Design: light, editorial, premium — modelled on the restraint of
   romansinternational.com. Pale surfaces, near-black text, large
   photography, one deep-red accent (no gold, no second colour).
   Mobile-first. No external dependencies.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Light editorial surfaces */
  --bg:        #ffffff;
  --bg-2:      #f5f5f2;   /* warm off-white */
  --surface:   #ffffff;
  --surface-2: #f0efec;
  --border:    #e5e4df;
  --border-2:  #d3d2cc;

  /* Ink & text */
  --ink:   #16150f;       /* near-black, faintly warm */
  --text:  #1c1b16;
  --muted: #6a6960;
  --faint: #6f6d64; /* WCAG AA: 5.19:1 on white (was #9b9a90 = 2.83:1) */

  /* Single accent — deep automotive red (no gold) */
  --accent:      #b21f2d;
  --accent-dark: #8f1824;
  --accent-2:    #16150f; /* "second accent" is just ink — keeps it monochrome */
  --accent-ink:  #ffffff; /* text on an accent fill */

  /* Feedback */
  --ok:   #1c7c54;
  --err:  #b21f2d;

  /* Shape & motion — editorial = restrained radii */
  --radius:    6px;
  --radius-sm: 4px;
  --radius-lg: 10px;
  --shadow:    0 18px 40px rgba(20, 20, 15, .12);
  --shadow-sm: 0 6px 18px rgba(20, 20, 15, .08);
  --ring:      0 0 0 3px rgba(178, 31, 45, .28);
  --ease:      cubic-bezier(.22, .61, .36, 1);

  --maxw: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans", "Noto Sans Arabic", sans-serif;
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3 { line-height: 1.12; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }

/* ---- Layout helpers --------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(52px, 8vw, 104px); }
.section-head { max-width: 660px; margin-bottom: 36px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.02rem; }
.muted { color: var(--muted); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .15s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: none; box-shadow: var(--ring);
}

/* ---- Header / navigation --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; }
.nav-links { display: none; gap: 6px; margin-inline-start: auto; }
.nav-links a {
  padding: 8px 12px; color: var(--muted); font-weight: 600;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-links + .nav-tools { margin-inline-start: 0; }

/* Language switcher */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 700; font-size: .82rem; letter-spacing: .04em; color: var(--ink);
}
.lang-btn:hover { border-color: var(--border-2); }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); min-width: 168px; padding: 6px; display: none; z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px;
  background: none; border: 0; border-radius: var(--radius-sm); text-align: start; font-weight: 500; color: var(--text);
}
.lang-menu button:hover { background: var(--surface-2); }
.lang-menu button[aria-current="true"] { color: var(--accent); font-weight: 700; }
.lang-menu .flag { font-size: 1.1rem; }

/* Mobile menu toggle */
.menu-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-nav {
  display: none; flex-direction: column; gap: 2px; padding: 8px 22px 16px;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 13px 12px; color: var(--muted); font-weight: 600;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); }

@media (min-width: 940px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
  .nav-tools { margin-inline-start: 0; }
}

/* ---- Hero (full-viewport immersive background slideshow) -------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;                /* the photo dominates the first screen */
  background: #141410;               /* dark base: text stays readable before photos load */
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.5s ease; will-change: opacity;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide video.hero-video {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  background: #141410;
}
.hero-slide picture { display: block; width: 100%; height: 100%; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12,12,9,.55) 0%, rgba(12,12,9,0) 20%),
    linear-gradient(90deg, rgba(12,12,9,.70) 0%, rgba(12,12,9,.30) 48%, rgba(12,12,9,.08) 80%),
    linear-gradient(0deg,  rgba(12,12,9,.62) 0%, rgba(12,12,9,.14) 42%, rgba(12,12,9,0) 68%);
}
[dir="rtl"] .hero-scrim {
  background:
    linear-gradient(180deg, rgba(12,12,9,.55) 0%, rgba(12,12,9,0) 20%),
    linear-gradient(270deg, rgba(12,12,9,.70) 0%, rgba(12,12,9,.30) 48%, rgba(12,12,9,.08) 80%),
    linear-gradient(0deg,   rgba(12,12,9,.62) 0%, rgba(12,12,9,.14) 42%, rgba(12,12,9,0) 68%);
}
/* Hero body: headline/CTA overlaid bottom-left over the full-viewport photo */
.hero-body {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100svh; padding-bottom: clamp(48px, 9vh, 104px);
}

/* Homepage: transparent split nav over the hero (Romans-style) — centered
   wordmark, links split around it, white uppercase; solid header after scroll */
body[data-page="home"] .site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; backdrop-filter: none; border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
/* Home split nav: a true 3-column flex — [left links | centered logo | right links].
   The logo is a real flex item with its own clear space, so nothing can ever
   overlap it (the old absolute-centered logo was what the links slid under). */
body[data-page="home"] .nav-home { display: flex; align-items: center; gap: 8px; height: clamp(74px, 9vh, 94px); }
body[data-page="home"] .nav-home .nav-left { flex: 1 1 0; min-width: 0; justify-content: flex-start; margin-inline: 0; }
body[data-page="home"] .nav-home .nav-end { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
body[data-page="home"] .nav-home .nav-right { margin-inline: 0; }
body[data-page="home"] .nav-home .nav-tools { margin-inline-start: 6px; }
body[data-page="home"] .brand-center {
  position: static; transform: none; flex: 0 0 auto;
  padding-inline: clamp(14px, 2.2vw, 36px);   /* guaranteed clear space around the logo */
}
body[data-page="home"] .brand-center img {
  height: clamp(40px, 4.4vw, 58px); width: auto; display: block;
  filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,.45));
  transition: filter .3s ease;
}
body[data-page="home"] .site-header .nav-links a {
  color: rgba(255,255,255,.9); text-transform: uppercase; letter-spacing: .09em;
  font-size: clamp(.68rem, .78vw, .77rem); font-weight: 600; white-space: nowrap;
}
/* Below 1200px the 7 links + centered logo can't sit comfortably (longer AR/RU
   labels especially) → collapse to the hamburger early, logo stays centered. */
@media (max-width: 1200px) {
  body[data-page="home"] .nav-home { position: relative; }
  body[data-page="home"] .nav-home .nav-links { display: none; }
  body[data-page="home"] .nav-home .menu-toggle { display: inline-flex; }
  body[data-page="home"] .brand-center {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding-inline: 0;
  }
  body[data-page="home"] .nav-home .nav-end { flex: 0 0 auto; margin-inline-start: auto; }
}
body[data-page="home"] .site-header .nav-links a::after { background: #fff; }
body[data-page="home"] .site-header .nav-links a.active,
body[data-page="home"] .site-header .nav-links a:hover { color: #fff; }
body[data-page="home"] .site-header .lang-btn,
body[data-page="home"] .site-header .menu-toggle { color: #fff; background: transparent; border-color: rgba(255,255,255,.42); }
body[data-page="home"] .site-header.scrolled {
  background: rgba(255,255,255,.94); backdrop-filter: saturate(120%) blur(10px);
  border-bottom-color: var(--border);
}
body[data-page="home"] .site-header.scrolled .brand-center img { filter: none; }
body[data-page="home"] .site-header.scrolled .nav-links a { color: var(--muted); }
body[data-page="home"] .site-header.scrolled .nav-links a.active,
body[data-page="home"] .site-header.scrolled .nav-links a:hover { color: var(--ink); }
body[data-page="home"] .site-header.scrolled .lang-btn,
body[data-page="home"] .site-header.scrolled .menu-toggle { color: var(--ink); border-color: var(--border); }
.hero-inner {
  display: flex; flex-direction: column;
  max-width: 680px; margin-inline-end: auto;   /* text hugs the inline-start edge */
}
.hero .eyebrow { color: rgba(255,255,255,.82); }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero p.lead { color: rgba(255,255,255,.90); font-size: clamp(1.02rem, 2.2vw, 1.22rem); margin-top: 18px; max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn-primary { background: #fff; color: #141410; border-color: #fff; }
.hero .btn-primary:hover { background: rgba(255,255,255,.88); border-color: rgba(255,255,255,.88); }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); }
.hero .btn-ghost:hover { color: #fff; background: rgba(255,255,255,.16); border-color: #fff; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 36px; }
.hero-stats .stat b { display: block; font-size: 1.6rem; color: #fff; font-weight: 700; }
.hero-stats .stat span { color: rgba(255,255,255,.78); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* ---- Cards / grid ----------------------------------------------------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.car-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.car-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.car-card .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.car-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(4px);
  border: 1px solid var(--border-2); color: var(--ink);
  padding: 4px 11px; border-radius: 999px; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.badge.new { background: var(--ink); color: #fff; border-color: transparent; }
/* Sold archive: dark "SATILDI / SOLD" badge, gently dimmed card, no price. */
.badge.sold { background: #7a1420; color: #fff; border-color: transparent; letter-spacing: .1em; }
.car-card.is-sold .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28));
}
.car-card.is-sold .thumb img { filter: saturate(.92); }
.detail-head.is-sold .sold-note {
  display: inline-block; margin-top: 6px; padding: 8px 16px; border-radius: 999px;
  background: #7a1420; color: #fff; font-weight: 700; font-size: 1rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.car-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-card h3 { font-size: 1.08rem; }
.car-card .price { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.car-specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.car-specs .spec {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px;
}

/* ---- Listings layout (filters + results) ------------------------------ */
.listings { display: grid; gap: 28px; align-items: start; }
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 88px;
}
.filters h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; color: var(--muted); }
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.control, select, input[type="text"], input[type="number"], input[type="email"],
input[type="tel"], input[type="search"], textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2);
  color: var(--text); padding: 11px 12px; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
select:hover, input:hover { border-color: var(--faint); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters .btn { margin-top: 6px; }

.results-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.results-head .count { color: var(--muted); font-size: .92rem; }
.results-head .sort { display: flex; align-items: center; gap: 8px; }
.results-head .sort label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.results-head .sort select { width: auto; }
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: var(--radius);
}
/* Empty-stock invitation (no active vehicles) — replaces the grid + filters. */
.empty-stock { text-align: center; max-width: 620px; margin: 48px auto; padding: 32px 24px; }
.empty-stock h2 { font-size: 1.55rem; margin-bottom: 12px; }
.empty-stock p { color: var(--muted); max-width: 46ch; margin: 0 auto 24px; line-height: 1.65; }
.listings.no-filters { grid-template-columns: 1fr !important; }
.listings.no-filters .filters,
.listings.no-filters .results-head { display: none !important; }

.filter-toggle { display: flex; }
@media (min-width: 940px) {
  .listings { grid-template-columns: 288px 1fr; }
  .filters { display: block !important; }
  .filter-toggle { display: none; }
}
@media (max-width: 939px) {
  .filters { position: static; display: none; }
  .filters.open { display: block; }
}

/* ---- Vehicle detail --------------------------------------------------- */
.detail { display: grid; gap: 32px; }
.gallery .main {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface-2); aspect-ratio: 16 / 10;
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; max-height: 250px; overflow-y: auto; }
.thumbs button {
  width: 92px; aspect-ratio: 16/11; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--border); background: var(--surface-2); padding: 0;
}
.thumbs button.active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.detail-head .price { font-size: 1.9rem; font-weight: 700; color: var(--ink); margin-top: 8px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table th, .spec-table td { text-align: start; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--muted); font-weight: 500; width: 45%; }
.spec-table td { font-weight: 600; color: var(--ink); }
.detail-desc { color: var(--muted); }
.card-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
@media (min-width: 940px) {
  .detail { grid-template-columns: 1.25fr 1fr; align-items: start; }
}

/* ---- Pro gallery + lightbox ------------------------------------------ */
.gmain {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); aspect-ratio: 16 / 10; cursor: zoom-in;
}
.gmain img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcount {
  position: absolute; inset-block-end: 12px; inset-inline-end: 12px;
  background: rgba(22, 21, 15, .72); color: #fff; padding: 4px 11px;
  border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.gthumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.gthumbs .gthumb {
  position: relative; border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  padding: 0; aspect-ratio: 16 / 11; background: var(--surface-2); cursor: pointer;
}
.gthumbs .gthumb.active { border-color: var(--accent); }
.gthumbs .gthumb img { width: 100%; height: 100%; object-fit: cover; }
.gmore {
  position: absolute; inset: 0; background: rgba(22, 21, 15, .62); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem;
}
@media (max-width: 560px) { .gthumbs { grid-template-columns: repeat(4, 1fr); } }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15, 14, 11, .95); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.lb-img { max-width: 94vw; max-height: 78vh; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255, 255, 255, .14); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 999px; font-size: 1.7rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { color: #fff; text-align: center; padding: 8px; font-size: .9rem; }
.lb-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 16px; }
.lb-strip button { flex: none; width: 78px; aspect-ratio: 16 / 11; border: 2px solid transparent; border-radius: 6px; overflow: hidden; padding: 0; background: none; cursor: pointer; }
.lb-strip button.active { border-color: var(--accent); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
[dir="rtl"] .lb-prev, [dir="rtl"] .lb-next { transform: translateY(-50%) scaleX(-1); }

/* ---- Expertiz (condition) report ------------------------------------- */
.expertiz-wrap { display: grid; gap: 20px; align-items: center; }
@media (min-width: 520px) { .expertiz-wrap { grid-template-columns: 200px 1fr; } }
.expertiz-diagram { max-width: 210px; margin-inline: auto; width: 100%; }
.expertiz-side { display: flex; flex-direction: column; gap: 12px; }
.expertiz-legend { display: grid; gap: 9px; }
.expertiz-legend li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--text); }
.expertiz-legend .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); flex: none; }
.tramer-banner {
  background: rgba(178,31,45,.07); border: 1px solid var(--accent); color: var(--accent);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .95rem;
}
.expertiz-ok {
  background: rgba(47,158,111,.1); border: 1px solid #2f9e6f; color: #1c7c54;
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 600;
}

/* Five-view expertiz report — licensed line-art base + status overlay */
.ex-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 14px;
  flex-wrap: wrap; background: #2f7fd1; color: #fff; padding: 10px 14px;
  border-radius: 10px; margin-bottom: 14px; font-weight: 700;
}
.ex-tramer { background: #fff; color: #c0392b; font-size: .8rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.ex-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.ex-col { display: flex; flex-direction: column; gap: 10px; }
.ex-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-cell { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; }
.ex-topcell { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; display: flex; flex-direction: column; }
.ex-topcell .ex-cell { border: 0; padding: 0; flex: 1; }
.ex-view { position: relative; line-height: 0; }
.ex-base { width: 100%; display: block; }
.ex-flip { transform: scaleX(-1); }
.ex-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ex-pill {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 10px; font-weight: 700; letter-spacing: .2px; color: #fff;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; line-height: 1.15;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); pointer-events: none;
}
.ex-orjinal { background: #2e9e5b; } .ex-boyali { background: #2f7fd1; }
.ex-lokal { background: #f2b90c; color: #3a2e00; } .ex-degisen { background: #e0362f; }

/* Precise point marker (pin) — dot at the exact spot + small label above it */
.ex-pin { position: absolute; transform: translate(-50%, -50%); z-index: 4; }
.ex-pin.ex-orjinal { --c: #2e9e5b; } .ex-pin.ex-boyali { --c: #2f7fd1; }
.ex-pin.ex-lokal { --c: #f2b90c; } .ex-pin.ex-degisen { --c: #e0362f; }
.ex-pin-dot {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--c); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ex-pin-lab {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  white-space: nowrap; background: var(--c); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.ex-pin.ex-lokal .ex-pin-lab { color: #3a2e00; }
.ex-pin-lab::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--c);
}
.ex-pin.below .ex-pin-lab { bottom: auto; top: calc(100% + 6px); }
.ex-pin.below .ex-pin-lab::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--c); }
.ex-allok {
  display: inline-block; margin: 0 0 12px; padding: 7px 14px; border-radius: 999px;
  background: rgba(46,158,91,.12); color: #1f7a48; font-weight: 600; font-size: .9rem;
}
.ex-cap {
  text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; padding-top: 5px; line-height: 1.2;
}
.ex-legend { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.ex-lgroup { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .82rem; color: var(--text); }
.ex-lgroup b {
  width: 100%; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; margin-bottom: 1px;
}
.ex-li { display: inline-flex; align-items: center; gap: 6px; }
.ex-sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; flex: none; }
.ex-mk { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d9773a; display: inline-block; flex: none; }
@media (max-width: 620px) { .ex-grid { grid-template-columns: 1fr; } }

/* ---- CTA / lead capture ---------------------------------------------- */
.cta {
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 48px);
  display: grid; gap: 30px;
}
.cta h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.cta p { color: var(--muted); margin-top: 10px; }
@media (min-width: 940px) { .cta { grid-template-columns: 1fr 1fr; align-items: center; } }

/* ---- Forms ------------------------------------------------------------ */
.form-grid { display: grid; gap: 15px; }
.form-grid .two { display: grid; gap: 15px; }
.form-grid .three { display: grid; gap: 15px; }
@media (min-width: 560px) {
  .form-grid .two { grid-template-columns: 1fr 1fr; }
  .form-grid .three { grid-template-columns: 1fr 1fr 1fr; }
}
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--faint); }
.form-status { padding: 13px 15px; border-radius: var(--radius-sm); font-size: .92rem; display: none; }
.form-status.show { display: block; }
.form-status.ok  { background: rgba(28,124,84,.08); border: 1px solid var(--ok); color: var(--ok); }
.form-status.err { background: rgba(178,31,45,.06); border: 1px solid var(--err); color: var(--err); }
.required { color: var(--accent); }
::placeholder { color: var(--faint); opacity: 1; } /* readable placeholder (WCAG AA) */

/* File upload (Sell your car) */
.file-drop {
  border: 1.5px dashed var(--border-2); border-radius: var(--radius); padding: 22px;
  text-align: center; color: var(--muted); background: var(--bg-2); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-drop:hover, .file-drop.drag { border-color: var(--accent); background: #fff; }
.file-drop input { display: none; }
.file-drop .ic { color: var(--accent); margin-bottom: 8px; }
.file-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.file-thumb { position: relative; width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb button {
  position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 999px;
  background: rgba(22,21,15,.8); color: #fff; border: 0; font-size: 13px; line-height: 1; display: grid; place-items: center;
}

/* ---- Contact page ----------------------------------------------------- */
.contact-grid { display: grid; gap: 28px; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.info-list { display: grid; gap: 18px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item .ic {
  flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--accent);
}
.info-item .ic svg { width: 20px; height: 20px; }
.info-item h4 { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.info-item a, .info-item p { font-size: 1.02rem; color: var(--text); }
.info-item a:hover { color: var(--accent); }
.map-embed {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16 / 10; background: var(--surface-2);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---- About page ------------------------------------------------------- */
.about-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 940px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.value-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 40px; }
.value {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.value .ic { color: var(--accent); margin-bottom: 12px; }
.value h3 { font-size: 1.08rem; margin-bottom: 6px; }
.value p { color: var(--muted); font-size: .92rem; }

/* ---- Steps (Sell your car) ------------------------------------------- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 8px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step .num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---- News (Haberler) -------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: .84rem;
  letter-spacing: .02em; transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--ink); border-color: var(--faint); }
.chip.active { background: var(--ink); color: #fff; border-color: transparent; }

/* Active-filter chips (removable) on the listings page */
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.active-filters:empty { display: none; }
.afchip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2, #f3f3ef); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 6px 5px 13px; font-size: .85rem; color: var(--ink);
}
.afchip button {
  border: 0; cursor: pointer; width: 18px; height: 18px; border-radius: 50%;
  background: var(--faint); color: #fff; font-size: 13px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.afchip button:hover { background: var(--ink); }
.afclear {
  align-self: center; background: none; border: 0; cursor: pointer;
  color: var(--accent, #b21f2d); font-size: .85rem; font-weight: 600; padding: 5px 8px;
}
.afclear:hover { text-decoration: underline; }

/* Group label above a set of cascading selects (Brand/Model/Year) */
.field-group-label { display: block; font-weight: 600; font-size: .92rem; margin: 4px 0 8px; color: var(--ink); }

/* News in-page reading overlay */
.news-card { cursor: pointer; }
.news-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.modal-open { overflow: hidden; }
.news-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000; padding: 20px;
  background: rgba(12,12,9,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.news-modal-backdrop[hidden] { display: none; }
.news-modal {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); color: var(--text); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.30);
}
.news-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px;
  border: 0; border-radius: 50%; cursor: pointer; background: rgba(0,0,0,.5); color: #fff;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
[dir="rtl"] .news-modal-close { right: auto; left: 12px; }
.news-modal-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2, #eee); border-radius: 16px 16px 0 0; }
.news-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-modal-body { padding: 20px 22px 24px; }
.news-modal-body .nm-title { font-size: 1.35rem; line-height: 1.25; margin: 8px 0 10px; }
.news-modal-body .nm-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.news-modal-body .nm-text { color: var(--text); line-height: 1.65; margin-bottom: 20px; white-space: pre-line; }
.news-modal-body .nm-src { display: inline-flex; }
@media (max-width: 560px) { .news-modal-media { aspect-ratio: 16 / 10; } .news-modal-body { padding: 16px; } }

.news-updated { color: var(--faint); font-size: .82rem; margin-bottom: 18px; }

.news-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.news-card .thumb { aspect-ratio: 16 / 10; background: var(--surface-2); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.news-tag {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(178,31,45,.07);
  border: 1px solid rgba(178,31,45,.2); padding: 2px 8px; border-radius: 999px;
}
.news-card h3 { font-size: 1.04rem; line-height: 1.32; }
.news-card h3 a:hover { color: var(--accent); }
.news-card .excerpt { color: var(--muted); font-size: .9rem; }
.news-meta {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: .78rem; color: var(--faint); border-top: 1px solid var(--border); padding-top: 12px;
}
.news-meta .src { color: var(--muted); font-weight: 600; }
.news-disclaimer { color: var(--faint); font-size: .82rem; margin-top: 30px; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 48px; }
.footer-inner { display: grid; gap: 30px; padding-block: 52px; }
.footer-inner .col h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.footer-inner .col a, .footer-inner .col p { color: var(--muted); display: block; padding: 5px 0; font-size: .95rem; }
.footer-inner .col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-block: 20px; color: var(--faint); font-size: .84rem;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}
@media (min-width: 720px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }

/* ---- RTL support (Arabic) -------------------------------------------- */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .nav-links a::after { transform-origin: right; }
[dir="rtl"] .eyebrow { letter-spacing: .06em; }

/* ---- Utilities -------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* =========================================================================
   Homepage editorial sections (Welcome / category tiles / latest arrivals)
   Restrained serif display headings, uppercase letterspaced labels, flat rules.
   ========================================================================= */
.home-welcome { padding: clamp(56px, 9vw, 112px) 0 clamp(28px, 5vw, 56px); text-align: center; }
.hw-eyebrow {
  display: block; text-transform: uppercase; letter-spacing: .42em;
  font-size: .8rem; font-weight: 600; color: var(--muted);
}
.hw-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 5vw, 3.1rem); letter-spacing: .16em; font-weight: 600;
  color: var(--ink); margin-top: 14px;
}
.hw-lead {
  max-width: 76ch; margin: 22px auto 0; color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.78;
}

/* Four portrait category tiles (edge-to-edge, darkened, centered caption) */
.home-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.htile {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.htile::before { content: ""; position: absolute; inset: 0; background: rgba(10,10,8,.42); transition: background .3s ease; }
.htile:hover::before { background: rgba(10,10,8,.56); }
.htile-cap {
  position: relative; z-index: 2; color: #fff; text-align: center;
  text-transform: uppercase; letter-spacing: .22em; font-weight: 600;
  font-size: clamp(.9rem, 1.4vw, 1.12rem); padding: 0 10px;
}
.htile-cap::before, .htile-cap::after {
  content: ""; display: block; width: 64%; max-width: 190px; height: 1px;
  background: rgba(255,255,255,.7); margin: 16px auto;
}
@media (max-width: 860px) { .home-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .home-tiles { grid-template-columns: 1fr; } .htile { aspect-ratio: 16/10; } }

/* Latest arrivals */
.home-arrivals { padding: clamp(56px, 9vw, 112px) 0; text-align: center; }
.ha-title {
  font-family: Georgia, "Times New Roman", serif; text-transform: uppercase;
  font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: .18em; font-weight: 600; color: var(--ink);
}
.ha-rule { display: inline-block; width: 64px; height: 2px; background: var(--ink); margin: 18px auto clamp(36px, 5vw, 56px); }
.arrivals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); text-align: left; }
@media (max-width: 980px) { .arrivals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .arrivals-grid { grid-template-columns: 1fr; } }

/* Flat editorial vehicle card */
.acard { display: block; color: var(--ink); }
.acard-name {
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  font-size: .98rem; line-height: 1.3; min-height: 2.6em; margin-bottom: 14px;
}
.acard-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2, #f3f3ef); }
.acard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.acard:hover .acard-media img { transform: scale(1.04); }
.acard-body { padding-top: 16px; }
.acard-row { display: flex; gap: 10px; font-size: .82rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.acard-k { text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; min-width: 66px; }
.acard-v { color: var(--ink); }
.acard-price { margin-top: 14px; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.ha-more { margin-top: clamp(30px, 4vw, 48px); }
.btn-line {
  display: inline-block; text-transform: uppercase; letter-spacing: .18em; font-size: .82rem;
  font-weight: 600; color: var(--ink); padding: 14px 30px; border: 1px solid var(--ink); background: transparent;
  transition: background .25s ease, color .25s ease;
}
.btn-line:hover { background: var(--ink); color: #fff; }

/* News: cold-start skeleton + subtle background-refresh spinner */
.news-skel { pointer-events: none; }
.news-skel .thumb { aspect-ratio: 16 / 10; background: var(--surface-2, #f0efec); }
.news-skel .sk {
  display: block; height: 12px; border-radius: 6px; margin: 10px 0;
  background: linear-gradient(90deg, var(--surface-2, #f0efec) 25%, #e9e8e3 37%, var(--surface-2, #f0efec) 63%);
  background-size: 400% 100%; animation: nsk 1.2s ease infinite;
}
.news-skel .sk-tag { width: 60px; height: 18px; border-radius: 999px; }
.news-skel .sk-line { width: 100%; }
.news-skel .sk-line.short { width: 60%; }
@keyframes nsk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.news-updated.updating::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-inline-start: 8px;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%;
  vertical-align: -2px; animation: nspin .7s linear infinite;
}
@keyframes nspin { to { transform: rotate(360deg); } }

/* Spam honeypot — off-screen field that real users never see/fill */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
/* Expertiz: named damaged parts under the legend */
.ex-parts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.ex-parts-h { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.ex-parts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex-parts li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
