/* =====================================================================
   LÓPEZ INMOBILIARIA — Sistema visual
   Estructura (espaciado, tamaños, formas, elevación) según DESIGN.md;
   colores de marca: azul #002D5B y dorado #C5A059.
   ===================================================================== */

:root {
  /* Marca */
  --azul: #002d5b;
  --azul-700: #00203f;
  --azul-050: #eef2f7;
  --dorado: #c5a059;
  --dorado-600: #a9843f;
  --dorado-050: #faf5ea;

  /* Neutros (DESIGN.md) */
  --texto: #222222;
  --texto-2: #6a6a6a;
  --gris-500: #c1c1c1;
  --linea: #ebebeb;
  --muted: #dddddd;
  --lienzo: #f7f7f7;
  --blanco: #ffffff;
  --exito: #1f7a4d;
  --error: #b42318;

  /* Tipografía */
  --fuente: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t-caption: 11px;
  --t-small: 12px;
  --t-body: 14px;
  --t-ui: 16px;
  --t-sub: 20px;
  --t-h-sm: 22px;
  --t-h: 28px;
  --t-display: clamp(32px, 5vw, 48px);

  /* Espaciado: base 4px */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s20: 20px; --s24: 24px;
  --s28: 28px; --s32: 32px; --s40: 40px; --s44: 44px; --s48: 48px; --s64: 64px; --s80: 80px;
  --gutter: 16px;
  --ancho: 1440px;
  --seccion: 48px;

  /* Formas */
  --r-card: 12px;
  --r-card-lg: 14px;
  --r-input: 8px;
  --r-pill: 9999px;

  /* Elevación (solo flotantes) */
  --sombra-buscador: 0 0 0 1px rgba(0,0,0,.02), 0 2px 6px rgba(0,0,0,.04), 0 4px 8px rgba(0,0,0,.10);
  --sombra-overlay: 0 8px 28px rgba(0,0,0,.28);
  --sombra-menu: 0 6px 20px rgba(0,0,0,.2);
  --sombra-tip: 0 2px 4px rgba(0,0,0,.18);

  --ease: cubic-bezier(.23, 1, .32, 1);       /* ease-out fuerte para UI */
  --ease-mov: cubic-bezier(.77, 0, .175, 1);  /* movimiento en pantalla */
  --header: 80px;
}
@media (min-width: 744px) { :root { --gutter: 24px; } }
@media (min-width: 1128px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0; font-family: var(--fuente); font-size: var(--t-body); line-height: 1.43;
  color: var(--texto); background: var(--blanco); -webkit-font-smoothing: antialiased;
  font-feature-settings: "salt" on;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; color: var(--texto); text-wrap: balance; }
