/* ---------- Tipografía y tokens de marca (ver SISTEMA-DE-DISENO.md del repo principal) ---------- */

@font-face {
  font-family: "ToyotaType";
  src: url("fonts/ToyotaType-Book.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ToyotaType";
  src: url("fonts/ToyotaType-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "ToyotaType";
  src: url("fonts/ToyotaType-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --background: #FFFFFF;
  --foreground: #1A1A1A;
  --toyota-red: #EB0A1E;
  --toyota-red-dark: #C5091A;
  --toyota-gray: #F5F5F5;
  --borde: #E8E8E8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "ToyotaType", Arial, Helvetica, sans-serif;
  color: var(--foreground);
  background: var(--background);
}

h1, h2, p, select, input, button { font-family: inherit; }

/* ---------- Encabezado ---------- */

.topbar {
  background: var(--foreground);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar__logo { height: 38px; }

/* ---------- Carrusel ---------- */

.slider {
  position: relative;
  width: 100%;
  height: clamp(360px, 60vw, 640px);
  overflow: hidden;
  background: var(--toyota-gray);
}

@media (max-width: 880px) {
  .slider {
    /* Coincide con la proporción real de las imágenes "mobile" (1600x1200)
       para que no se recorten los lados con object-fit: cover. */
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

.slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.slide picture,
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26,26,26,0.5);
  color: #FFFFFF;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.slider__arrow:hover { background: rgba(26,26,26,0.8); }
.slider__arrow--prev { left: 16px; }
.slider__arrow--next { right: 16px; }

.slider__dots {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}
.dot.activo { background: #FFFFFF; }

/* ---------- Formulario ---------- */

.formulario {
  padding: 48px 24px 64px;
  background: var(--background);
}

.formulario__contenedor {
  max-width: 560px;
  margin: 0 auto;
}

.formulario__titulo {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 8px;
  text-align: center;
}

.formulario__subtitulo {
  font-weight: 400;
  color: #555;
  text-align: center;
  margin: 0 0 8px;
  font-size: 16px;
}

.formulario__obligatorio {
  color: var(--toyota-red);
}

.formulario__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.formulario__campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.formulario__campo label {
  font-weight: 600;
  font-size: 14px;
}

.formulario__campo input,
.formulario__campo select {
  border: 1.5px solid var(--borde);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--foreground);
  background: #FFFFFF;
}

.formulario__campo input:focus,
.formulario__campo select:focus {
  outline: none;
  border-color: var(--toyota-red);
}

.formulario__legal {
  font-size: 13px;
  color: #555;
  text-align: center;
  line-height: 1.5;
  margin: -4px 0 0;
}
.formulario__legal a { color: var(--toyota-red); text-decoration: underline; }

.formulario__boton {
  background: var(--toyota-red);
  color: #FFFFFF;
  border: none;
  padding: 16px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease;
}
.formulario__boton:hover { background: var(--toyota-red-dark); }
.formulario__boton:disabled { opacity: 0.6; cursor: not-allowed; }

.formulario__mensaje {
  text-align: center;
  font-size: 14px;
  min-height: 20px;
  margin: 0;
}
.formulario__mensaje.exito { color: #1A7A33; font-weight: 600; }
.formulario__mensaje.error { color: var(--toyota-red); font-weight: 600; }

/* ---------- Pie de página ---------- */

.pie {
  background: var(--foreground);
  color: #FFFFFF;
  padding: 64px 32px 56px;
}

.pie__logo-contenedor {
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.pie__logo {
  display: block;
  height: 40px;
  width: auto;
}

.pie__contenedor {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px 32px;
  align-items: start;
}

.pie__etiqueta {
  display: block;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #AAAAAA;
  margin-bottom: 12px;
}

.pie__dato p { margin: 0; font-size: 16px; line-height: 1.6; }
.pie__dato--direccion p { font-size: 14px; }

.pie__enlace-mapa {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: underline;
}
.pie__enlace-mapa:hover { color: var(--toyota-red); }
.pie__dato a { color: #FFFFFF; text-decoration: none; }
.pie__dato a:hover { text-decoration: underline; }

.pie__contacto {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pie__icono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.pie__contacto a { font-size: 17px; font-weight: 600; }

.pie__distribuidor {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: #AAAAAA;
}

.pie__horarios-contenedor {
  max-width: 1080px;
  margin: 32px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.pie__horarios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px;
  margin-top: 12px;
}

.pie__horario-titulo {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 6px;
}

.pie__horario p { margin: 0; font-size: 13px; line-height: 1.6; color: #CCCCCC; }

@media (max-width: 720px) {
  .pie { padding: 48px 24px 40px; }
  .pie__contenedor { grid-template-columns: 1fr; gap: 32px; }
  .pie__logo-contenedor { margin-bottom: 24px; padding-bottom: 24px; }
  .pie__logo { height: 34px; }
  .pie__horarios { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 50;
}
