/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #d62828;
  --primary-dark: #a61e1e;
  --dark: #14171f;
  --text: #1f2329;
  --muted: #646a73;
  --line: #e5e6eb;
  --bg-alt: #f7f8fa;
  --radius: 12px;
}
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: #fff;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; }
img { max-width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 24px; font-weight: 800; text-decoration: none; color: var(--dark); letter-spacing: .5px; }
.logo span { color: var(--primary); }
.main-nav { display: flex; gap: 8px; }
.main-nav a {
  text-decoration: none; padding: 8px 16px; border-radius: 8px;
  color: var(--muted); transition: .2s;
}
.main-nav a:hover { color: var(--primary); background: rgba(214,40,40,.06); }
.main-nav a.active { color: var(--primary); font-weight: 600; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  padding: 110px 0 100px;
  background:
    linear-gradient(rgba(10,12,18,.82), rgba(10,12,18,.82)),
    url("https://placehold.co/1600x900/14171f/3a3f4d?text=.") center/cover;
  color: #fff; text-align: center;
}
.hero h1 { font-size: 44px; margin-bottom: 18px; }
.hero p { font-size: 19px; opacity: .85; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 10px 26px; border-radius: 8px;
  text-decoration: none; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: .2s; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 14px 40px; font-size: 17px; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: 30px; margin-bottom: 44px; position: relative; }
.section-title::after {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--primary); border-radius: 2px; margin: 12px auto 0;
}
.center-link { text-align: center; margin-top: 36px; }

/* ===== Feature cards ===== */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20,23,31,.1); }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card-icon { font-size: 34px; margin-bottom: 12px; }

/* ===== Car cards ===== */
.car-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.car-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; transition: .25s;
}
.car-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,23,31,.12); }
.car-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #eef0f3; }
.car-body { padding: 20px; }
.car-body h3 { font-size: 18px; margin-bottom: 6px; }
.car-price { color: var(--primary); font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.car-specs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.car-body .btn { width: 100%; }
.empty-tip { color: var(--muted); text-align: center; padding: 40px 0; grid-column: 1/-1; }

/* ===== Filter bar ===== */
.filter-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 14px; cursor: pointer; transition: .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Stats ===== */
.stats-row { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 28px; text-align: center; }
.stat strong { display: block; font-size: 40px; color: var(--primary); }
.stat span { color: var(--muted); }

/* ===== CTA ===== */
.cta { padding: 72px 0; background: var(--dark); color: #fff; text-align: center; }
.cta h2 { font-size: 30px; margin-bottom: 12px; }
.cta p { opacity: .8; margin-bottom: 28px; }

/* ===== Page banner ===== */
.page-banner { padding: 64px 0; text-align: center; color: #fff; background: var(--dark); }
.page-banner h1 { font-size: 34px; margin-bottom: 8px; }
.page-banner p { opacity: .75; }

/* ===== Prose ===== */
.prose h2 { font-size: 24px; margin: 40px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.timeline { list-style: none; }
.timeline li {
  padding: 10px 0 10px 20px; border-left: 3px solid var(--primary);
  margin-bottom: 6px; color: var(--muted);
}
.timeline strong { color: var(--primary); margin-right: 10px; }

/* ===== Contact ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.contact-info h2 { margin-bottom: 20px; }
.contact-info h3 { margin: 28px 0 8px; }
.contact-info p { color: var(--muted); margin-bottom: 10px; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: 0 8px 30px rgba(20,23,31,.06);
}
.contact-form h2 { margin-bottom: 22px; font-size: 22px; }
.form-row { margin-bottom: 18px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: block; font-size: 14px; color: var(--muted); }
.contact-form em { color: var(--primary); font-style: normal; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; margin-top: 6px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; transition: border-color .2s;
  background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--primary);
}
.contact-form button { width: 100%; border: none; }
.contact-form button[disabled] { opacity: .6; cursor: not-allowed; }
.form-tip { margin-top: 14px; font-size: 14px; text-align: center; }
.form-tip.ok { color: #0aa24a; }
.form-tip.err { color: var(--primary); }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.site-footer p { font-size: 14px; margin-bottom: 6px; }
.copyright {
  margin-top: 36px; padding: 18px 0; text-align: center; font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.45);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px;
  }
  .main-nav.open { display: flex; }
  .hero { padding: 72px 0 64px; }
  .hero h1 { font-size: 30px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
