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

:root {
  --primary: #2563eb;
  --secondary: #10b981;
  --dark: #1f2937;
  --light: #f9fafb;
  --border: #e5e7eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
}

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

/* Header */
header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  transition: color 0.3s;
}

.whatsapp-btn {
  background: #25d366;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

#searchInput, #sortSelect {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

#searchInput {
  flex: 1;
  min-width: 250px;
}

/* Cars Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.car-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.car-card a {
  text-decoration: none;
  color: inherit;
}

.car-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
}

.car-info {
  padding: 1.5rem;
}

.car-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.mileage, .condition {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Car Detail Page */
.car-detail {
  padding: 2rem 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary);
  text-decoration: none;
}

.car-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.price-tag {
  background: var(--secondary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 1.8rem;
  font-weight: bold;
}

/* Carousel */
.carousel {
  margin-bottom: 3rem;
}

.carousel-main {
  position: relative;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.carousel-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-thumbs {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}

.carousel-thumbs img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.carousel-thumbs img.active,
.carousel-thumbs img:hover {
  opacity: 1;
  border: 2px solid var(--primary);
}

/* Details Grid */
.car-details-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.specs, .description {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.spec-item i {
  color: var(--primary);
  font-size: 1.2rem;
}

.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features-list i {
  color: var(--secondary);
}

/* Contact Section */
.contact-section {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

.contact-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}

.btn-call {
  background: var(--primary);
  color: white;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .car-header { flex-direction: column; align-items: flex-start; }
  .car-details-grid { grid-template-columns: 1fr; }
  .carousel-main { height: 300px; }
  .nav-links { gap: 1rem; font-size: 0.9rem; }
}