h1 { font-size: var(--t-h); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: var(--t-h-sm); font-weight: 500; line-height: 1.18; letter-spacing: -.02em; }
h3 { font-size: var(--t-ui); font-weight: 600; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--dorado); color: var(--azul); }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--gutter); }
.angosto { max-width: 760px; }
.seccion { padding-block: var(--seccion); }
.seccion + .seccion { padding-top: 0; }
.lienzo { background: var(--lienzo); }
.muted { color: var(--texto-2); }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--azul); color: #fff; padding: 12px 16px; border-radius: var(--r-input); }
.saltar:focus { top: 12px; }
/* Movimiento reducido: se quita el desplazamiento, se conservan opacidad y color */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .btn:active, .btn-icono:active, .corazon:active, .wa-flotante:active, .tarjeta-foto img, .menu-movil, .cookies { transform: none !important; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  min-height: 48px; padding: 0 var(--s24); border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--t-ui); font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-accion { background: var(--dorado); color: var(--azul); }
.btn-accion:hover { background: var(--dorado-600); color: #fff; }
.btn-solido { background: var(--azul); color: #fff; }
.btn-solido:hover { background: var(--azul-700); }
.btn-contorno { background: transparent; border-color: var(--texto); color: var(--texto); }
.btn-contorno:hover { background: var(--lienzo); }
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-whatsapp:hover { background: #178a45; }
.btn-chico { min-height: 36px; padding: 0 var(--s16); font-size: var(--t-body); font-weight: 500; border-radius: var(--r-input); }
.btn-bloque { width: 100%; }
.btn-icono {
  width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: var(--r-pill);
  background: var(--lienzo); color: var(--texto); border: 0; display: inline-grid; place-items: center; cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease);
}
.btn-icono:hover { background: var(--linea); }
.btn-icono:active { transform: scale(.94); }
.enlace { color: var(--texto); font-weight: 600; text-decoration: underline; }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 50; height: var(--header); background: var(--blanco); border-bottom: 1px solid var(--linea); }
.header .contenedor { height: 100%; display: flex; align-items: center; gap: var(--s24); }
.marca { display: flex; align-items: center; flex: none; }
.marca img { height: 56px; width: auto; }
.nav { display: none; gap: var(--s4); margin-inline: auto; }
.nav a {
  position: relative; display: flex; align-items: center; height: var(--header); padding: 0 var(--s16);
  color: var(--texto-2); font-size: var(--t-ui); font-weight: 500; text-decoration: none;
}
.nav a:hover { color: var(--texto); }
.nav a[aria-current="page"] { color: var(--texto); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s16); right: var(--s16); bottom: 0; height: 2px; background: var(--azul); }
.header-acciones { display: flex; align-items: center; gap: var(--s8); margin-left: auto; }
.header-acciones .btn { display: none; }
.menu-btn { display: inline-grid; }
@media (min-width: 1024px) {
  .nav { display: flex; }
  .header-acciones { margin-left: 0; }
  .header-acciones .btn { display: inline-flex; min-height: 40px; font-size: var(--t-body); }
  .menu-btn { display: none; }
}
.menu-movil {
  position: fixed; inset: var(--header) 0 0; z-index: 49; background: var(--blanco); padding: var(--s24) var(--gutter);
  display: flex; flex-direction: column; gap: var(--s4); overflow-y: auto;
  transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 150ms ease, transform 150ms var(--ease), visibility 0s linear 150ms;
}
.menu-movil.abierto { transform: none; opacity: 1; visibility: visible; transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s; }
.menu-movil a:not(.btn) { padding: var(--s16) 0; font-size: var(--t-sub); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--linea); }
.menu-movil .btn { margin-top: var(--s24); }

