/* =========================================================
   Dynamic Automotive — stil principal
   Culorile se schimbă din variabilele de mai jos.
   ========================================================= */
:root {
  --c-bg: #f5f6f8;
  --c-surface: #ffffff;
  --c-ink: #12161c;
  --c-muted: #5b6573;
  --c-line: #e3e6ea;
  --c-dark: #0b0b0d;
  --c-accent: #e8892b;        /* portocaliu din logo */
  --c-accent-dark: #c96a16;
  --c-accent-2: #f2a650;
  --c-danger: #b42318;
  --c-ok: #1a8a4a;
  --c-warn: #c27a00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,22,28,.06), 0 6px 20px rgba(16,22,28,.06);
  --max: 1200px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--c-ink); background: var(--c-bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: 64px 0; }
.section--white { background: var(--c-surface); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 28px; flex-wrap: wrap; }
.section__head p { color: var(--c-muted); margin: 0; }
.muted { color: var(--c-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 10px; border: 2px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(180deg, var(--c-accent-2), var(--c-accent)); color: #111; }
.btn--primary:hover { background: var(--c-accent-dark); color: #111; }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--dark { background: var(--c-dark); color: #fff; }
.btn--dark:hover { background: #222a33; }
.btn--whatsapp { background: #25d366; color: #fff; }
.btn--whatsapp:hover { background: #1ebe59; }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.topbar { background: #000; color: #a9adb3; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding: 6px 0; flex-wrap: wrap; }
.topbar a { text-decoration: none; color: #fff; }

.header { background: var(--c-dark); color: #fff; border-bottom: 1px solid #1f1f24; position: sticky; top: 0; z-index: 50; }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; line-height: 1.1; }
.logo b { color: var(--c-accent); font-weight: 800; }
.logo__img { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.logo__mark { width: 38px; height: 38px; border-radius: 9px; background: var(--c-accent); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; }
.logo small { display: block; font-weight: 500; font-size: .66rem; color: #9a9ea5; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a { text-decoration: none; padding: .55rem .85rem; border-radius: 8px; font-weight: 500; color: #c4c7cc; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: #1a1a1f; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--c-accent); }
.nav .btn { margin-left: .5rem; color: #111; padding: .6rem 1rem; }
.nav .btn:hover { background: var(--c-accent-dark); color: #111; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; background: var(--c-dark);
    flex-direction: column; align-items: stretch; padding: 1rem; gap: .25rem;
    border-bottom: 1px solid #1f1f24; box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav .btn { margin: .5rem 0 0; }
  .topbar .topbar__hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(90deg, #0b0b0d 0%, #0b0b0d 38%, rgba(11,11,13,.55) 58%, rgba(11,11,13,0) 80%),
    url("../assets/hero.webp") right center / auto 100% no-repeat, #0b0b0d;
}
@media (max-width: 820px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(11,11,13,.35) 0%, rgba(11,11,13,.75) 45%, #0b0b0d 75%),
      url("../assets/hero-mobil.webp") center top / 100% auto no-repeat, #0b0b0d;
  }
  .hero .container { padding-top: 220px; }
}
.hero .container { padding: 96px 0 104px; }
.hero__eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent-2); font-weight: 700; margin-bottom: 1rem; }
.hero h1 { max-width: 16ch; font-family: "Cinzel", Georgia, serif; font-weight: 500; letter-spacing: .01em; text-transform: uppercase; font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.12; }
.hero p { max-width: 52ch; color: #cfd6de; font-size: 1.1rem; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero__stats { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.hero__stats strong { display: block; font-size: 1.8rem; }
.hero__stats span { color: #aab3bd; font-size: .9rem; }

/* ---------- Căutare rapidă ---------- */
.quicksearch { margin-top: -44px; position: relative; z-index: 2; }
.quicksearch form {
  background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
}
@media (max-width: 900px) { .quicksearch form { grid-template-columns: 1fr 1fr; } .quicksearch .btn { grid-column: 1 / -1; } }

/* ---------- Formulare ---------- */
label { font-size: .85rem; font-weight: 600; display: block; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: .7rem .8rem;
  border: 1px solid var(--c-line); border-radius: 9px; background: #fff; color: var(--c-ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--c-accent); outline-offset: 0; border-color: transparent; }
textarea { min-height: 130px; resize: vertical; }
.field { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: .85rem; color: var(--c-muted); }
.form-status { margin-top: 1rem; padding: .8rem 1rem; border-radius: 9px; display: none; }
.form-status.is-ok { display: block; background: #e7f6ee; color: var(--c-ok); }
.form-status.is-err { display: block; background: #fdecee; color: var(--c-danger); }

/* ---------- Carduri mașini ---------- */
.grid-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.car-card {
  background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s;
}
.car-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,22,28,.08), 0 14px 32px rgba(16,22,28,.12); }
.car-card__img { position: relative; aspect-ratio: 4 / 3; background: #dfe3e8; overflow: hidden; }
.car-card__img img { width: 100%; height: 100%; object-fit: cover; }
.car-card__count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .78rem; padding: 3px 8px; border-radius: 6px; }
.badge { position: absolute; left: 10px; top: 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 9px; border-radius: 6px; color: #fff; background: var(--c-dark); }
.badge--rezervat { background: var(--c-warn); }
.badge--vandut { background: #6b7280; }
.badge--nou { background: var(--c-accent); color: #111; }
.car-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.car-card__title { font-size: 1.08rem; font-weight: 700; margin: 0 0 2px; }
.car-card__sub { color: var(--c-muted); font-size: .9rem; margin: 0 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card__specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { font-size: .8rem; background: var(--c-bg); border-radius: 6px; padding: 4px 8px; color: #333c47; }
.car-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--c-line); padding-top: 12px; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--c-ink); }
.price small { font-size: .78rem; font-weight: 500; color: var(--c-muted); }
.car-card.is-sold { opacity: .7; }
.car-card.is-sold .price { text-decoration: line-through; color: var(--c-muted); }

.empty { text-align: center; padding: 60px 20px; color: var(--c-muted); background: var(--c-surface); border-radius: var(--radius); }

/* ---------- Pagina stoc: filtre ---------- */
.stock-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.filters { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: sticky; top: 92px; }
.filters h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.filters .field { margin-bottom: .85rem; }
.filters .range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stock-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 18px; flex-wrap: wrap; }
.stock-toolbar select { width: auto; }
.filters-toggle { display: none; }
@media (max-width: 900px) {
  .stock-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.is-open { display: block; }
  .filters-toggle { display: inline-flex; }
}

/* ---------- Pagina mașinii ---------- */
.breadcrumb { font-size: .88rem; color: var(--c-muted); margin: 22px 0; }
.breadcrumb a { text-decoration: none; color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-ink); }
.car-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .car-layout { grid-template-columns: 1fr; } }

.gallery__main { position: relative; aspect-ratio: 4 / 3; background: #dfe3e8; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 1.4rem; display: grid; place-items: center; box-shadow: var(--shadow);
}
.gallery__nav--prev { left: 12px; } .gallery__nav--next { right: 12px; }
.gallery__counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.65); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: .85rem; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: #dfe3e8; }
.gallery__thumbs button.is-active { border-color: var(--c-accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.panel { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.car-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
@media (max-width: 960px) { .car-aside { position: static; } }
.car-aside h1 { font-size: 1.7rem; margin-bottom: .2rem; }
.car-aside .price { font-size: 2rem; display: block; margin: 14px 0 4px; }
.car-aside .actions { display: grid; gap: 10px; margin-top: 18px; }
.keyfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.keyfacts div { background: var(--c-bg); border-radius: 9px; padding: 10px 12px; }
.keyfacts dt { font-size: .75rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.keyfacts dd { margin: 0; font-weight: 700; }

.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; padding: 11px 4px; border-bottom: 1px solid var(--c-line); font-size: .95rem; }
.specs th { color: var(--c-muted); font-weight: 500; width: 45%; }
.features { columns: 2; column-gap: 24px; padding: 0; margin: 0; list-style: none; }
.features li { break-inside: avoid; padding: 6px 0 6px 26px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 8px; border-left: 2px solid var(--c-ok); border-bottom: 2px solid var(--c-ok); transform: rotate(-45deg); }
@media (max-width: 600px) { .features { columns: 1; } }
.car-content { display: grid; gap: 22px; margin-top: 26px; }
.car-content h2 { font-size: 1.25rem; }
.description { white-space: pre-line; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 100; display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Avantaje / servicii ---------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature { background: var(--c-surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section--white .feature { background: var(--c-bg); box-shadow: none; }
.feature__icon { width: 46px; height: 46px; border-radius: 10px; background: #fdf0e3; color: var(--c-accent-dark); display: grid; place-items: center; margin-bottom: 14px; }
.feature__icon svg { width: 24px; height: 24px; }
.feature p { color: var(--c-muted); margin: 0; }

/* ---------- CTA ---------- */
.cta { background: radial-gradient(120% 160% at 100% 100%, #3a2410 0%, #0b0b0d 60%); color: #fff; border-radius: 16px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta p { color: #b9c2cc; margin: 0; }

/* ---------- Pagini simple ---------- */
.page-hero { background: radial-gradient(120% 140% at 100% 0%, #3a2410 0%, #0b0b0d 55%); color: #fff; padding: 56px 0; border-bottom: 2px solid var(--c-accent); }
.page-hero p { color: #b9c2cc; max-width: 60ch; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .feature__icon { margin: 0; flex: none; }
.contact-list strong { display: block; }
.contact-list a { text-decoration: none; }
.map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); margin-top: 22px; background: #dfe3e8; }

/* ---------- Footer ---------- */
.footer { background: #000; color: #aab3bd; padding: 56px 0 24px; margin-top: 64px; font-size: .93rem; }
.footer .logo { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h3 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer a { text-decoration: none; color: #aab3bd; }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid #1f1f24; margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }
.footer + .section, main + .footer { margin-top: 0; }

/* Buton WhatsApp plutitor */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; }

@media (max-width: 520px) {
  .hero__stats { gap: 1.25rem 1.75rem; margin-top: 2rem; }
  .hero__stats strong { font-size: 1.35rem; }
  .hero__actions .btn { flex: 1 1 auto; }
}
