:root {
  --blue: #0f2c49;
  --blue2: #1f5a8c;
  --dark: #111;
  --gray: #f4f6f8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

.top-bar {
  background: var(--dark);
  color: #fff;
  padding: 8px 40px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.lang a {
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}

.header {
  position: sticky;
  top: 0;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  z-index: 100;
}

/* LOGO CON IMAGEN */
.logo img {
  height: 60px; /* Ajusta según tu logo */
  width: auto;
  display: block;
}

/* NAV */
nav a {
  margin-left: 25px;
  text-decoration: none;
  font-weight: 600;
  color: #333;
}

/* HERO */
.hero {
  height: 85vh;
  background:
    linear-gradient(rgba(15,44,73,.65), rgba(15,44,73,.0)),
    url("../images/hero-ford.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  padding-left: 80px;
  color: white;
}

.hero-text h1 {
  font-size: 52px;
  margin-bottom: 15px;
}

.hero-text p {
  font-size: 20px;
  margin-bottom: 25px;
}

.btn {
  background: var(--blue2);
  padding: 14px 30px;
  display: inline-block;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

/* INVENTARIO */
.inventory {
  padding: 80px 40px;
  background: var(--gray);
}

.inventory h2 {
  font-size: 32px;
  margin-bottom: 40px;
}

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

.car {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;        /* CLAVE */
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Marco fijo para imagen */
.car img {
  width: 100%;
  height: 220px;           /* 👈 ALTURA ESTÁNDAR */
  object-fit: cover;       /* 👈 recorta sin deformar */
  object-position: center;
  display: block;
  transition: opacity 0.4s ease-in-out;
}

.car h3 {
  margin-top: 15px;
}

.car span {
  display: block;
  font-weight: bold;
  margin: 10px 0;
}

.btn-outline {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid var(--blue2);
  color: var(--blue2);
  text-decoration: none;
  border-radius: 4px;
}

/* FOOTER */
footer {
  background: var(--dark);
  color: white;
  padding: 30px;
  text-align: center;
}

footer i {
  font-size: 22px;
  margin-left: 10px;
}


/* Contenido del auto */
.car .car-info {
  padding: 20px;
  text-align: center;   /* 👈 CENTRA TEXTO */
}

/* Título (Marca / Modelo) */
.car h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

/* Año */
.car span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
}




/* RESPONSIVE */
@media (max-width: 768px) {
  .logo img {
    height: 45px;
  }

  .hero {
    height: 70vh;
    background-position: center right;
    padding-left: 20px;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  nav a {
    margin-left: 15px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* CONTACTO */
.contact {
  padding: 80px 40px;
  background: var(--gray);
}

.contact h2 {
  font-size: 32px;
  margin-bottom: 40px;
  text-align: center;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact-info h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.contact-info p {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.5;
}

.contact-map iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: 12px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-map iframe {
    height: 280px;
  }
}

/* MESSENGER FLOAT */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #0084ff; /* Color azul de Messenger */
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 25px rgba(0,0,0,.35);
}

/* MODAL TERMINOS */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  max-width: 700px;
  width: 90%;
  padding: 35px;
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0,0,0,.3);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-bottom: 20px;
  color: var(--blue);
}

.modal-content ol {
  padding-left: 20px;
  line-height: 1.6;
}

.modal-content ul {
  margin-top: 8px;
  padding-left: 20px;
}

.close {
  position: absolute;
  top: 15px;
  right: 18px;
  font-size: 26px;
  cursor: pointer;
  color: #333;
}


/* ABOUT US */
.about {
  padding: 90px 40px;
  background: #fff;
}

.about-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 15px 30px rgba(0,0,0,.15);
}

.about-text h2 {
  font-size: 36px;
  color: var(--blue);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: #333;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-text h2 {
    margin-top: 30px;
  }
}

/* LANGUAGE FLAGS */
.lang {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lang-btn {
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity .2s ease, transform .2s ease;
}

.lang-btn img {
  width: 28px;
  height: auto;
  display: block;
}

.lang-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.lang-btn.active {
  opacity: 1;
  box-shadow: 0 0 0 2px #fff;
}

/* =========================
   VEHICLE MODAL (FIX FINAL)
   ========================= */

.vehicle-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.vehicle-modal.active {
  display: flex;
}

.vehicle-content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 20px;
}

/* BOTÓN CERRAR (SIEMPRE VISIBLE) */
.vehicle-content .close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 20; /* 🔥 más alto que la imagen */
  color: #111;
  background: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* GRID */
.vehicle-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

/* CONTENEDOR IMÁGENES */
.vehicle-images {
  margin-top: 35px; /* 👈 espacio para la X */
  position: relative;
}

.vehicle-images img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 10px;
}

/* BOTONES DEL CARRUSEL */
.vehicle-images .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 28px;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 5;
}