/* ---------- Hero + buscador ---------- */
.hero { position: relative; isolation: isolate; color: #fff; }
.hero-foto { position: absolute; inset: 0; z-index: -1; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; }
.hero-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,32,63,.55) 0%, rgba(0,32,63,.25) 45%, rgba(0,32,63,.7) 100%); }
.hero .contenedor { min-height: min(78vh, 680px); display: flex; flex-direction: column; justify-content: center; padding-block: var(--s64) var(--s48); }
.hero h1 { color: #fff; font-size: var(--t-display); line-height: 1.08; max-width: 14ch; letter-spacing: -.03em; }
.hero p { margin-top: var(--s16); font-size: var(--t-ui); max-width: 46ch; color: rgba(255,255,255,.9); }
@media (min-width: 744px) { .hero p { font-size: var(--t-sub); } }

.buscador {
  margin-top: var(--s32); width: 100%; max-width: 880px; background: var(--blanco); color: var(--texto);
  border-radius: var(--r-card); box-shadow: var(--sombra-buscador); padding: var(--s8);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.buscador-campo { display: flex; flex-direction: column; gap: 2px; padding: var(--s12) var(--s16); border-radius: var(--r-input); cursor: pointer; transition: background-color 150ms ease; }
.buscador-campo:hover { background: var(--lienzo); }
.buscador-campo label { font-size: var(--t-small); font-weight: 600; }
.buscador-campo select, .buscador-campo input { border: 0; padding: 0; background: transparent; font-size: var(--t-body); color: var(--texto-2); outline: none; width: 100%; appearance: none; cursor: pointer; }
.buscador-enviar { grid-column: 1 / -1; margin-top: var(--s8); }
@media (min-width: 900px) {
  .buscador { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; border-radius: var(--r-pill); align-items: center; padding: var(--s8) var(--s8) var(--s8) var(--s8); }
  .buscador-campo { border-radius: var(--r-pill); padding: var(--s12) var(--s24); position: relative; }
  .buscador-campo + .buscador-campo::before { content: ""; position: absolute; left: 0; top: 25%; height: 50%; width: 1px; background: var(--linea); }
  .buscador-campo label { font-size: var(--t-small); }
  .buscador-enviar { grid-column: auto; margin: 0; width: 48px; height: 48px; min-height: 48px; padding: 0; }
  .buscador-enviar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Encabezado de sección ---------- */
.titulo-seccion { display: flex; align-items: end; justify-content: space-between; gap: var(--s16); margin-bottom: var(--s24); }
.titulo-seccion a { font-size: var(--t-body); font-weight: 600; color: var(--texto); white-space: nowrap; }
.titulo-seccion p { margin-top: var(--s4); color: var(--texto-2); }

/* ---------- Tarjeta de propiedad ---------- */
.rejilla { display: grid; gap: var(--s40) var(--s24); grid-template-columns: 1fr; }
@media (min-width: 550px) { .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 950px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .rejilla-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tarjeta { position: relative; min-width: 0; display: flex; flex-direction: column; gap: var(--s12); }
.tarjeta-foto { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-card); overflow: hidden; background: var(--muted); }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .tarjeta:hover .tarjeta-foto img { transform: scale(1.02); } }
.tarjeta-enlace { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-card); }
.tarjeta-enlace:focus-visible { outline-offset: 4px; }
.insignia {
  position: absolute; top: var(--s12); left: var(--s12); z-index: 2; background: var(--blanco); color: var(--texto);
  border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--t-small); font-weight: 600; box-shadow: var(--sombra-tip);
}
.insignia-oscura { background: var(--azul); color: #fff; }
.corazon {
  position: absolute; top: 4px; right: 4px; z-index: 2; width: 48px; height: 48px; border: 0; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: #fff;
}
.corazon svg { width: 24px; height: 24px; fill: rgba(0,0,0,.45); stroke: #fff; stroke-width: 2; transition: transform 160ms var(--ease), fill 150ms ease; }
@media (hover: hover) and (pointer: fine) { .corazon:hover svg { transform: scale(1.08); } }
.corazon:active svg { transform: scale(.88); }
.corazon[aria-pressed="true"] svg { fill: var(--dorado); }
.tarjeta-cuerpo { display: flex; flex-direction: column; gap: 2px; }
.tarjeta-titulo { font-size: var(--t-body); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-meta { color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-precio { margin-top: var(--s4); }
.tarjeta-precio strong { font-weight: 600; }

/* ---------- Catálogo ---------- */
.barra-filtros { position: sticky; top: var(--header); z-index: 20; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.filtros { display: flex; gap: var(--s8); overflow-x: auto; padding-block: var(--s16); scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex: none; display: flex; flex-direction: column; min-width: 150px; border: 1px solid var(--linea); border-radius: var(--r-input); padding: var(--s8) var(--s12); background: var(--blanco); }
.filtro:focus-within { border-color: var(--texto); }
.filtro label { font-size: var(--t-caption); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.filtro select, .filtro input { border: 0; padding: 2px 0 0; outline: none; background: transparent; font-size: var(--t-body); width: 100%; }
.filtros .btn { flex: none; align-self: stretch; min-height: auto; }
.resultado-cabecera { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s16); flex-wrap: wrap; padding-top: var(--s32); margin-bottom: var(--s24); }
.vacio { text-align: center; padding: var(--s64) var(--s16); border-radius: var(--r-card); background: var(--lienzo); }
.vacio h2 { margin-bottom: var(--s8); }
.vacio .btn { margin-top: var(--s24); }

/* ---------- Ficha de propiedad ---------- */
.ficha-cabecera { padding-top: var(--s24); }
.ficha-cabecera .ruta { color: var(--texto-2); margin-bottom: var(--s8); }
.ficha-cabecera .ruta a { color: var(--texto-2); }
.ficha-cabecera h1 { font-size: clamp(24px, 3vw, var(--t-h)); }
.ficha-sub { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s16); margin-top: var(--s8); color: var(--texto-2); }
.galeria { margin-top: var(--s24); display: grid; gap: var(--s8); border-radius: var(--r-card-lg); overflow: hidden; position: relative; }
.galeria-principal { aspect-ratio: 4 / 3; background: var(--muted); }
.galeria img { width: 100%; height: 100%; object-fit: cover; }
.galeria-principal button, .galeria-miniaturas button { padding: 0; border: 0; cursor: zoom-in; background: var(--muted); display: block; width: 100%; height: 100%; }
.galeria-miniaturas { display: none; }
.galeria-ver { position: absolute; right: var(--s16); bottom: var(--s16); z-index: 2; background: var(--blanco); color: var(--texto); border: 1px solid var(--texto); min-height: 36px; font-size: var(--t-body); }
@media (min-width: 744px) {
  .galeria { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: clamp(320px, 42vw, 520px); }
  .galeria-principal { grid-row: 1 / 3; aspect-ratio: auto; }
  .galeria-miniaturas { display: contents; }
}
.ficha-cuerpo { display: grid; gap: var(--s48); padding-block: var(--s32) var(--seccion); }
@media (min-width: 1024px) { .ficha-cuerpo { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s80); } }
.ficha-bloque { padding-block: var(--s32); border-bottom: 1px solid var(--linea); }
.ficha-bloque:first-child { padding-top: 0; }
.ficha-bloque h2 { margin-bottom: var(--s20); }
.datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s20) var(--s24); }
@media (min-width: 744px) { .datos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dato { display: flex; gap: var(--s12); align-items: flex-start; }
.dato i { width: 24px; font-size: 18px; color: var(--azul); margin-top: 2px; text-align: center; }
.dato small { display: block; color: var(--texto-2); }
.dato strong { font-size: var(--t-ui); font-weight: 600; }
.servicios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s16); list-style: none; padding: 0; margin: 0; }
.servicios li { display: flex; gap: var(--s12); align-items: center; font-size: var(--t-ui); }
.servicios i { width: 24px; color: var(--azul); text-align: center; }
.descripcion { font-size: var(--t-ui); line-height: 1.6; white-space: pre-line; max-width: 70ch; }
.mapa { height: 360px; border-radius: var(--r-card); overflow: hidden; background: var(--lienzo); z-index: 0; }
.panel-contacto {
  position: sticky; top: calc(var(--header) + var(--s24)); align-self: start;
  border: 1px solid var(--linea); border-radius: var(--r-card); padding: var(--s24); box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.panel-precio { font-size: var(--t-h-sm); font-weight: 600; letter-spacing: -.02em; }
.panel-precio small { font-size: var(--t-body); font-weight: 400; color: var(--texto-2); }
.panel-contacto form { margin-top: var(--s20); }
.panel-contacto .btn + .btn { margin-top: var(--s12); }
.panel-nota { margin-top: var(--s16); text-align: center; color: var(--texto-2); font-size: var(--t-small); }

/* Visor de fotos */
.visor { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.94); display: none; }
.visor.abierto { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; opacity: 1; transition: opacity 200ms var(--ease); }
@starting-style { .visor.abierto { opacity: 0; } }
.visor-barra { display: flex; justify-content: space-between; align-items: center; padding: var(--s16) var(--gutter); color: #fff; }
.visor-imagen { display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.visor-imagen img { max-height: calc(100dvh - 160px); max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-input); }
.visor-nav { display: flex; justify-content: center; gap: var(--s16); padding: var(--s16); }
.visor .btn-icono { background: rgba(255,255,255,.12); color: #fff; }
.visor .btn-icono:hover { background: rgba(255,255,255,.24); }

/* ---------- Formularios ---------- */
.formulario { display: grid; gap: var(--s16); }
.fila-2 { display: grid; gap: var(--s16); }
@media (min-width: 640px) { .fila-2 { grid-template-columns: 1fr 1fr; } .fila-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fila-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.campo { display: flex; flex-direction: column; gap: var(--s8); }
.campo > label, .campo > .etiqueta { font-size: var(--t-body); font-weight: 600; }
.campo small { color: var(--texto-2); font-size: var(--t-small); }
.control {
  width: 100%; min-height: 48px; padding: var(--s12) var(--s16); border: 1px solid var(--gris-500); border-radius: var(--r-input);
  background: var(--blanco); font-size: var(--t-ui); transition: border-color .15s, box-shadow .15s;
}
textarea.control { min-height: 120px; resize: vertical; line-height: 1.5; }
select.control { appearance: none; padding-right: 40px; background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.control::placeholder { color: var(--gris-500); }
.control:hover { border-color: var(--texto-2); }
.control:focus { outline: none; border-color: var(--texto); box-shadow: 0 0 0 1px var(--texto); }
.formulario-oscuro .control { border-color: var(--linea); }
.casillas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s12); }
@media (min-width: 640px) { .casillas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.casilla { display: flex; align-items: center; gap: var(--s12); min-height: 44px; padding: 0 var(--s12); border: 1px solid var(--linea); border-radius: var(--r-input); cursor: pointer; }
.casilla:has(input:checked) { border-color: var(--texto); background: var(--lienzo); }
.casilla input { width: 18px; height: 18px; accent-color: var(--azul); }
.trampa { position: absolute; left: -9999px; }

/* ---------- Avisos ---------- */
.avisos { display: grid; gap: var(--s8); margin-bottom: var(--s24); }
.aviso { display: flex; gap: var(--s12); align-items: flex-start; padding: var(--s16); border-radius: var(--r-card); background: var(--lienzo); font-size: var(--t-body); }
.aviso i { margin-top: 2px; }
.aviso-exito { background: #ecf7f1; color: #12512f; }
.aviso-error { background: #fdf0ef; color: #8a1c14; }
.aviso-info { background: var(--azul-050); color: var(--azul); }
.aviso-dorado { background: var(--dorado-050); color: #5c4618; }

/* ---------- Bloques de contenido ---------- */
.dividido { display: grid; gap: var(--s48); align-items: start; }
@media (min-width: 1024px) { .dividido { grid-template-columns: 1fr 1fr; gap: var(--s80); } }
.lista-ventajas { list-style: none; padding: 0; margin: var(--s32) 0 0; display: grid; gap: var(--s24); }
.lista-ventajas li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s16); }
.lista-ventajas i { width: 48px; height: 48px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--azul-050); color: var(--azul); font-size: 18px; }
.lista-ventajas strong { display: block; font-size: var(--t-ui); font-weight: 600; margin-bottom: 2px; }
.lista-ventajas p { color: var(--texto-2); }
.caja { background: var(--blanco); border-radius: var(--r-card); padding: var(--s24); border: 1px solid var(--linea); }
@media (min-width: 744px) { .caja { padding: var(--s32); } }
.franja { background: var(--azul); color: #fff; border-radius: var(--r-card-lg); padding: var(--s40) var(--s24); display: grid; gap: var(--s24); align-items: center; }
.franja h2 { color: #fff; }
.franja p { color: rgba(255,255,255,.82); margin-top: var(--s8); max-width: 52ch; }
@media (min-width: 900px) { .franja { grid-template-columns: 1fr auto; padding: var(--s48); } }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s24); }
.cifras div { border-top: 1px solid var(--linea); padding-top: var(--s16); }
.cifras strong { display: block; font-size: var(--t-h); font-weight: 700; letter-spacing: -.02em; color: var(--azul); }
.cifras span { color: var(--texto-2); }
.texto-legal { font-size: var(--t-ui); line-height: 1.7; max-width: 72ch; }
.texto-legal h2 { margin: var(--s40) 0 var(--s12); font-size: var(--t-sub); font-weight: 600; letter-spacing: -.01em; }
.texto-legal p + p, .texto-legal ul { margin-top: var(--s12); }
.nota-legal { font-size: var(--t-small); color: var(--texto-2); line-height: 1.6; }
.pagina-cabecera { padding-block: var(--s48) var(--s32); }
.pagina-cabecera p { margin-top: var(--s12); color: var(--texto-2); font-size: var(--t-ui); max-width: 60ch; }

/* ---------- Simulador ---------- */
.sim { display: grid; gap: var(--s32); }
@media (min-width: 1024px) { .sim { grid-template-columns: 1fr 420px; gap: var(--s48); } }
.sim-resultado { background: var(--azul); color: #fff; border-radius: var(--r-card-lg); padding: var(--s32); position: sticky; top: calc(var(--header) + var(--s24)); align-self: start; }
.sim-resultado small { color: rgba(255,255,255,.75); }
.sim-mensualidad { font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -.03em; margin: var(--s4) 0 var(--s24); color: #fff; }
.sim-fila { display: flex; justify-content: space-between; gap: var(--s16); padding: var(--s12) 0; border-top: 1px solid rgba(255,255,255,.14); }
.sim-barra { height: 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); overflow: hidden; margin: var(--s8) 0 var(--s24); }
.sim-barra span { display: block; height: 100%; width: 100%; background: var(--dorado); transform-origin: left; transform: scaleX(var(--pct, .2)); transition: transform 250ms var(--ease); }
input[type=range] { width: 100%; accent-color: var(--azul); margin-top: var(--s8); }
.tabla-scroll { overflow: auto; max-height: 460px; border: 1px solid var(--linea); border-radius: var(--r-card); }
.tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabla th, .tabla td { padding: var(--s12) var(--s16); text-align: right; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tabla th:first-child, .tabla td:first-child { text-align: left; }
.tabla thead th { position: sticky; top: 0; background: var(--blanco); font-size: var(--t-small); font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Pie de página ---------- */
.pie { background: var(--lienzo); border-top: 1px solid var(--linea); margin-top: var(--seccion); }
.pie-columnas { display: grid; gap: var(--s32); padding-block: var(--s48); }
@media (min-width: 744px) { .pie-columnas { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pie img { height: 64px; width: auto; }
.pie h3 { font-size: var(--t-body); font-weight: 600; margin-bottom: var(--s12); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s12); }
.pie a { color: var(--texto-2); text-decoration: none; }
.pie a:hover { color: var(--texto); text-decoration: underline; }
.pie-boletin { display: flex; gap: var(--s8); margin-top: var(--s12); }
.pie-boletin .control { min-height: 44px; }
.pie-boletin .btn { min-height: 44px; }
.pie-legal { border-top: 1px solid var(--linea); padding-block: var(--s24); display: flex; flex-wrap: wrap; gap: var(--s8) var(--s24); justify-content: space-between; color: var(--texto-2); }
.redes { display: flex; gap: var(--s4); }
.redes a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-pill); color: var(--texto); }
.redes a:hover { background: var(--linea); }

/* ---------- Flotantes ---------- */
.wa-flotante {
  position: fixed; right: var(--s16); bottom: var(--s16); z-index: 40; width: 56px; height: 56px; border-radius: var(--r-pill);
  background: #1fa855; color: #fff; display: grid; place-items: center; font-size: 28px; box-shadow: var(--sombra-menu); text-decoration: none;
  transition: transform 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .wa-flotante:hover { transform: scale(1.05); } }
.wa-flotante:active { transform: scale(.94); }
.cookies {
  position: fixed; left: var(--s16); right: var(--s16); bottom: var(--s16); z-index: 45; max-width: 560px;
  background: var(--blanco); border-radius: var(--r-card); box-shadow: var(--sombra-overlay); padding: var(--s20);
  display: none; gap: var(--s16); align-items: center;
}
.cookies.visible { display: flex; opacity: 1; transform: none; transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
@starting-style { .cookies.visible { opacity: 0; transform: translateY(16px); } }
.cookies p { font-size: var(--t-body); color: var(--texto-2); }
@media (max-width: 560px) { .cookies { flex-direction: column; align-items: stretch; } }


/* Galería que se adapta a la cantidad de fotos */
@media (min-width: 744px) {
  .galeria:not(:has(.galeria-miniaturas button)) { grid-template-columns: 1fr; height: clamp(320px, 42vw, 560px); }
  .galeria:has(.galeria-miniaturas button:only-child) { grid-template-columns: 2fr 1fr; }
  .galeria-miniaturas button:only-child { grid-row: 1 / 3; }
  .galeria:has(.galeria-miniaturas button:nth-child(2):last-child) { grid-template-columns: 2fr 1fr; }
  .galeria:has(.galeria-miniaturas button:nth-child(3):last-child) .galeria-miniaturas button:nth-child(3) { grid-column: 2 / 4; }
}
