* {
  box-sizing: border-box;
}

:root {
  --brand-blue: #07327d;
  --brand-blue-dark: #041f50;
  --brand-blue-light: #0f4d98;
  --brand-yellow: #ffc700;
  --brand-yellow-dark: #e6b400;
  --brand-text: #ffffff;
  --brand-muted: #bdd1ff;
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-text);
  background: var(--brand-blue-dark);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: var(--brand-blue);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.main-nav a,
.button-primary {
  color: #fff;
}

.brand span {
  color: #fff;
}

.header-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  font-weight: 500;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--brand-yellow);
  color: var(--brand-blue-dark);
}

.button-primary:hover {
  background: var(--brand-yellow-dark);
}

.button-secondary {
  background: rgba(15, 77, 152, .45);
  color: #fff;
  border-color: rgba(255,255,255,.24);
}

.page-hero .button-secondary,
.hero .button-secondary {
  background: rgba(255, 199, 0, .95);
  color: var(--brand-blue-dark);
  border-color: rgba(255,255,255,.3);
}

.hero,
.page-hero,
.section,
.site-footer {
  padding: 3rem 0;
}

.hero {
  background: linear-gradient(140deg, var(--brand-blue) 0%, #0a3d95 42%, var(--brand-blue-dark) 100%);
  color: #fff;
}

.hero-grid,
.content-grid,
.service-grid,
.card-grid,
.contact-panel {
  display: grid;
  gap: 1.75rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.7rem);
  margin: 0.5rem 0 1rem;
  max-width: 12ch;
  color: #fff;
}

.hero p {
  max-width: 58ch;
  color: rgba(255,255,255,.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.hero-features li {
  background: rgba(15, 77, 152, .35);
  color: #fff;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
}

.hero-image img {
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(8, 59, 146, .25);
}

.page-hero {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  color: #fff;
}

.page-hero h1,
.page-hero p,
.page-hero .eyebrow,
.page-hero .button-primary,
.page-hero .button-secondary {
  color: #fff;
}

.page-hero-stock {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.page-hero-content {
  padding: 2rem 0;
}

.page-hero h1 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.25rem, 4vw, 3rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-yellow);
}

.section {
  background: var(--brand-blue);
}

.section-alt {
  background: var(--brand-blue-dark);
}

.section-header {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  color: #fff;
}

.section-header p {
  margin: 0;
  color: rgba(255,255,255,.8);
}

.feature-list,
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.feature-list li,
.contact-list li {
  padding-left: 1rem;
  position: relative;
  color: #fff;
}

.feature-list li::before,
.contact-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand-yellow);
}

.about-cards,
.service-grid {
  display: grid;
  gap: 1.25rem;
}

.about-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.service-card,
.car-card,
.contact-box {
  background: rgba(15, 77, 152, .35);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  padding: 1.5rem;
}

.info-card h3,
.service-card h3 {
  margin-top: 0;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-panel {
  grid-template-columns: 1.2fr .8fr;
  align-items: stretch;
}

.contact-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-box h3 {
  margin: 0;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.car-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.car-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
}

.car-card-content {
  display: grid;
  gap: 0.85rem;
}

.car-card-title {
  margin: 0;
  font-size: 1.15rem;
}

.car-card-price {
  margin: 0;
  color: var(--brand-yellow);
  font-weight: 700;
}

.car-details {
  color: rgba(255,255,255,.85);
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.car-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 0.85rem;
}

.car-card-actions {
  margin-top: auto;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-group {
  display: grid;
  gap: 0.6rem;
}

.filter-group label {
  font-weight: 600;
}

.filter-group input,
.filter-group select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(15, 77, 152, .45);
  color: #fff;
  outline: none;
}

.filter-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.filter-group select option {
  color: #fff;
  background: var(--brand-blue-dark);
}

.filter-group select option:hover,
.filter-group select option:focus {
  background: var(--brand-blue);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(15, 77, 152, .3);
  color: #fff;
}

.hidden {
  display: none;
}

.car-detail-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.car-slideshow {
  display: grid;
  gap: 1rem;
}

.slideshow-main {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 360px;
  background: rgba(255,255,255,.08);
}

.slideshow-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--brand-blue-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}

.slideshow-prev {
  left: 1rem;
}

.slideshow-next {
  right: 1rem;
}

.slideshow-counter {
  text-align: right;
  color: rgba(255,255,255,.9);
  font-weight: 600;
}

.slideshow-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.thumb-button {
  width: 84px;
  height: 84px;
  border: 2px solid transparent;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
}

.thumb-button.active {
  border-color: var(--brand-yellow);
}

.thumb-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.28) 100%);
  border-radius: 16px;
}

.thumb-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.car-info {
  display: grid;
  gap: 1rem;
}

.car-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.car-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.key-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.key-info-card {
  background: rgba(15, 77, 152, .35);
  border-radius: 20px;
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.4rem;
}

.key-info-card span {
  color: rgba(255,255,255,.75);
  font-size: 0.95rem;
}

.key-info-card strong {
  color: #fff;
  font-size: 1.05rem;
}

.car-detail-section {
  display: grid;
  gap: 0.85rem;
}

.car-detail-section h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.car-detail-section p {
  margin: 0;
  color: rgba(255,255,255,.85);
}

.car-detail-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.car-detail-price {
  color: var(--brand-yellow);
  font-weight: 700;
  font-size: 1.6rem;
}

.spec-list,
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(15, 77, 152, .25);
}

.spec-list li strong {
  color: #fff;
}

.car-detail-note {
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(15, 77, 152, .3);
  color: #fff;
}

.site-footer {
  background: var(--brand-blue-dark);
  color: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.footer-inner p {
  margin: 0;
  font-size: 0.95rem;
}

.footer-info {
  display: grid;
  gap: 0.75rem;
  min-width: min(360px, 100%);
}

.footer-contact,
.footer-hours {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-contact li,
.footer-hours li {
  padding-left: 1rem;
  position: relative;
}

.footer-contact li::before,
.footer-hours li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand-yellow);
}

.footer-note {
  min-width: min(300px, 100%);
}

.footer-note p {
  margin: 0.35rem 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .content-grid,
  .service-grid,
  .about-cards,
  .card-grid,
  .car-detail-grid,
  .contact-panel,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-image img,
  .car-gallery img {
    height: auto;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav {
    justify-content: center;
  }

  .site-header .button-primary {
    background: transparent;
    color: #fff;
    padding: 0;
    border: none;
    font-weight: 500;
    font-size: 1rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.25rem;
  }

  .car-card img {
    height: 200px;
  }
}
