/* =====================================================================
   GDL Auto Importaciones — estilos
   Tema oscuro tipo SaaS/fintech. Mobile-first.
   ===================================================================== */

:root {
  --bg: #0a0a0c;
  --bg-elev: #131519;
  --bg-elev-2: #1b1d22;
  --border: #26282e;
  --text: #f4f4f5;
  --text-muted: #9a9ca3;
  --red: #e3141c;
  --red-dark: #8f0910;
  --red-glow: rgba(227, 20, 28, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 64px 0;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 12px;
}

.eyebrow {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.section-titulo {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-titulo p {
  color: var(--text-muted);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 24px var(--red-glow);
}

.btn--primary:hover {
  background: #ff1e28;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  padding: 10px 16px;
  font-size: 0.85rem;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header--scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 12, 0.97);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.header__marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.header__marca img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header__nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.header__nav a:hover {
  color: var(--text);
}

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

.header__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .header__toggle {
    display: block;
  }

  .header__nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .header__nav--abierto {
    max-height: 400px;
  }

  .header__nav a {
    padding: 14px 20px;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .header__cta .btn span {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 72px;
  background:
    radial-gradient(600px 300px at 15% 0%, var(--red-glow), transparent 60%),
    var(--bg);
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero__titulo {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
}

.hero__titulo .destacado {
  color: var(--red);
}

.hero__subtitulo {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 0 28px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__visual img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 380px;
  width: 100%;
}

/* ---------- Confianza / métricas ---------- */
.metricas {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.metricas__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}

@media (min-width: 760px) {
  .metricas__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metrica__valor {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
}

.metrica__label {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* ---------- Cómo funciona ---------- */
.pasos {
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .pasos {
    grid-template-columns: repeat(3, 1fr);
  }
}

.paso {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}

.paso__numero {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.paso p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Catálogo ---------- */
.catalogo-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .catalogo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .catalogo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.auto-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.auto-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
}

.auto-card--destacado {
  border-color: var(--red);
}

.auto-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}

.auto-card__foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.auto-card__info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auto-card__info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.auto-card__anio {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.85rem;
}

.auto-card__desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 4px 0 8px;
}

.auto-card__precio-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.auto-card__precio {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
}

.catalogo-vacio {
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.catalogo-nota {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 28px;
}

/* ---------- FAQ ---------- */
.faq-lista {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item__pregunta {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 16px;
}

.faq-item__pregunta::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item--abierto .faq-item__pregunta::after {
  transform: rotate(45deg);
}

.faq-item__respuesta {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--text-muted);
}

.faq-item--abierto .faq-item__respuesta {
  max-height: 300px;
}

.faq-item__respuesta p {
  margin: 0;
  padding: 0 20px 18px;
}

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg));
  border-top: 1px solid var(--border);
}

.cta-final h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.cta-final p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg-elev);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.footer__marca {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.footer__marca img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 280px;
  margin-top: 8px;
}

.footer__col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__col a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.footer__col a:hover {
  color: var(--red);
}

.footer__redes {
  display: flex;
  gap: 12px;
}

.footer__redes a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.footer__redes a:hover {
  border-color: var(--red);
  color: var(--red);
}

.footer__redes svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- Botones flotantes ---------- */
.flotantes {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
}

.flotante {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.flotante:hover {
  transform: scale(1.06);
}

.flotante svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.flotante--whatsapp {
  background: #25d366;
}

.flotante--llamada {
  background: var(--red);
}

.flotante--compartir {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.flotante--compartir:hover {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 480px) {
  .flotantes {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }

  .flotante {
    width: 50px;
    height: 50px;
  }
}

/* ---------- Banner de instalación de la PWA ---------- */
.instalar-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 300;
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: subir 0.3s ease;
}

.instalar-banner[hidden] {
  display: none;
}

@keyframes subir {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.instalar-banner__icono {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.instalar-banner__texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.instalar-banner__texto strong {
  font-size: 0.9rem;
}

.instalar-banner__texto span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.instalar-banner__cerrar {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.instalar-banner__cerrar:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .instalar-banner {
    left: 12px;
    right: 12px;
    padding: 12px 12px;
  }

  .instalar-banner__texto span {
    font-size: 0.74rem;
  }

  .instalar-banner #instalar-banner__btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
}

/* ---------- Modal de desglose de costos ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: aparecer 0.15s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes aparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-desglose {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.modal-desglose__cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-desglose__cerrar:hover {
  border-color: var(--red);
  color: var(--red);
}

.modal-desglose__grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .modal-desglose__grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.carrusel {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  touch-action: pan-y;
}

.carrusel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.carrusel__flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carrusel__flecha:hover {
  background: var(--red);
}

.carrusel__flecha[hidden] {
  display: none;
}

.carrusel__flecha--prev {
  left: 8px;
}

.carrusel__flecha--next {
  right: 8px;
}

.carrusel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carrusel__dots[hidden] {
  display: none;
}

.carrusel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}

.carrusel__dot--activo {
  background: var(--red);
}

.modal-desglose__costos h3 {
  margin: 0 0 14px;
  padding-right: 30px;
}

.desglose-filas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

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

.desglose-fila__valor {
  min-width: 96px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.desglose-fila__label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.desglose-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-bottom: 18px;
}

.desglose-total span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.desglose-total strong {
  font-size: 1.15rem;
  color: var(--red);
}

/* ---------- Toast simple (usado por el botón compartir) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
