*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
:root {
  --bg: #1a1a1a;
  --bg2: #222;
  --gold: #d39f27;
  --gold-dark: #b8891e;
  --text: #e0e0e0;
  --text-light: #aaa;
  --white: #fff;
  --border: #333;
}
[data-theme="light"] {
  --bg: #f0f0f0;
  --bg2: #fff;
  --gold: #b8891e;
  --gold-dark: #9a7416;
  --text: #222;
  --text-light: #666;
  --white: #111;
  --border: #ddd;
}
html { scroll-behavior: smooth }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; transition: color .2s }
a:hover { color: var(--white) }
img { max-width: 100%; height: auto; display: block }

.skip-link {
  position: absolute; top: -999px; left: 0; z-index: 200;
  background: var(--gold); color: var(--bg); padding: 10px 16px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0 }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px }

/* Header */
header {
  background: var(--bg2);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 20px;
}
.logo { flex-shrink: 0 }
.logo img { height: 48px; width: auto }
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1.5rem;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--gold); color: var(--bg) }
.theme-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: color .2s;
}
.theme-toggle:hover { color: var(--white) }
.theme-toggle svg { width: 20px; height: 20px; display: block }
nav .theme-toggle {
  padding: 6px 14px;
}
nav .theme-toggle:hover { background: var(--gold); color: var(--bg) }
.theme-toggle .moon { display: none }
[data-theme="light"] .theme-toggle .moon { display: block }
[data-theme="light"] .theme-toggle .sun { display: none }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap }
nav a {
  color: var(--text);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: all .2s;
}
nav a:hover, nav a.active { background: var(--gold); color: var(--bg) }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero {
  min-height: 300px;
}

/* Sections */
section { padding: 50px 0 }
.section-title {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

/* Section header with filter */
.section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; padding-bottom: 10px; border-bottom: 2px solid var(--gold) }
.section-header .section-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0 }

/* Filter bar */
.filter-bar { flex: 1; max-width: 500px }
.filter-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .2s;
}
.filter-input:focus { outline: none; border-color: var(--gold) }
.filter-input::placeholder { color: var(--text-light) }

/* Car grid */
.car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.car-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.car-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(211,159,39,.15) }
.car-card img { width: 100%; height: 180px; object-fit: cover; border-bottom: 2px solid var(--gold) }
.car-card-body { padding: 16px }
.car-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--white) }
.car-card p { font-size: .85rem; color: var(--text-light); margin-bottom: 4px }
.car-card .price { color: var(--gold); font-weight: 700; font-size: 1.65rem }
.price-na { font-size: 1.2rem; font-weight: 700; color: var(--gold) }

/* Finn iframe */
.finn-wrapper {
  width: min(1100px, calc(100vw - 40px));
  margin: 30px auto;
}
.finn-wrapper iframe {
  width: 100%;
  min-width: 100%;
  height: 900px;
  border: none;
  display: block;
  box-sizing: border-box;
}

/* Content pages */
.page-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  margin: 30px 0;
}
.page-content h2 { color: var(--gold); font-size: 1.5rem; margin-bottom: 20px }
.page-content p { margin-bottom: 16px; font-size: .95rem; line-height: 1.7 }
.page-content ul { margin-bottom: 16px; padding-left: 20px }
.page-content li { margin-bottom: 8px; font-size: .95rem }

/* Contact bar */
/* Contact info */
.contact-info { margin-bottom: 30px }
.contact-info p { margin-bottom: 8px; font-size: 1rem }
.contact-info strong { color: var(--gold) }

/* Forms */
.form-group { margin-bottom: 20px }
.form-group label { display: block; margin-bottom: 6px; color: var(--gold); font-weight: 600; font-size: .9rem }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold) }
.form-group textarea { resize: vertical; min-height: 120px }
.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn:hover { background: var(--gold-dark); color: var(--bg) }

/* Sidebar layout */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}
.sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  align-self: start;
}
.sidebar h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border) }
.sidebar-item { margin-bottom: 16px }
.sidebar-item img { width: 100%; border-radius: 4px; border: 2px solid var(--gold); margin-bottom: 8px }
.sidebar-item p { font-size: .8rem; color: var(--text-light) }
.sidebar a { color: var(--text) }
.sidebar a:hover { color: var(--gold) }

