/* F4 – simulador. Usa las variables de marca de _base/ramonda-base.css */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rm-fondo); color: var(--rm-texto); line-height: 1.45; font-size: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--rm-azul-claro); outline-offset: 2px; }

/* ---------- encabezado ---------- */
.hero { position: relative; overflow: hidden; padding: 20px 16px 14px; }
.hero-in { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; display: grid; }
.hero-titulo { font-size: clamp(2.3rem, 10.5vw, 4rem); line-height: .98; margin: 22px 0 12px; max-width: 12ch; }
.hero-bajada { margin: 0; max-width: 44ch; font-size: 1.02rem; color: rgba(255,255,255,.92); }
.hero-cta { display: inline-block; width: auto; margin-top: 18px; padding: 14px 28px; text-decoration: none; }
/* palabra grande de fondo, con transparencia (estética Ramonda) */
.hero-fondo { position: absolute; left: -8px; bottom: 21%; font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: .8;
  font-size: clamp(5.5rem, 30vw, 15rem); color: rgba(255,255,255,.07); white-space: nowrap; pointer-events: none; }
/* rectángulo inclinado de fondo (forma del moño), con transparencia: base del auto */
.hero-marca { position: absolute; right: -12%; bottom: 0; width: 92%; height: 34%; background: rgba(255,255,255,.12);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); }
.hero-auto { margin: 14px -8px 0; position: relative; }
.hero-auto img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 18px rgba(14,65,128,.45)); }
.hero-auto figcaption { position: absolute; right: 8px; bottom: 8px; font-size: .75rem; color: rgba(255,255,255,.8); }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px 32px; position: relative; z-index: 2; }
.legal { max-width: 760px; }
.sim, .resultado, .contacto { max-width: none; }
.sim { scroll-margin-top: 12px; }

