/* TuReformaDeCasa — naranja de obra sobre azul marino; titulares Outfit, texto DM Sans */
:root {
  --marino: #0F2747; --marino-2: #17355E; --marino-3: #0B1D36;
  --naranja: #FF7A1A; --naranja-texto: #B8480A; --naranja-suave: #FFF0E3;
  --fondo: #F5F7FA; --tarjeta: #FFFFFF; --linea: #DDE3EA; --linea-fuerte: #C5CED9;
  --texto: #18222F; --suave: #4F5D6E; --titulo: #0F2747; --azul-suave: #E3EEFB;
  --ok: #17603A; --ok-fondo: #E4F4EA; --mal: #A32020; --mal-fondo: #FBE9E9;
  --display: 'Outfit', system-ui, sans-serif; --cuerpo: 'DM Sans', system-ui, sans-serif;
  --sombra: 0 12px 30px rgba(15, 39, 71, .10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #0B1626; --tarjeta: #13233A; --linea: #25385A; --linea-fuerte: #3A5078;
    --texto: #E8EEF6; --suave: #A9B8CC; --titulo: #FFFFFF; --azul-suave: #1F3A5F;
    --naranja-texto: #FF9B52; --naranja-suave: #33230F;
    --ok: #8EDBAE; --ok-fondo: #12301F; --mal: #FFA3A3; --mal-fondo: #3A1717;
    --sombra: 0 12px 30px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #0B1626; --tarjeta: #13233A; --linea: #25385A; --linea-fuerte: #3A5078;
  --texto: #E8EEF6; --suave: #A9B8CC; --titulo: #FFFFFF; --azul-suave: #1F3A5F;
  --naranja-texto: #FF9B52; --naranja-suave: #33230F;
  --ok: #8EDBAE; --ok-fondo: #12301F; --mal: #FFA3A3; --mal-fondo: #3A1717;
  --sombra: 0 12px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--cuerpo); font-size: 16px; line-height: 1.5; color: var(--texto); background: var(--fondo); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); color: var(--titulo); margin: 0; letter-spacing: -.01em; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0; }
a { color: var(--naranja-texto); }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; width: 100%; }
.estrecho { max-width: 760px; }
.seccion { padding-block: 40px; display: flex; flex-direction: column; gap: 24px; }
.pila { display: flex; flex-direction: column; gap: 16px; }
.pila-s { display: flex; flex-direction: column; gap: 8px; }
.fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.entre { justify-content: space-between; }
.suave { color: var(--suave); }
.peq { font-size: 14px; }
.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 12px; top: 12px; background: #fff; padding: 10px; z-index: 50; }

/* cabecera */
.cab { background: var(--marino); color: #fff; }
.cab-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 14px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 24px; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--naranja); }
.cab-nav { display: flex; flex-wrap: wrap; gap: 0 24px; flex: 1 1 300px; }
.cab-nav a, .cab-enlace { color: #fff; text-decoration: none; font-weight: 500; padding: 10px 0; }
.cab-nav a[aria-current] { color: var(--naranja); font-weight: 700; }
.cab-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.idioma { position: relative; }
.idioma summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 14px; border: 1px solid #5B7399; border-radius: 999px; font-weight: 500; text-transform: uppercase; }
.idioma summary::-webkit-details-marker { display: none; }
.idioma ul { position: absolute; right: 0; top: 50px; z-index: 30; margin: 0; padding: 8px; list-style: none; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra); min-width: 160px; }
.idioma li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--texto); text-decoration: none; }
.idioma li a:hover { background: var(--fondo); }
.globo { background: var(--naranja); color: var(--marino); border-radius: 999px; padding: 1px 8px; font-size: 13px; font-weight: 700; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; background: var(--naranja); color: var(--marino); transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-oscuro { background: var(--marino); color: #fff; }
.btn-linea { background: transparent; border-color: var(--titulo); color: var(--titulo); }
.btn-claro { background: #fff; color: var(--marino); }
.btn-linea-clara { background: transparent; border-color: #8FA5C4; color: #fff; }
.btn-peq { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-ancho { width: 100%; }
.btn-peligro { background: transparent; border-color: var(--mal); color: var(--mal); }
.enlace-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--naranja-texto); text-decoration: underline; cursor: pointer; min-height: 44px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-oscuro { background: var(--marino-2); } }
:root[data-theme="dark"] .btn-oscuro { background: var(--marino-2); }

/* formularios */
.campo { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; }
.campo label, .etiqueta { font-weight: 700; color: var(--titulo); font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--linea-fuerte); background: var(--tarjeta); color: var(--texto); font: inherit; }
textarea { resize: vertical; min-height: 120px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--naranja); flex: 0 0 20px; }
.marca { display: flex; gap: 10px; align-items: flex-start; }
.ayuda { font-size: 14px; color: var(--suave); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--linea-fuerte); background: var(--tarjeta); font-weight: 500; }
.chip input:checked + span { border-color: var(--naranja); background: var(--naranja-suave); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--naranja); outline-offset: 2px; }
.chip-enlace { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linea-fuerte); background: var(--tarjeta); color: var(--titulo); font-weight: 700; text-decoration: none; }
.chip-enlace[aria-current] { background: var(--marino); border-color: var(--marino); color: #fff; }

/* piezas */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 20px; padding: 24px; }
.tarjeta-grande { border-radius: 28px; padding: 32px; box-shadow: var(--sombra); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--azul-suave); color: var(--titulo); white-space: nowrap; }
.pill-naranja { background: var(--naranja); color: var(--marino); }
.pill-gris { background: var(--fondo); border: 1px solid var(--linea); color: var(--suave); }
.aviso { padding: 14px 18px; border-radius: 14px; font-weight: 500; background: var(--ok-fondo); color: var(--ok); }
.aviso-error { background: var(--mal-fondo); color: var(--mal); }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.rejilla-s { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.sigla { flex: 0 0 auto; width: 88px; height: 88px; border-radius: 18px; background: var(--marino); color: var(--naranja); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 30px; object-fit: cover; }
.fotos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fotos img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; width: 100%; }
.fotos label { position: relative; display: block; }
.fotos label input { position: absolute; top: 8px; left: 8px; }