/* Footer */
footer {
  margin-top: auto;
  background: var(--bg2);
  border-top: 3px solid var(--gold);
  padding: 30px 20px;
  text-align: center;
}
footer p { font-size: .85rem; color: var(--text-light); margin-bottom: 4px }
footer strong { color: var(--gold) }

/* Page header */
.page-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
}
.page-header h1 { color: var(--gold); font-size: 2rem }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.service-card .icon { font-size: 2.5rem; margin-bottom: 12px }
.service-card h3 { color: var(--gold); margin-bottom: 8px }
.service-card p { font-size: .85rem; color: var(--text-light) }

/* Car detail page */
.back-link { display: inline-block; margin: 20px 0; color: var(--text-light); font-size: .9rem }
.back-link:hover { color: var(--gold) }
.car-detail-heading { color: var(--gold); font-size: 1.4rem; margin-bottom: 20px }
.car-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px }
.car-detail-gallery { position: relative }
.main-image { position: relative; background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border) }
.main-image img { width: 100%; height: 400px; object-fit: contain; display: block }
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.6); color: #fff; border: none;
  font-size: 1.5rem; padding: 10px 14px; cursor: pointer;
  border-radius: 4px; transition: background .2s;
}
.gallery-prev { left: 8px }
.gallery-next { right: 8px }
.gallery-prev:hover, .gallery-next:hover { background: rgba(0,0,0,.9) }
.thumbnails { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap }
.thumb { width: 70px; height: 70px; border: 2px solid var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; transition: border-color .2s; flex-shrink: 0 }
.thumb:hover, .thumb.active { border-color: var(--gold) }
.thumb img { width: 100%; height: 100%; object-fit: cover }
.car-detail-info { display: flex; flex-direction: column; gap: 20px }
.spec-table { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--border) }
.spec-table tr { border-bottom: 1px solid var(--border) }
.spec-table tr:last-child { border-bottom: none }
.spec-label { padding: 10px 16px; font-size: .85rem; color: var(--text-light); width: 40%; background: var(--bg) }
.spec-value { padding: 10px 16px; font-size: .9rem; color: var(--white); font-weight: 600 }
.car-contact-cta { background: var(--bg2); border: 1px solid var(--gold); border-radius: 8px; padding: 20px; text-align: center }
.car-contact-cta p { font-size: 1.1rem; color: var(--text) }
.car-contact-cta strong { color: var(--gold); font-size: 1.3rem }
.car-description { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-bottom: 20px }
.car-description h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 12px }
.car-description p { font-size: .95rem; line-height: 1.7; white-space: pre-line }
.car-equipment { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-bottom: 30px }
.car-equipment h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 12px }
.equipment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 20px }
.equipment-grid ul { list-style: none; padding: 0 }
.equipment-grid li { font-size: .85rem; color: var(--text); padding: 3px 0; position: relative; padding-left: 14px }
.equipment-grid li::before { content: "*"; color: var(--gold); position: absolute; left: 0 }

@media (max-width: 768px) {
  .car-detail-layout { grid-template-columns: 1fr }
  .main-image img { height: 280px }
  .equipment-grid { grid-template-columns: 1fr 1fr }
}

@media (max-width: 480px) {
  .equipment-grid { grid-template-columns: 1fr }
  .thumb { width: 56px; height: 56px }
}

@media (max-width: 768px) {
  .nav-toggle { display: block }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg2);
    flex-direction: column;
    padding: 10px;
    border-bottom: 3px solid var(--gold);
    gap: 2px;
  }
  nav.open { display: flex }
  nav a, nav .theme-toggle { width: 100%; text-align: center }
  nav .theme-toggle { justify-content: center; padding: 10px 14px; border: none; border-radius: 4px; font-size: .875rem; gap: 6px }
  nav .theme-toggle:hover { background: var(--gold); color: var(--bg) }
  nav .theme-toggle svg { width: 18px; height: 18px }
  .content-with-sidebar { grid-template-columns: 1fr }
  .page-content { padding: 24px }
  .car-grid { grid-template-columns: 1fr }
  .section-header .section-title { width: 100% }
  .filter-bar { max-width: 100% }
  .hero { min-height: 300px }
}