/* ---------- vidriera de modelos ---------- */
.vidriera { padding: 28px 0 8px; }
.vid-titulo { font-size: clamp(1.7rem, 7.5vw, 2.5rem); color: var(--rm-azul-profundo); margin: 0 0 6px; }
.vid-bajada { margin: 0 0 14px; color: var(--rm-texto-suave); }
.vid-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 76%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 4px 16px 14px; scroll-padding: 0 16px; overscroll-behavior-x: contain; }
.vid-rail:focus-visible { outline-offset: -3px; }
.auto { scroll-snap-align: start; background: #fff; border-radius: 16px; padding: 0 16px 16px; box-shadow: 0 4px 16px rgba(14,65,128,.10);
  display: flex; flex-direction: column; border: 1px solid #e1e8f1; overflow: hidden; }
.auto-foto { height: 132px; margin: 0 -16px 10px; display: grid; place-items: center; padding: 10px 12px 0;
  background: linear-gradient(180deg, #fff 0 62%, #e8f0f9 62% 100%); }
.auto-foto img { max-width: 100%; max-height: 118px; width: auto; height: auto; object-fit: contain; }
.auto-nombre { font-size: 1.9rem; color: var(--rm-azul-profundo); margin: 0; }
.auto-version { margin: 4px 0 8px; font-size: .88rem; color: var(--rm-texto-suave); }
.auto-attr { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.auto-attr li { font-size: .8rem; font-weight: 700; background: #eef5fd; color: var(--rm-azul-profundo); padding: 3px 10px;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.auto-dif { margin: 8px 0 0; font-size: .85rem; }
.auto-plan { margin: 12px 0 0; font-size: .85rem; color: var(--rm-texto-suave); }
.auto-cuota { margin: 2px 0 14px; display: flex; flex-direction: column; }
.auto-cuota small { font-size: .8rem; color: var(--rm-texto-suave); }
.auto-cuota b { font-size: 1.5rem; color: var(--rm-azul); line-height: 1.1; }
.auto-boton { margin-top: auto; font: inherit; font-weight: 700; padding: 12px 14px; border: 1.5px solid var(--rm-azul); border-radius: 10px;
  background: #fff; color: var(--rm-azul); cursor: pointer; }
.auto-boton:hover { background: var(--rm-azul); color: #fff; }
.vid-nota { font-size: .78rem; color: var(--rm-texto-suave); margin: 4px 0 0; }
.sim-elegido { margin: -4px 0 14px; padding: 10px 12px; background: #eef5fd; border-radius: 8px; font-size: .92rem; }
.sim-elegido .enlace { padding: 0 0 0 4px; }
.vidriera + .sim { margin-top: 18px; }
.tarjeta { background: var(--rm-superficie); border-radius: 16px; padding: 20px 16px; box-shadow: 0 8px 28px rgba(14,65,128,.12); }

/* ---------- progreso (rectángulos inclinados) ---------- */
.progreso { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.progreso li { font-size: .78rem; color: var(--rm-texto-suave); text-align: center; }
.progreso li::before { content: ""; display: block; height: 8px; margin-bottom: 6px; background: #dde5ef;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.progreso li.hecho::before { background: var(--rm-azul-claro); }
.progreso li.activo::before { background: var(--rm-azul); }
.progreso li.activo { color: var(--rm-azul-profundo); font-weight: 700; }

/* ---------- pasos ---------- */
.paso { border: 0; margin: 0; padding: 0; min-width: 0; }
.paso-pregunta { font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: var(--rm-azul-profundo); padding: 0; margin-bottom: 14px; display: flex; gap: 10px; align-items: baseline; }
.paso-pregunta:focus { outline: none; }
.paso-n { flex: none; display: inline-grid; place-items: center; width: 30px; height: 26px; background: var(--rm-azul); color: #fff; font-weight: 900; font-size: .95rem;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); transform: translateY(-2px); }
.paso-ayuda { font-size: .88rem; color: var(--rm-texto-suave); margin: 12px 0 0; }
.paso-ayuda.arriba { margin: -6px 0 14px; }
.paso-sub { font-weight: 700; margin: 18px 0 8px; color: var(--rm-azul-profundo); }
.paso-error { color: var(--rm-error); font-size: .88rem; margin: 10px 0 0; }
.paso-acciones { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }

.chips { display: grid; gap: 8px; }
.chips-2 { grid-template-columns: 1fr 1fr; }
.chips-3 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .chips-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .chips-3 { grid-template-columns: repeat(4, 1fr); } }
.chip-op { position: relative; display: block; cursor: pointer; }
.chip-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-op span { display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 10px 12px; border: 1.5px solid var(--rm-borde);
  border-radius: 10px; background: #fff; font-weight: 700; line-height: 1.2; transition: border-color .12s, background .12s; }
.chip-op small { font-weight: 400; font-size: .8rem; color: var(--rm-texto-suave); margin-top: 2px; }
.chip-op:hover span { border-color: var(--rm-azul-claro); }
.chip-op input:checked + span { border-color: var(--rm-azul); background: #e8f2fc; box-shadow: inset 0 0 0 1px var(--rm-azul); color: var(--rm-azul-profundo); }
.chip-op input:focus-visible + span { outline: 3px solid var(--rm-azul-claro); outline-offset: 2px; }

.versiones { display: grid; gap: 6px; }
.version { position: relative; display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--rm-borde);
  border-radius: 10px; cursor: pointer; background: #fff; }
.version input { position: absolute; opacity: 0; }
.version span { font-weight: 700; }
.version b { white-space: nowrap; font-weight: 400; color: var(--rm-texto-suave); font-size: .92rem; }
.version:has(input:checked) { border-color: var(--rm-azul); background: #e8f2fc; }
.version:has(input:focus-visible) { outline: 3px solid var(--rm-azul-claro); outline-offset: 2px; }

.monto { display: grid; gap: 6px; margin-top: 12px; font-weight: 700; font-size: .92rem; }
.monto input { font: inherit; font-size: 1.15rem; font-weight: 700; padding: 12px 14px; border: 1.5px solid var(--rm-borde); border-radius: 10px; width: 100%; color: var(--rm-azul-profundo); }
.monto input:focus-visible { border-color: var(--rm-azul); outline-offset: 0; }
.check-usado { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: .95rem; cursor: pointer; }
.check-usado input { width: 20px; height: 20px; accent-color: var(--rm-azul); }

.volver, .enlace { font: inherit; background: none; border: 0; padding: 10px 0; color: var(--rm-azul); text-decoration: underline; cursor: pointer; }
.seguir { font: inherit; font-weight: 700; padding: 13px 26px; border: 0; border-radius: 10px; background: var(--rm-azul); color: #fff; cursor: pointer; }
.seguir:hover { background: var(--rm-azul-profundo); }
#sim-ver { background: var(--rm-acento); color: var(--rm-acento-texto); }

/* ---------- resultado ---------- */
.resultado { margin-top: 28px; scroll-margin-top: 12px; }
.resumen { font-size: .95rem; color: var(--rm-texto-suave); margin-bottom: 8px; }
.resumen p { margin: 0; }
.resumen b { color: var(--rm-texto); }
.res-titulo { font-size: clamp(1.8rem, 8vw, 2.4rem); color: var(--rm-azul-profundo); margin: 18px 0 14px; }

details.plan { background: #fff; border-radius: 16px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(14,65,128,.08); border: 1.5px solid #e1e8f1; overflow: hidden; }
details.plan > summary { list-style: none; cursor: pointer; padding: 16px; display: grid; gap: 4px; position: relative; }
details.plan > summary::-webkit-details-marker { display: none; }
.plan-nombre { font-weight: 900; font-size: 1.25rem; text-transform: uppercase; line-height: 1; letter-spacing: -.01em; padding-right: 32px; }
.plan-nombre small { font-size: .62em; font-weight: 700; letter-spacing: .06em; }
.plan-tipo { font-size: .88rem; color: var(--rm-texto-suave); }
.cifras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cifras small { display: block; font-size: .8rem; color: var(--rm-texto-suave); }
.cifras b { font-size: 1.15rem; color: var(--rm-azul-profundo); }
.abrir { position: absolute; top: 18px; right: 16px; width: 12px; height: 12px; border-right: 2.5px solid var(--rm-azul); border-bottom: 2.5px solid var(--rm-azul); transform: rotate(45deg); transition: transform .15s; }
details[open] > summary .abrir { transform: rotate(-135deg); top: 24px; }

/* el recomendado: bloque azul */
details.plan.recomendado { border: 0; box-shadow: 0 10px 30px rgba(14,65,128,.22); }
.recomendado > summary { background: var(--rm-degrade); color: #fff; padding-top: 18px; }
.recomendado .plan-nombre { font-size: 1.6rem; }
.recomendado .plan-tipo, .recomendado .cifras small { color: rgba(255,255,255,.85); }
.recomendado .cifras b { color: #fff; font-size: 1.35rem; }
.recomendado .abrir { border-color: #fff; top: 22px; }
.insignia { justify-self: start; background: var(--rm-dorado); color: var(--rm-azul-profundo); font-weight: 700; font-size: .8rem; margin-bottom: 8px; }

.plan-cuerpo { padding: 4px 16px 18px; }
.plan-cuerpo h4 { font-size: 1.02rem; color: var(--rm-azul-profundo); margin: 18px 0 8px; }
.plan-cuerpo p { margin: 0 0 8px; font-size: .95rem; }
.desglose, .datos-plan { list-style: none; margin: 0; padding: 0; }
.desglose li, .datos-plan li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e8edf3; font-size: .95rem; }
.desglose li b, .datos-plan li b { white-space: nowrap; }
.desglose small { display: block; font-size: .8rem; color: var(--rm-texto-suave); }
.desglose .total { border-bottom: 0; font-weight: 700; font-size: 1.05rem; color: var(--rm-azul-profundo); background: #eef5fd; margin: 4px -10px 0; padding: 10px; border-radius: 8px; }
.nota-credito { font-size: .9rem !important; background: #f4f7fb; padding: 10px 12px; border-radius: 8px; margin-top: 10px !important; }

/* línea de cuotas: el elemento visual del simulador */
.linea { display: flex; height: 26px; margin: 4px 0 10px; gap: 3px; }
.linea span { display: block; min-width: 6px; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.linea span[style*="width:0%"] { display: none; }
.l-pagas { background: var(--rm-azul-profundo); }
.l-quedan { background: var(--rm-dorado); }
.l-adel { background: var(--rm-azul-claro); }
.linea-ref { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.linea-ref i { display: inline-block; width: 14px; height: 10px; margin-right: 8px; clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }

.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tabla th { text-align: left; font-weight: 700; font-size: .82rem; color: var(--rm-texto-suave); padding: 6px 4px; border-bottom: 1.5px solid var(--rm-borde); vertical-align: bottom; }
.tabla th small { display: block; font-weight: 400; }
.tabla td { padding: 8px 4px; border-bottom: 1px solid #e8edf3; }
.tabla th:not(:first-child), .tabla td:not(:first-child) { text-align: right; }
.tabla td:last-child { font-weight: 700; white-space: nowrap; }
.escala td.zona, .escala th.zona { background: #eef5fd; color: var(--rm-azul-profundo); }
.escala td { font-weight: 400 !important; }
.escala td.zona { font-weight: 700 !important; }

.escala-caja { margin: 18px 0 16px; border: 1.5px solid #e1e8f1; border-radius: 10px; padding: 0 12px; }
.escala-caja > summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--rm-azul); }
.escala-caja[open] { padding-bottom: 12px; }
.datos-plan { margin-top: 10px; }

.sin-planes p { font-size: .95rem; }
.excl-titulo { font-size: 1.05rem; color: var(--rm-azul-profundo); margin: 24px 0 10px; }
.excluidos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.excluidos li { background: #fff; border-radius: 12px; padding: 12px 14px; border: 1px solid #e1e8f1; }
.excluidos li > span { font-size: .82rem; color: var(--rm-texto-suave); margin-left: 4px; }
.excluidos p { margin: 4px 0 0; font-size: .9rem; }
.aviso-presupuesto { font-size: .9rem; color: var(--rm-texto-suave); text-align: center; margin: 16px 0 0; }

/* ---------- contacto ---------- */
.contacto { margin-top: 24px; scroll-margin-top: 12px; border-top: 6px solid var(--rm-azul); }
.contacto-titulo { font-size: 1.5rem; color: var(--rm-azul-profundo); margin: 4px 0 8px; }
.contacto-plan { margin: 0 0 16px; font-size: .95rem; background: #eef5fd; padding: 10px 12px; border-radius: 8px; }
.contacto-nota { font-size: .85rem; color: var(--rm-texto-suave); text-align: center; margin: 0; }
.gracias-titulo { font-size: 1.9rem; color: var(--rm-azul-profundo); margin: 0 0 10px; }
.gracias .rm-boton { margin-top: 10px; }

/* ---------- legal ---------- */
.legal { margin-top: 32px; font-size: .8rem; color: var(--rm-texto-suave); }
.legal p { margin: 0 0 8px; }
.revisar-legal { background: #fff4c7; border: 1px dashed #c89b00; color: #6b5200; padding: 0 4px; border-radius: 4px; font-size: .78rem; }

@media (min-width: 640px) { .vid-rail { grid-auto-columns: 44%; } }
@media (min-width: 900px) {
  .hero { padding: 28px 24px 0; }
  .hero-in { grid-template-columns: 1fr 1.1fr; grid-template-rows: auto 1fr; column-gap: 24px; }
  .hero-in > picture { grid-column: 1 / -1; }
  .hero-texto { padding-bottom: 56px; align-self: center; }
  .hero-auto { align-self: end; margin: 0 -24px 0 0; }
  .hero-marca { width: 60%; height: 42%; right: -4%; }
  .hero-fondo { bottom: 8%; left: auto; right: -2%; }
  .vid-rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 4px 0 14px; }
}
@media (min-width: 768px) {
  .tarjeta { padding: 28px; }
  .plan-cuerpo { padding: 4px 24px 24px; }
  details.plan > summary { padding: 20px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- ancho completo (ajuste 04/11): el simulador usa el mismo ancho que la vidriera ---------- */
/* miniatura en el paso 2 */
.chip-modelo span { min-height: 0; padding: 8px 10px 10px; text-align: left; }
.mini { display: grid; place-items: center; height: 58px; margin-bottom: 6px; font-style: normal; }
.mini img { max-width: 100%; max-height: 58px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.sin-foto { display: block; width: 72%; height: 34px; background: #e6edf5; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
/* pasos con texto: no estirar las líneas */
.paso-ayuda, .paso-sub, .sim-elegido { max-width: 62ch; }
@media (min-width: 768px) {
  .chips-2 { grid-template-columns: repeat(3, 1fr); }
  .paso[data-paso="1"] .chips-2 { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .monto, .check-usado { max-width: 420px; }
  .versiones { grid-template-columns: repeat(2, 1fr); }
  .excluidos { grid-template-columns: repeat(2, 1fr); }
  .resumen p { max-width: 75ch; }
}
@media (min-width: 900px) {
  .plan-cuerpo { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
  .plan-quiero { grid-column: 1 / -1; max-width: 520px; justify-self: center; margin-top: 8px; }
  .excluidos { grid-template-columns: repeat(3, 1fr); }
  .contacto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 40px; align-items: start; }
  .contacto-titulo, .contacto-plan { grid-column: 1; }
  .contacto > form, .contacto > .gracias { grid-column: 2; grid-row: 1 / span 3; }
}
/* legales oficiales */
.auto-cuota .sin-imp { margin-top: 2px; }
.legal-planes { margin: 4px 0 12px; }
.legal-planes > summary { cursor: pointer; color: var(--rm-azul); font-weight: 700; padding: 6px 0; }
.legal-planes p { font-size: .75rem; }
.legal-plan p { font-size: .8rem; color: var(--rm-texto-suave); }
.legal a { color: var(--rm-azul); }
/* diferenciales de cada modelo */
ul.auto-dif { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
ul.auto-dif li { position: relative; padding-left: 18px; }
ul.auto-dif li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 7px; background: var(--rm-azul-claro);
  clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%); }
