:root {
  --navy: #0b1f3a;
  --charcoal: #23272e;
  --accent: #0081f2;
  --accent-dark: #0068c4;
  --bg: #f5f7fa;
  --border: #d9dee6;
  --text: #1c2430;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--navy); color: #fff; padding: 0.6rem 1.2rem; }
.site-header .brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.site-header .brand img { height: 42px; width: 42px; object-fit: contain; background: #fff; border-radius: 8px; }
.site-header nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-header nav a { color: #dbe7f5; }

.site-footer { background: var(--charcoal); color: #cfd6df; text-align: center; padding: 1.6rem 1rem; margin-top: 3rem; }
.site-footer a { color: #9ec9f5; }

.flash { max-width: 1100px; margin: 1rem auto 0; padding: 0.8rem 1rem; border-radius: 8px; background: #e7f2fe; border: 1px solid var(--accent); }
.flash.error { background: #fdecea; border-color: #d9534f; }
.flash.info { background: #e7f2fe; }

.section { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1rem; }
.section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: none; }
.section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section.narrow { max-width: 560px; }
.section.narrow-wide { max-width: 760px; }
.center { text-align: center; }
.small { font-size: 0.85rem; color: #5a6675; }

.hero { background-size: cover; background-position: center; color: #fff; }
.hero-inner { background: rgba(6, 20, 38, 0.72); padding: 3.2rem 1rem 3.6rem; text-align: center; }
.hero-logo { height: 96px; width: 96px; object-fit: contain; background: #fff; border-radius: 16px; }
.hero h1 { font-size: 2.3rem; margin: 0.8rem 0 0.3rem; }
.hero-search { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-search input, .hero-search select { padding: 0.7rem; border-radius: 8px; border: 1px solid var(--border); min-width: 170px; font-size: 1rem; }
.hero-search button, .btn { background: var(--accent); color: #fff; border: 0; padding: 0.7rem 1.3rem; border-radius: 8px; font-size: 1rem; cursor: pointer; display: inline-block; }
.hero-search button:hover, .btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin: 1rem 0; }
.car-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.car-photo { width: 100%; height: 170px; object-fit: cover; display: block; background: #e8edf3; }
.car-body { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.3rem; }
.car-body h3 { margin: 0; font-size: 1.05rem; }
.price { color: var(--navy); font-weight: 800; font-size: 1.15rem; margin: 0; }
.price.big { font-size: 1.7rem; }
.meta, .dealer-line { margin: 0; color: #5a6675; font-size: 0.9rem; }
.fav-form { margin-top: auto; }
.fav-btn { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.filters input, .filters select { padding: 0.55rem; border: 1px solid var(--border); border-radius: 8px; min-width: 130px; }
.filters button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 0.55rem 1.1rem; cursor: pointer; }

.detail { display: grid; grid-template-columns: 1fr 340px; gap: 1.6rem; align-items: start; }
.detail-photo { width: 100%; border-radius: 12px; object-fit: cover; max-height: 440px; background: #e8edf3; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.4rem; margin: 1rem 0; }
.spec dt { font-size: 0.8rem; text-transform: uppercase; color: #5a6675; }
.spec dd { margin: 0.1rem 0 0; font-weight: 600; }
.dealer-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; position: sticky; top: 1rem; }

.form { display: flex; flex-direction: column; gap: 0.8rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; margin: 1rem 0; }
.form label, .lead-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; font-weight: 600; }
.form input, .form select, .form textarea, .lead-form input, .lead-form textarea {
  padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-weight: 400;
}
.lead-form { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.8rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; }
.form-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.92rem; font-weight: 600; }
.form-grid input, .form-grid select { padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-weight: 400; }

.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.4rem; display: flex; flex-direction: column; }
.stat strong { font-size: 1.7rem; color: var(--navy); }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0.6rem 0 1.6rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 0.93rem; }
.table th { background: var(--navy); color: #fff; }
.inline { display: inline; }
.inline button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.93rem; padding: 0; }

.pricing-card { background: #fff; border: 2px solid var(--accent); border-radius: 14px; padding: 1.6rem; margin: 1.4rem 0; }
.pricing-card ul { line-height: 1.9; }

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; }
  .dealer-card { position: static; }
  .hero h1 { font-size: 1.7rem; }
  .specs { grid-template-columns: 1fr; }
}
