/* =====================
   BASE
===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --verde: #2EAD4B;
  --verde-oscuro: #228a3a;
  --gris: #6B6B6B;
  --gris-claro: #f4f4f4;
  --gris-borde: #e0e0e0;
  --texto: #1a1a1a;
  --blanco: #ffffff;
  --radio: 12px;
  --sombra: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--gris-claro);
  color: var(--texto);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* =====================
   HEADER
===================== */
.header {
  background: var(--blanco);
  border-bottom: 3px solid var(--verde);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  height: 76px;
  object-fit: contain;
}

.header-contacto {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 50px;
  transition: background 0.2s;
}

.header-contacto:hover { background: var(--gris-claro); }

.avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--verde);
  flex-shrink: 0;
  background: #c8c8c8;
}

.header-contacto-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-contacto-label {
  font-size: 0.72rem;
  color: var(--gris);
  font-weight: 400;
}

.header-contacto-nombre {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--texto);
}

.header-flecha {
  font-size: 1.1rem;
  color: var(--verde);
  font-weight: 700;
}

.whatsapp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--verde);
  color: var(--blanco);
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.whatsapp-header:hover { background: var(--verde-oscuro); }

.whatsapp-header svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =====================
   HERO
===================== */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--blanco);
  text-align: center;
  padding: 48px 24px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero p {
  color: #aaa;
  font-size: 1rem;
}

.hero-ubicacion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--verde);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.hero-ubicacion:hover { opacity: 0.8; }

/* =====================
   FILTROS
===================== */
.filtros-section {
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  padding: 16px 24px;
  position: sticky;
  top: 83px;
  z-index: 90;
}

.filtros-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gris-claro);
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  padding: 10px 14px;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--gris);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
  outline: none;
  color: var(--texto);
}

.marcas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.marca-btn {
  padding: 6px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--gris-borde);
  background: var(--blanco);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--gris);
}

.marca-btn:hover {
  border-color: var(--verde);
  color: var(--verde);
}

.marca-btn.active {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--blanco);
}

/* =====================
   GRID CATÁLOGO
===================== */
.catalogo {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* =====================
   CARD VEHÍCULO
===================== */
.card {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-foto {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #f0f0f0;
}

.card-foto-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 2.5rem;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-marca {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--verde);
}

.card-nombre {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--texto);
  line-height: 1.3;
}

.card-año {
  font-size: 0.85rem;
  color: var(--gris);
  margin-bottom: 8px;
}

.card-precio {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.precio-usd {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--verde);
}

.precio-gs {
  font-size: 0.82rem;
  color: var(--gris);
}

.card-consig {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
  width: fit-content;
}

/* =====================
   SIN RESULTADOS
===================== */
.sin-resultados {
  text-align: center;
  color: var(--gris);
  padding: 48px 0;
  font-size: 1rem;
}

/* =====================
   SLIDER
===================== */
.slider-wrapper {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16/7;
}

.slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

.slide.active { opacity: 1; }

.slide-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.75) saturate(1.2);
  transform: scale(1.1);
}

.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.slider-btn:hover { background: rgba(0,0,0,0.7); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.dot.active { background: #fff; }

/* =====================
   DETALLE DE VEHÍCULO
===================== */
.detalle-page {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px 64px;
}

.volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gris);
  font-size: 0.9rem;
  margin-bottom: 24px;
  transition: color 0.15s;
}

.volver:hover { color: var(--verde); }

.detalle-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 32px;
  box-shadow: var(--sombra);
}

.detalle-galeria {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foto-grande {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}

.miniaturas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.miniatura {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.miniatura.active,
.miniatura:hover {
  border-color: var(--verde);
}

.detalle-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.detalle-info h1 {
  grid-column: 1 / -1;
}

.detalle-precio {
  grid-column: 1 / -1;
}

.detalle-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.detalle-precio {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detalle-precio .precio-usd {
  font-size: 1.6rem;
}

.detalle-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--gris-claro);
  border-radius: 8px;
  padding: 16px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gris);
}

.spec-valor {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--texto);
}

.detalle-acciones {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.btn-whatsapp-detalle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--verde);
  color: var(--blanco);
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-whatsapp-detalle:hover { background: var(--verde-oscuro); }

.btn-galeria {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--gris-borde);
  color: var(--gris);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-galeria:hover {
  border-color: var(--verde);
  color: var(--verde);
}

.detalle-nota {
  font-size: 0.85rem;
  color: var(--gris);
  font-style: italic;
}

/* =====================
   WHATSAPP FLOTANTE
===================== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #25D366;
  color: var(--blanco);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

/* =====================
   FOOTER
===================== */
.footer {
  background: #1a1a1a;
  color: #aaa;
  text-align: center;
  padding: 28px 24px;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer a {
  color: var(--verde);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .whatsapp-header span,
  .whatsapp-header { font-size: 0;  padding: 10px; }
  .whatsapp-header svg { width: 22px; height: 22px; }

  .hero h1 { font-size: 1.5rem; }

  .filtros-section { top: 76px; }

  .detalle-container {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 24px;
  }

  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 10px 16px; }
  .logo { height: 72px; }
  .catalogo { padding: 0 12px 48px; }
  .marcas { gap: 6px; }
  .marca-btn { font-size: 0.78rem; padding: 5px 12px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card-foto, .card-foto-placeholder { aspect-ratio: 3/2; }
  .slider-wrapper { aspect-ratio: 4/3; }
  .detalle-container { padding: 16px; }
  .detalle-info { grid-template-columns: 1fr; }
}
