/* ============================================
   DriveMe Auto — Каталог
   Брендбук: чорний фон + помаранчевий акцент + білий текст
   ============================================ */

:root {
  --black: #000000;
  --graphite: #0e0e0f;
  --graphite-2: #16161a;
  --card: #1a1a1f;
  --line: #26262c;
  --orange: #f86a1d;
  --orange-deep: #f26419;
  --white: #ffffff;
  --gray: #9a9aa3;
  --gray-soft: #c7c7cf;
  --green: #34c759;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1240px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* акцентне слово — помаранчевий жирний курсив (брендбук) */
.accent { color: var(--orange); font-weight: 800; font-style: italic; }

/* діагональна помаранчева «планка» — фірмовий мотив */
.bar-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  transform: rotate(-18deg);
  opacity: 0.55;
  pointer-events: none;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.monogram {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2a2a30, #121214);
  border: 1px solid #34343c;
  display: grid; place-items: center;
  font-weight: 800; font-style: italic; font-size: 18px;
  color: var(--orange);
  box-shadow: inset 0 0 14px rgba(248, 106, 29, 0.18);
}
.brand__name { font-weight: 800; font-size: 19px; letter-spacing: 0.3px; }
.brand__name span { color: var(--orange); font-style: italic; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--gray-soft); font-size: 15px; font-weight: 600; transition: color 0.2s; }
.nav a:hover { color: var(--white); }
.header__phone {
  background: var(--orange);
  color: #111;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.15s, background 0.2s;
}
.header__phone:hover { background: #ff7d35; transform: translateY(-1px); }
.burger { display: none; background: none; color: #fff; font-size: 26px; }
.header__socials { display: flex; gap: 8px; align-items: center; margin-left: 4px; }
.header__socials a {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--gray-soft);
  display: grid; place-items: center;
  transition: all 0.18s;
}
.header__socials a:hover { background: var(--orange); color: #111; border-color: var(--orange); transform: translateY(-1px); }
.header__socials a svg { width: 18px; height: 18px; }
.footer__socials a svg { width: 18px; height: 18px; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(248, 106, 29, 0.16), transparent 60%),
    var(--black);
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 58px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.5px;
  max-width: 760px;
}
.hero p {
  margin-top: 18px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--gray-soft);
  max-width: 560px;
}
.hero__stats {
  display: flex;
  gap: 38px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.stat__num { font-size: 30px; font-weight: 800; color: var(--orange); }
.stat__label { font-size: 13px; color: var(--gray); margin-top: 2px; }

/* ============ ФІЛЬТРИ ============ */
.filters {
  position: sticky;
  top: 68px;
  z-index: 50;
  background: var(--graphite);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.filters__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.city-tabs { display: flex; gap: 8px; }
.city-tab {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--gray-soft);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.18s;
}
.city-tab:hover { border-color: #3a3a42; color: #fff; }
.city-tab.active {
  background: var(--orange);
  color: #111;
  border-color: var(--orange);
}
.select, .search-input {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s;
}
.select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239a9aa3' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select:focus, .search-input:focus { border-color: var(--orange); }
.search-input { min-width: 200px; flex: 1; }
.filters__count { margin-left: auto; color: var(--gray); font-size: 14px; font-weight: 600; }
.filters__count b { color: #fff; }
.btn-reset {
  background: none;
  color: var(--gray);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  padding: 6px;
}
.btn-reset:hover { color: var(--white); }

/* ============ СІТКА КАТАЛОГУ ============ */
.catalog { padding: 36px 0 70px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.car-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.car-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 106, 29, 0.5);
  box-shadow: var(--shadow);
}
.car-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #1d1d22, #121215);
  overflow: hidden;
}
.car-card__media img { width: 100%; height: 100%; object-fit: cover; }
.car-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--orange);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 7px;
}
.car-card__city {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 7px;
  display: flex; align-items: center; gap: 5px;
}
.car-card__reserved {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--orange);
}
.car-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.car-card__title { font-size: 18px; font-weight: 800; }
.car-card__sub { color: var(--gray); font-size: 13px; margin-top: 3px; }
.car-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 16px;
}
.spec-chip {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--gray-soft);
  font-weight: 600;
}
.car-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.car-card__price { font-size: 23px; font-weight: 800; }
.car-card__price span { color: var(--orange); }
.car-card__btn {
  background: var(--orange);
  color: #111;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  transition: background 0.18s;
}
.car-card__btn:hover { background: #ff7d35; }

/* транзит / Америка в дорозі */
.city-tab--usa.active { background: linear-gradient(90deg, #2563eb, #1d4ed8); color: #fff; border-color: #2563eb; }
.car-card__badge--usa { background: #2563eb; color: #fff; }
.car-card__badge--sale { background: #e23b2e; color: #fff; }
.car-info__badge--sale { background: #e23b2e; color: #fff; }
.discount-note { margin: 6px 0 14px; font-size: 14px; color: var(--gray-soft); }
.discount-note b { color: #ff6a4d; }
.car-card__city--eta { background: rgba(37, 99, 235, 0.85); }
.price-note { font-size: 11px; color: var(--gray); margin-top: 3px; font-weight: 600; }
.price-note s { color: #6f6f77; }
.transit-prices { margin: 6px 0 14px; font-size: 14px; color: var(--gray-soft); }
.transit-prices b { color: var(--orange); }
.car-info__price small { font-size: 14px; color: var(--gray); font-weight: 600; }
.transit-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid #2563eb;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.transit-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.transit-row span { color: var(--gray); }
.transit-row b { text-align: right; }

.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--gray);
}
.empty b { color: #fff; display: block; font-size: 20px; margin-bottom: 8px; }

/* ============ КАРТКА АВТО (car.html) ============ */
.breadcrumbs { padding: 22px 0 6px; color: var(--gray); font-size: 14px; }
.breadcrumbs a:hover { color: var(--orange); }
.car-page { padding: 14px 0 70px; }
.car-page__top {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 34px;
  align-items: start;
}

/* галерея */
.gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, #1d1d22, #121215);
  border: 1px solid var(--line);
}
.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%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff; font-size: 22px;
  display: grid; place-items: center;
  transition: background 0.18s;
}
.gallery__nav:hover { background: var(--orange); color: #111; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__counter {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}
.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.gallery__thumb {
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #1d1d22;
  transition: border-color 0.18s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.active { border-color: var(--orange); }

/* інфо-панель */
.car-info__badge {
  display: inline-block;
  background: var(--orange);
  color: #111;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 5px 11px; border-radius: 7px;
  margin-bottom: 12px;
}
.car-info h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; line-height: 1.1; }
.car-info__city { color: var(--gray-soft); font-size: 15px; margin-top: 8px; font-weight: 600; }
.car-info__price {
  font-size: 38px; font-weight: 800;
  margin: 20px 0 6px;
}
.car-info__price span { color: var(--orange); }
.car-info__vin {
  font-size: 13px; color: var(--gray);
  margin-bottom: 22px;
  font-weight: 600;
}
.car-info__vin b { color: var(--gray-soft); letter-spacing: 1px; font-family: "Inter", monospace; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 16px;
  transition: transform 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #111; flex: 1; min-width: 180px; }
.btn--primary:hover { background: #ff7d35; }
.btn--ghost { background: var(--card); color: #fff; border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--orange); }
.car-info__note { margin-top: 14px; color: var(--gray); font-size: 13px; }

/* характеристики */
.specs-block { margin-top: 46px; }
.section-title { font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.section-title::after {
  content: "";
  display: block;
  width: 54px; height: 3px;
  background: var(--orange);
  border-radius: 3px;
  margin-top: 10px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-row {
  background: var(--card);
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spec-row__label { color: var(--gray); font-size: 13px; font-weight: 600; }
.spec-row__value { font-size: 16px; font-weight: 700; }

/* комплектація */
.features-block { margin-top: 46px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.feature-item {
  display: flex; align-items: center; gap: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
}
.feature-item .check {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 6px;
  background: rgba(248, 106, 29, 0.15);
  color: var(--orange);
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
}

/* опис */
.desc-block { margin-top: 46px; }
.desc-text {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 16px;
  color: var(--gray-soft);
  line-height: 1.7;
}

/* схожі авто */
.similar-block { margin-top: 56px; }

/* ============ ФОРМА / МОДАЛКА ============ */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal__box {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow);
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  background: none; color: var(--gray); font-size: 24px; line-height: 1;
}
.modal__close:hover { color: #fff; }
.modal h3 { font-size: 23px; font-weight: 800; }
.modal h3 span { color: var(--orange); }
.modal__sub { color: var(--gray-soft); font-size: 14px; margin: 8px 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--gray-soft); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s;
}
.field input:focus, .field textarea:focus { border-color: var(--orange); }
.field textarea { resize: vertical; min-height: 70px; }
.modal .btn--primary { width: 100%; margin-top: 6px; }
.modal__consent { font-size: 11px; color: var(--gray); margin-top: 12px; text-align: center; }
.modal__consent a { color: var(--gray-soft); text-decoration: underline; }
.form-msg { text-align: center; padding: 14px 0; }
.form-msg__icon { font-size: 46px; }
.form-msg h3 { margin: 12px 0 6px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--graphite);
  border-top: 1px solid var(--line);
  padding: 48px 0 30px;
  margin-top: 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}
.footer__about { color: var(--gray); font-size: 14px; max-width: 320px; margin-top: 14px; }
.footer h4 { font-size: 15px; margin-bottom: 14px; font-weight: 800; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--gray-soft); font-size: 14px; transition: color 0.18s; }
.footer a:hover { color: var(--orange); }
.footer__socials { display: flex; gap: 12px; margin-top: 16px; }
.footer__socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 16px;
  transition: all 0.18s;
}
.footer__socials a:hover { background: var(--orange); color: #111; border-color: var(--orange); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--gray); font-size: 13px;
}

/* плаваюча кнопка телефону (mobile) */
.fab-call {
  display: none;
  position: fixed; right: 18px; bottom: 18px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(248, 106, 29, 0.45);
}

/* ============ АДАПТИВ ============ */
@media (max-width: 900px) {
  .car-page__top { grid-template-columns: 1fr; gap: 22px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .burger { display: block; }
  .header__phone { display: none; }
  .header__socials { display: none; }
  .fab-call { display: grid; }
  .filters { top: 0; }
  .filters__count { width: 100%; margin-left: 0; }
  .footer__grid { grid-template-columns: 1fr; }
}