/* portada */
.portada { background: var(--marino); color: #fff; }
.portada-fila { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-block: 48px 72px; }
.portada h1 { color: #fff; font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -.02em; }
.portada h1 span, .acento { color: var(--naranja); }
.portada p.entrada { font-size: 19px; color: #C9D5E6; max-width: 560px; }
.buscador { background: #fff; border-radius: 20px; padding: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; box-shadow: 0 18px 40px rgba(4, 16, 36, .35); }
.buscador label { color: #0F2747; }
.buscador input, .buscador select { background: #fff; color: #18222F; border-color: #C5CED9; }
.buscador .btn { border-radius: 12px; }
.comparador { --pos: 50%; position: relative; flex: 1 1 360px; min-width: 0; aspect-ratio: 1200 / 670; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px rgba(4, 16, 36, .45); background: #2A4670; touch-action: pan-y; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-antes { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-etiqueta { position: absolute; top: 14px; padding: 6px 14px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .02em; pointer-events: none; }
.cmp-et-antes { left: 14px; background: var(--marino); color: #fff; }
.cmp-et-despues { right: 14px; background: var(--naranja); color: var(--marino); }
.cmp-linea { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .35); pointer-events: none; }
.cmp-linea i { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--naranja); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.cmp-linea i::before, .cmp-linea i::after { content: ''; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.cmp-linea i::before { left: 6px; border-right-color: var(--marino); border-left-width: 0; }
.cmp-linea i::after { right: 6px; border-left-color: var(--marino); border-right-width: 0; }
.cmp-rango { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.comparador:has(.cmp-rango:focus-visible) { outline: 3px solid var(--naranja); outline-offset: 3px; }
.caja-enlace { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--tarjeta); border: 1px solid var(--linea); color: var(--titulo); font-weight: 500; text-decoration: none; }
.caja-enlace:hover, .grupo:hover { border-color: var(--naranja); }
.grupo { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--tarjeta); border: 1px solid var(--linea); text-decoration: none; color: var(--texto); }
.grupo .icono { width: 48px; height: 48px; border-radius: 14px; background: var(--naranja-suave); display: flex; align-items: center; justify-content: center; color: var(--naranja-texto); }
.paso-num { font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--naranja-texto); line-height: 1; }
.banda { background: var(--marino); color: #fff; border-radius: 28px; padding: 40px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.banda h2, .banda h1 { color: #fff; }
.banda p { color: #C9D5E6; }
.banda-suave { background: var(--naranja-suave); color: var(--texto); border-radius: 20px; padding: 24px; }
.progreso { height: 10px; border-radius: 999px; background: var(--linea); overflow: hidden; }
.progreso > div { height: 100%; background: var(--naranja); border-radius: 999px; transition: width .3s ease; }
.banda .progreso { background: var(--marino-2); }

/* listados */
.resultado { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.resultado .cuerpo { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.resultado .lado { flex: 1 1 170px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dos-col { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.dos-col > .principal { flex: 999 1 560px; min-width: 0; }
.dos-col > .lateral { flex: 1 1 300px; min-width: 0; }
.menu-panel { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.menu-panel a { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 0 14px; border-radius: 12px; color: var(--titulo); font-weight: 700; text-decoration: none; }
.menu-panel a[aria-current] { background: var(--marino); color: #fff; }
dl.datos { margin: 0; display: flex; flex-direction: column; gap: 10px; }
dl.datos div { display: flex; justify-content: space-between; gap: 12px; }
dl.datos dt { color: var(--suave); }
dl.datos dd { margin: 0; font-weight: 500; text-align: right; }
.burbuja { max-width: min(560px, 88%); padding: 12px 16px; border-radius: 18px; background: var(--tarjeta); border: 1px solid var(--linea); white-space: pre-wrap; overflow-wrap: anywhere; }
.burbuja.mia { align-self: flex-end; background: var(--marino); color: #fff; border-color: var(--marino); }
.burbuja time { display: block; font-size: 12px; opacity: .75; margin-top: 4px; }
.tabla-caja { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { color: var(--suave); font-weight: 700; white-space: nowrap; }
.texto-largo { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 68ch; }
.precio { font-family: var(--display); font-weight: 700; font-size: 52px; color: var(--titulo); line-height: 1; }
.lista-check { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lista-check li { display: flex; gap: 10px; }
.lista-check li::before { content: ''; flex: 0 0 22px; height: 22px; margin-top: 1px; background: var(--naranja-texto); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%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' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }
.plan-pro { border: 3px solid var(--naranja); }
[hidden] { display: none !important; }

/* pie y barra inferior de móvil */
.pie { background: var(--marino-3); color: #C9D5E6; margin-top: 48px; }
.pie-fila { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; padding-block: 36px; font-size: 14px; }
.pie a { color: #C9D5E6; }
.pie .fila { gap: 6px 20px; }
.barra-movil { display: none; }
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 560px; margin-inline: auto; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: 18px; padding: 16px; box-shadow: var(--sombra); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 14px; }
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .cab-nav { display: none; }
  .tarjeta-grande, .banda { padding: 22px; }
  .portada-fila { padding-block: 28px 40px; gap: 28px; }
  body { padding-bottom: 68px; }
  .barra-movil { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; background: var(--tarjeta); border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom); }
  .barra-movil a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font-size: 12px; font-weight: 700; color: var(--suave); text-decoration: none; }
  .barra-movil a[aria-current] { color: var(--naranja-texto); }
  .cookies { bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* estrellas doradas */
:root { --oro: #F5B301; --oro-hueco: #C5CED9; }
[data-theme="dark"] { --oro-hueco: #3A5078; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --oro-hueco: #3A5078; } }
.estrellas { --r: 0%; position: relative; display: inline-block; white-space: nowrap; line-height: 1; letter-spacing: 1px; color: var(--oro-hueco); font-size: 18px; vertical-align: -2px; }
.estrellas > span { display: block; }
.estrellas::after { content: '★★★★★'; position: absolute; left: 0; top: 0; width: var(--r); overflow: hidden; color: var(--oro); text-shadow: 0 0 1px rgba(160, 110, 0, .5); }
.estrellas.est-grande { font-size: 28px; }
.banda .estrellas, .portada .estrellas { --oro-hueco: #5B7399; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dar-estrellas { border: 0; padding: 0; margin: 0; min-width: 0; }
.dar-estrellas legend { padding: 0; margin-bottom: 6px; }
.dar-fila { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.dar-fila input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dar-fila label { position: relative; font-size: 44px; line-height: 1; cursor: pointer; color: var(--oro-hueco); padding: 2px 3px; min-width: 44px; min-height: 44px; text-align: center; transition: transform .1s; }
.dar-fila label:hover, .dar-fila label:hover ~ label, .dar-fila input:checked ~ label { color: var(--oro); text-shadow: 0 0 1px rgba(160, 110, 0, .5); }
.dar-fila label:hover { transform: scale(1.12); }
.dar-fila input:focus-visible + label { outline: 3px solid var(--naranja); outline-offset: 2px; border-radius: 10px; }
.resumen-notas { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.resumen-media { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 120px; }
.resumen-media b { font-family: var(--display); font-size: 52px; line-height: 1; color: var(--titulo); }
.resumen-barras { flex: 1 1 240px; display: grid; gap: 6px; }
.barra-nota { display: grid; grid-template-columns: 34px 1fr 28px; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; }
.barra-fondo { height: 10px; border-radius: 999px; background: var(--linea); overflow: hidden; }
.barra-oro { display: block; height: 100%; border-radius: 999px; background: var(--oro); }
.caja-valorar { border: 1px solid var(--linea); background: var(--fondo); border-radius: 18px; padding: 18px; display: grid; gap: 10px; }
.aviso-info { background: var(--azul-suave); border-radius: 12px; padding: 12px 14px; margin: 0; }

/* entrar con Google y captcha */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 999px; background: #fff; color: #1F1F1F; border: 1px solid #C5CED9; font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.btn-google:hover { border-color: #4285F4; box-shadow: 0 2px 8px rgba(66, 133, 244, .25); }
.btn-google:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.separador { display: flex; align-items: center; gap: 12px; color: var(--suave); font-size: 14px; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.cf-turnstile { min-height: 0; }
.aviso-ok { background: var(--ok-fondo); color: var(--ok); }

.toque { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 60; background: #0F2747; color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.3); max-width: min(520px, calc(100% - 32px)); font-weight: 500; }
#pagina { display: flex; flex-direction: column; flex: 1; }
