:root {
  --brand: #C76322;
  --brand-dark: #a14e18;
  --bg: #fdfaf6;
  --text: #2b2118;
  --muted: #6b5a4a;
  --card: #ffffff;
  --border: #e8ddd0;
  --shadow: 0 4px 20px rgba(67, 45, 20, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.brand img { width: 48px; height: 48px; }
.nav { display: flex; gap: 1.5rem; }
.nav a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(30,15,5,0.55), rgba(30,15,5,0.55)), url('../images/hero-dealership.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
}
.hero-content { padding: 5rem 1rem; width: 100%; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; margin-bottom: 2rem; opacity: 0.95; }

/* Sections */
section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.section-title p { color: var(--muted); }

/* Vehicle grid */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.vehicle-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.vehicle-card:hover { transform: translateY(-4px); }
.vehicle-image { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.vehicle-image img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-plate {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid #000;
  border-radius: 4px;
  letter-spacing: 1px;
}
.vehicle-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.vehicle-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.vehicle-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.vehicle-price { font-size: 1.4rem; font-weight: 700; color: var(--brand); margin-bottom: 1rem; }
.vehicle-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.vehicle-meta span { background: #f5ede2; padding: 0.25rem 0.5rem; border-radius: 4px; }
.vehicle-actions { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2rem;
}
.filter-bar button {
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}
.filter-bar button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Testimonials */
.testimonial-section { background: #faf3ea; }
.testimonial-stars { color: var(--brand); font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.testimonial-meta { text-align: center; color: var(--muted); margin-bottom: 2rem; }
.testimonial-track { position: relative; max-width: 700px; margin: 0 auto; }
.testimonial-card { background: #fff; padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); text-align: center; }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; color: var(--text); }
.testimonial-card .author { font-weight: 600; }
.carousel-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
.carousel-controls button { background: var(--brand); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }

/* Footer */
.site-footer {
  background: #2b2118;
  color: #d8cdbe;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { color: #fff; margin-bottom: 0.75rem; }
.footer-grid a { color: #d8cdbe; display: block; padding: 0.25rem 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid #4a3e30; padding-top: 1.5rem; text-align: center; font-size: 0.9rem; }

/* Forms */
.form-grid { display: grid; gap: 1rem; }
.form-grid label { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.form-grid input:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--brand);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 10px; max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 2rem; position: relative;
}
.modal h3 { margin-bottom: 0.5rem; }
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted);
}
.vehicle-summary {
  background: #faf3ea; padding: 0.75rem 1rem; border-radius: 6px; margin: 1rem 0; font-size: 0.9rem;
}

/* About / Contact pages */
.page-header { background: #faf3ea; padding: 3rem 0; text-align: center; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info p { margin-bottom: 0.75rem; }

/* Vehicle detail */
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
.detail-grid .features { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.detail-grid .features li::before { content: "✓ "; color: var(--brand); font-weight: 700; }
.spec-list { list-style: none; }
.spec-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.spec-list li:last-child { border-bottom: none; }
.spec-list .label { color: var(--muted); }
.spec-list .value { font-weight: 600; }
.main-photo{
  margin-bottom:15px;
}

.main-photo{
    background:#fff;
    border-radius:12px;
    overflow:hidden;
}

.main-photo img{
    width:100%;
    height:600px;
    object-fit:contain;
    background:#fff;
}

.thumb{
  width:100%;
  height:90px;
  object-fit:cover;
  cursor:pointer;
  border-radius:8px;
  border:2px solid transparent;
  transition:.2s;
}

.thumb:hover{
  border-color:var(--brand);
  transform:translateY(-2px);
}

.thumb.active{
  border-color: var(--brand);
}

.gallery{
    display:flex;
    gap:10px;
    overflow-x:auto;
    scroll-behavior:smooth;
    padding:10px 0;
}

.gallery::-webkit-scrollbar{
    height:6px;
}

.gallery::-webkit-scrollbar-thumb{
    background:#ccc;
    border-radius:10px;
}

.gallery-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);

    width:48px;
    height:48px;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.9);
    box-shadow:var(--shadow);

    cursor:pointer;
    z-index:5;
}

.left{
    left:15px;
}

.right{
    right:15px;
}

.main-photo-wrapper{
    position:relative;
}

.vehicle-content{
    margin-top:40px;
}

.vehicle-content h2,
.vehicle-content h3{
    margin-bottom:15px;
}

.vehicle-content p{
    margin-bottom:30px;
}

.features-full{
    list-style:none;
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(220px,1fr));
    gap:12px;
}

.features-full li{
    background:#fff;
    border:1px solid var(--border);
    border-radius:8px;
    padding:12px;
}

.features-full li::before{
    content:"✓ ";
    color:var(--brand);
    font-weight:700;
}

@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .form-row, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .main-photo img{height:280px;}
  .gallery{grid-template-columns:repeat(4,1fr); gap:6px;}
  .thumb{height:65px;}
}

.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #2b2118;
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}