.vehicle-images .prev { left: 10px; }
.vehicle-images .next { right: 10px; }

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
  .vehicle-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none; /* Elimina las áreas de grid en móvil */
  }

  .vehicle-images,
  .vehicle-info,
  .vehicle-features-wrapper {
    grid-area: auto; /* Restablece a posición automática */
  }

  .vehicle-images {
    margin-top: 45px;
  }

  .vehicle-images img {
    height: 260px;
  }

  .vehicle-content .close {
    top: 8px;
    right: 10px;
    font-size: 26px;
  }

  .vehicle-features {
    columns: 1; /* Fuerza una columna en móvil */
  }
}


/* =========================
   VEHICLE DETAILS – MEJOR ESTILO
   ========================= */

.vehicle-info h2 {
  font-size: 28px;
  margin-bottom: 25px;
  color: var(--blue);
  line-height: 1.2;
}

.vehicle-info ul {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

/* Cada fila */
.vehicle-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;              /* 👈 más aire */
  border-bottom: 1px solid #eee;
  font-size: 16px;
}

/* Etiqueta */
.vehicle-info li strong {
  color: #555;
  font-weight: 600;
  min-width: 140px;
}

/* Valor */
.vehicle-info li span {
  color: #111;
  font-weight: 600;
  text-align: right;
}

/* Botón Messenger */
#vehicleMessenger {
  display: inline-block;
  margin-top: 10px;
  padding: 14px 22px;
  font-size: 16px;
  background: #0084ff; /* Azul de Messenger */
  color: white;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

#vehicleMessenger:hover {
  background: #0073e6;
}

#vehicleMessenger i {
  margin-right: 8px;
}

/* =========================
   MOBILE TWEAKS
   ========================= */

@media (max-width: 768px) {

  .vehicle-info h2 {
    font-size: 24px;
    text-align: center;
  }

  .vehicle-info li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;                  /* 👈 separación vertical */
    font-size: 15px;
  }

  .vehicle-info li strong {
    min-width: auto;
  }

  .vehicle-info li span {
    text-align: left;
  }

  #vehicleMessenger {
    width: 100%;
    text-align: center;
  }
}

/* =========================
   VEHICLE PRICE
   ========================= */

.vehicle-price {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  color: #1f5a8c; /* azul del sitio */
}

/* Mobile */
@media (max-width: 768px) {
  .vehicle-price {
    text-align: center;
    font-size: 24px;
  }
}

.vehicle-features {
  margin-top: 8px;
  padding-left: 18px;
  list-style: disc;
}

.vehicle-features li {
  margin-bottom: 4px;
  font-size: 15px;
  color: #444;
}

.features-title {
  margin: 30px 0 12px;
  font-size: 20px;
  color: var(--blue);
}

.vehicle-features {
  list-style: disc;
  padding-left: 20px;
  columns: 2;                 /* 👈 2 columnas como en la imagen */
  column-gap: 40px;
}

.vehicle-features li {
  margin-bottom: 6px;
  font-size: 15px;
  color: #444;
}


/* ===== VEHICLE MODAL LAYOUT ===== */
.vehicle-grid {
  display: grid;
  gap: 30px;
}

/* MOBILE FIRST: una sola columna */
.vehicle-grid {
  grid-template-columns: 1fr;
}

/* Desktop: dos columnas para imágenes e info, features abajo */
@media (min-width: 900px) {
  .vehicle-grid {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
      "images info"
      "features features";
  }

  .vehicle-images {
    grid-area: images;
  }

  .vehicle-info {
    grid-area: info;
  }

  .vehicle-features-wrapper {
    grid-area: features;
    margin-top: 20px;
  }
}

/* Para las features en móvil: una sola columna */
.vehicle-features {
  list-style: disc;
  padding-left: 20px;
  columns: 1; /* En móvil: 1 columna */
  column-gap: 40px;
}

.vehicle-features li {
  margin-bottom: 6px;
  font-size: 15px;
  color: #444;
  break-inside: avoid; /* Evita que los items se partan entre columnas */
}

/* Desktop: 2 columnas para las features */
@media (min-width: 900px) {
  .vehicle-features {
    columns: 2; /* En desktop: 2 columnas */
  }
}

.features-title {
  margin: 30px 0 12px;
  font-size: 20px;
  color: var(--blue);
}

/* Ajuste específico para móvil */
@media (max-width: 768px) {
  .vehicle-features-wrapper {
    margin-top: 20px;
  }
  
  .features-title {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
  }
}