/* ============================================
   AutoFilms MX — Estilos globales
   Estilo: Oscuro premium automotriz
   ============================================ */

:root {
  --bg: #0b0d10;
  --bg-alt: #12151a;
  --bg-card: #171b21;
  --border: #262c35;
  --red: #e4002b;          /* Rojo 3M */
  --red-dark: #b30022;
  --silver: #c9ced6;
  --text: #e8eaee;
  --text-muted: #9aa3af;
  --whatsapp: #25d366;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

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

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.brand .accent { color: var(--red); }

.brand-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: #fff; }

.nav-links a.active { border-bottom: 2px solid var(--red); padding-bottom: 2px; }

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--red-dark); }

/* Menú móvil */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.35rem;
}

.ui-icon { display: block; width: 1em; height: 1em; }

.inline-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.4rem;
  vertical-align: -0.18em;
  color: currentColor;
  flex-shrink: 0;
}

.nav-toggle .ui-icon { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(228, 0, 43, 0.18), transparent 55%),
    radial-gradient(ellipse at 15% 80%, rgba(100, 120, 150, 0.12), transparent 50%),
    var(--bg);
  overflow: hidden;
}

.hero-inner { max-width: 720px; }

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.2rem;
}

.hero h1 .accent { color: var(--red); }

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 560px;
}

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s, background 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--silver); }

.btn-whatsapp { background: var(--whatsapp); color: #06281a; }
.btn-whatsapp:hover { background: #1fba58; }

/* ---------- Secciones ---------- */
section { padding: 4.5rem 0; }

.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

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

/* ---------- Cards / Grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform 0.2s, border-color 0.2s;
}

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

.card .icon {
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--red);
  background: rgba(228, 0, 43, 0.1);
  border: 1px solid rgba(228, 0, 43, 0.3);
  border-radius: 12px;
}

.card .icon .ui-icon { width: 26px; height: 26px; }

.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Catálogo de películas ---------- */
.film-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

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

.film-card .film-top {
  padding: 1.6rem 1.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.film-tier {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
}

.film-card h3 { font-size: 1.3rem; margin: 0.3rem 0 0.4rem; }

.film-card .film-sub { color: var(--text-muted); font-size: 0.92rem; }

.film-card ul {
  list-style: none;
  padding: 1.2rem 1.6rem;
  flex: 1;
}

.film-card ul li {
  padding: 0.35rem 0;
  font-size: 0.93rem;
  color: var(--silver);
  display: flex;
  gap: 0.5rem;
}

.film-card ul li::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-top: 0.12rem;
  flex-shrink: 0;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.film-card .film-cta { padding: 0 1.6rem 1.6rem; }

.film-card.featured { border-color: var(--red); position: relative; }

.featured-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 1px;
}

/* Tabla comparativa */
.compare-wrap { overflow-x: auto; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 640px;
}

table.compare th, table.compare td {
  padding: 0.9rem 1.1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

table.compare th {
  background: #1c212a;
  font-weight: 700;
}

table.compare td:first-child, table.compare th:first-child {
  text-align: left;
  font-weight: 600;
}

table.compare tr:last-child td { border-bottom: none; }

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1a1f27, #232a35);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.gallery-item:hover { border-color: var(--red); }

.gallery-item .ph-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.gallery-item .ph-icon .ui-icon { width: 40px; height: 40px; }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 1.5rem 1rem 0.8rem;
  font-size: 0.85rem;
  color: #fff;
}

/* ---------- Formulario ---------- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  max-width: 640px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.2rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--silver);
}

input, select, textarea {
  width: 100%;
  background: #0e1116;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}

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

textarea { resize: vertical; min-height: 100px; }

.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.8rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--red-dark), var(--red));
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-band h2 { font-size: 1.7rem; margin-bottom: 0.4rem; }

.cta-band p { opacity: 0.9; }

.cta-band .btn { background: #fff; color: var(--red-dark); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 { color: #fff; margin-bottom: 0.8rem; font-size: 1rem; }

.site-footer ul { list-style: none; }

.site-footer ul li { margin-bottom: 0.45rem; }

.site-footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  text-align: center;
  font-size: 0.82rem;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  background: var(--whatsapp);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s;
}

.wa-float:hover { transform: scale(1.08); }

.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- Page hero (interiores) ---------- */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(228, 0, 43, 0.14), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }

.page-hero p { color: var(--text-muted); margin-top: 0.6rem; max-width: 620px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0;
    gap: 1rem;
  }

  .nav-links.open { display: flex; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3.5rem; }
  .cta-band { padding: 2.2rem 1.6rem; }
}

/* ============================================
   Cotizador en línea
   ============================================ */
.cot-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: start;
}

.cot-col { display: flex; flex-direction: column; gap: 1.4rem; }

.cot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.cot-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.cot-step span {
  background: var(--red);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Chips de vehículo */
.cot-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }

.cot-chip {
  background: #0e1116;
  border: 1.5px solid var(--border);
  color: var(--silver);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
}

.cot-chip:hover { border-color: var(--silver); }

