/* ============================================================
   Motor Point Erbil — demo dealership site by truq.online.
   Bolder look: dark slate hero and trade-in band over a light
   body. Red accent used for prices and highlights, WhatsApp
   green for actions. Mobile-first; the car grid + filters are
   the star. Logical properties for LTR + RTL.
   ============================================================ */

:root {
  --ink: #0F172A;
  --dark: #0F172A;
  --dark-soft: #1E293B;
  --dark-line: #2C3A4E;
  --accent: #DC2626;
  --wa: #1FAA53;
  --muted: #5B6472;
  --line: #E2E8F0;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --radius: 16px;
  --font-latin: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* room for the floating button + badge */
  padding-block-end: 84px;
}

html[lang="ar"] body,
html[lang="ckb"] body { font-family: var(--font-arabic); line-height: 1.75; }
html[lang="ar"] *,
html[lang="ckb"] * { letter-spacing: 0 !important; }

img, svg { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); text-transform: uppercase; }
html[lang="ar"] h1, html[lang="ckb"] h1 { text-transform: none; line-height: 1.3; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--wa);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.9rem 1.6rem;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: #178F45; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31, 170, 83, 0.35); text-decoration: none; }
.btn .icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Header (dark, merges with hero) ---------- */
.site-header { background: var(--dark); }
.header-inner { display: flex; align-items: center; gap: 0.75rem; min-height: 62px; }
.brand {
  font-weight: 800;
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin-inline-end: auto;
}
html[lang="ar"] .brand, html[lang="ckb"] .brand { text-transform: none; }
.brand:hover { text-decoration: none; }
.brand .mark { color: #F87171; }

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--dark-soft);
  border: 1px solid var(--dark-line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a { padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: #B9C2CF; }
.lang-switch a:hover { text-decoration: none; color: #fff; }
.lang-switch a.active { background: #fff; color: var(--dark); }

/* ---------- Dark hero ---------- */
.hero {
  background:
    radial-gradient(70% 90% at 80% 0%, rgba(220, 38, 38, 0.16), transparent 60%),
    var(--dark);
  color: #fff;
  padding-block: clamp(3.5rem, 9vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 75%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-block-end: 1rem;
}
.hero .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 .mark { color: #F87171; }
.hero .sub { color: #B9C2CF; font-size: clamp(1rem, 2.5vw, 1.2rem); max-width: 52ch; margin-block-end: 1.8rem; }
.hero-note { color: #8E99A8; font-size: 0.88rem; margin: 0.9rem 0 0; }

/* ---------- Car grid section ---------- */
.stock { padding-block: clamp(2.5rem, 6vw, 4rem); }
.stock-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-block-end: 1.25rem; }
.stock-head h2 { margin: 0; }
.stock-head p { color: var(--muted); margin: 0; }
#cars-count { font-weight: 700; color: var(--ink); }

/* Filters: three labelled chip rows, horizontally scrollable on phones */
.filters { display: grid; gap: 0.5rem; margin-block-end: 1.5rem; }
.filter-row { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.filter-label {
  flex: none;
  width: 58px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
html[lang="ar"] .filter-label, html[lang="ckb"] .filter-label { text-transform: none; font-size: 0.88rem; }
.chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: #C7D0DB; color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Grid: 2-up on phones, denser up the sizes */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.cars-grid.switching { opacity: 0; transform: translateY(8px); }
@media (min-width: 700px) { .cars-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1000px) { .cars-grid { grid-template-columns: repeat(4, 1fr); } }

.car-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.car-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1); }

.car-media { position: relative; }
.car-img, .car-ph {
  width: 100%;
  height: 108px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
@media (min-width: 700px) { .car-img, .car-ph { height: 132px; } }
.car-ph { position: relative; overflow: hidden; }
.car-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 90% at 20% 0%, rgba(255, 255, 255, 0.16), transparent 55%);
}
.car-ph span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.ph-0 { background: linear-gradient(135deg, #475569, #334155); }
.ph-1 { background: linear-gradient(135deg, #334155, #1E293B); }
.ph-2 { background: linear-gradient(135deg, #64748B, #475569); }
.ph-3 { background: linear-gradient(135deg, #1E293B, #0F172A); }
.ph-4 { background: linear-gradient(135deg, #7F1D1D, #991B1B); }
.ph-5 { background: linear-gradient(135deg, #52525B, #3F3F46); }

.car-tag {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.car-body { padding: 0.8rem 0.9rem 0.95rem; }
.car-body h3 { margin-block-end: 0.15rem; }
.car-meta { color: var(--muted); font-size: 0.82rem; margin: 0 0 0.35rem; }
.car-price {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.18rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
  text-align: start;
}
.car-ask {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wa);
}
.car-ask svg { width: 1.05em; height: 1.05em; }

.cars-empty {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}
.cars-reset {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
}
.cars-reset:hover { border-color: var(--ink); }

/* ---------- Trade-in strip (dark) ---------- */
.trade {
  background:
    radial-gradient(60% 120% at 15% 100%, rgba(220, 38, 38, 0.18), transparent 60%),
    var(--dark);
  color: #fff;
  padding-block: clamp(2.5rem, 6vw, 3.75rem);
}
.trade-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.trade h2 { margin: 0 0 0.25rem; }
.trade p { color: #B9C2CF; margin: 0; }

/* ---------- Location + hours ---------- */
.info-section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.info-grid { display: grid; gap: 1.1rem; }
@media (min-width: 800px) { .info-grid { grid-template-columns: 2fr 3fr; } }
.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.info-card h2 { font-size: 1.2rem; }
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.55rem;
  border-block-end: 1px dashed var(--line);
  font-size: 0.97rem;
}
.hours-list li:last-child { border-block-end: 0; }
.hours-list .time { font-weight: 700; white-space: nowrap; }
.info-card .address { color: var(--muted); font-size: 0.95rem; }
.map-frame {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 12px;
  margin-block-start: 0.75rem;
  background: var(--bg);
}

/* ---------- Footer ---------- */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 1.5rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-langs { display: flex; gap: 1rem; }
.footer-langs a { color: var(--muted); }

/* ---------- Floating WhatsApp + truq badge ---------- */
.wa-float {
  position: fixed;
  inset-block-end: 16px;
  inset-inline-end: 16px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(31, 170, 83, 0.4);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.07); text-decoration: none; }
.wa-float svg { width: 30px; height: 30px; }

.truq-badge {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-start: 16px;
  z-index: 60;
  background: #fff;
  border: 1px solid #C9C9FF;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #1B1BD6;
  box-shadow: 0 6px 18px rgba(35, 35, 255, 0.14);
  white-space: nowrap;
}
.truq-badge:hover { background: #EDEDFF; text-decoration: none; }
.truq-badge strong { color: #2323FF; }

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