.cot-chip.active { border-color: var(--red); color: #fff; background: rgba(228, 0, 43, 0.12); }

.cot-hint { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.8rem; }

/* SVG del auto */
.cot-svg-wrap { display: flex; justify-content: center; }

.cot-svg { width: min(320px, 100%); height: auto; }

.cot-svg .body {
  fill: #1d232c;
  stroke: #333c48;
  stroke-width: 2;
}

.cot-svg .body-part { fill: #232a34; stroke: #333c48; stroke-width: 1.5; }

.cot-svg .body-line { fill: none; stroke: #2b333f; stroke-width: 2; stroke-linecap: round; }

.cot-svg .roof { fill: #171c23; stroke: #2b333f; stroke-width: 1.5; }

.cot-svg .cot-svg-label {
  fill: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  font-family: var(--font);
}

.cot-svg .win {
  fill: #9db2c6;
  fill-opacity: 0.5;
  stroke: #46505e;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill-opacity 0.25s, stroke 0.2s;
}

.cot-svg .win:hover { stroke: var(--red); stroke-width: 2.5; }

.cot-svg .win.selected {
  fill: #05070a;
  stroke: var(--red);
  stroke-width: 2.5;
}

/* Botones rápidos de selección */
.cot-quick { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; justify-content: center; }

.cot-mini {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--silver);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
}

.cot-mini:hover { border-color: var(--red); color: #fff; }

/* Películas */
.cot-films { display: flex; flex-direction: column; gap: 0.7rem; }

.cot-film {
  background: #0e1116;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  transition: border-color 0.2s, background 0.2s;
}

.cot-film:hover { border-color: var(--silver); }

.cot-film.active { border-color: var(--red); background: rgba(228, 0, 43, 0.1); }

.cot-film strong { display: block; font-size: 1rem; margin-bottom: 0.15rem; }

.cot-film small { color: var(--text-muted); font-size: 0.82rem; }

.cot-pop {
  background: var(--red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 1px;
  vertical-align: middle;
  margin-left: 0.4rem;
  text-transform: uppercase;
}

/* Tonos */
.cot-tonos { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.cot-tono {
  background: #0e1116;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.cot-tono:hover { border-color: var(--silver); }

.cot-tono.active { border-color: var(--red); background: rgba(228, 0, 43, 0.1); }

.cot-tono-swatch {
  width: 44px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid #46505e;
  background: #9db2c6;
}

/* Resumen */
.cot-meta { border-bottom: 1px solid var(--border); padding-bottom: 0.9rem; margin-bottom: 0.9rem; }

.cot-meta p { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.18rem 0; }

.cot-meta span { color: var(--text-muted); }

.cot-lista { list-style: none; margin-bottom: 1rem; }

.cot-lista li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  font-size: 0.92rem;
  color: var(--silver);
  border-bottom: 1px dashed rgba(38, 44, 53, 0.7);
}

.cot-lista li.cot-vacio { color: var(--text-muted); border: none; font-style: italic; }

.cot-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.8rem 1rem;
  background: rgba(228, 0, 43, 0.1);
  border: 1px solid rgba(228, 0, 43, 0.35);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.cot-total-row strong { font-size: 1rem; color: #fff; text-align: right; }

.cot-nota {
  font-size: 0.83rem;
  color: var(--text-muted);
  background: #0e1116;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
}

.cot-acciones { display: flex; flex-direction: column; gap: 0.7rem; }

.cot-acciones .btn { justify-content: center; }

.cot-acciones .btn:disabled,
.cot-acciones .btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 900px) {
  .cot-grid { grid-template-columns: 1fr; }
}

/* ---------- Documento imprimible (cotización PDF) ---------- */
.print-doc { display: none; }

@media print {
  body > *:not(.print-doc) { display: none !important; }
  .print-doc { display: block !important; }

  body { background: #fff !important; color: #111 !important; }

  .print-doc { font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; padding: 24px; }

  .pd-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #e4002b; padding-bottom: 16px; margin-bottom: 20px; }

  .pd-logo { height: 64px; width: auto; }

  .pd-meta { text-align: right; }

  .pd-meta h1 { font-size: 26px; color: #e4002b; margin-bottom: 6px; }

  .pd-meta p { font-size: 12px; margin: 2px 0; color: #333; }

  .pd-datos { margin-bottom: 18px; }

  .pd-datos p { font-size: 13px; margin: 3px 0; color: #222; }

  .pd-tabla { width: 100%; border-collapse: collapse; margin-bottom: 18px; }

  .pd-tabla th, .pd-tabla td { border: 1px solid #ddd; padding: 8px 12px; font-size: 13px; text-align: left; color: #222; }

  .pd-tabla th { background: #f4f4f4; font-weight: 700; }

  .pd-tabla .num { text-align: right; white-space: nowrap; }

  .pd-tabla tfoot td { font-weight: 800; font-size: 15px; background: #fdf0f2; border-top: 2px solid #e4002b; }

  .pd-notas p { font-size: 11px; color: #555; margin: 3px 0; }

  .pd-footer { margin-top: 24px; border-top: 1px solid #ddd; padding-top: 10px; text-align: center; font-size: 11px; color: #777; }
}

/* Logo */
.brand-logo {
  display: block;
  height: 52px;
  width: auto;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}
@media (max-width: 640px) {
  .brand-logo { height: 42px; padding: 4px 9px; border-radius: 8px; }
}
