/* ============================================================
   BASE ACCESIBLE — APPLE CLEAN VERSION
   ============================================================ */

:root {
  /* ===============================
     TIPOGRAFÍA — Apple-like
     =============================== */
  --fs-base-m: 16px;          /* Texto base móvil */
  --fs-base-d: 17px;          /* Texto base desktop Apple-like */
  --fs-h1-m: 1.9rem;
  --fs-h1-d: 2.15rem;

  /* ===============================
     LAYOUT
     =============================== */
  --container-max: 1200px;

  /* ===============================
     ESPACIADOS Y RADIOS
     =============================== */
  --gap: 14px;                /* separación estándar */
  --gap-lg: 22px;             /* separación grande */
  --radius: 14px;             /* esquinas suaves Apple */

  /* ===============================
     CAMPOS Y CONTROLES ESPECÍFICOS
     =============================== */
  --field-num-w: 180px;
  --field-name-min: 320px;

  /* ===============================
     CONTROLES (inputs/selects/buttons)
     =============================== */
  --control-h: 50px;          /* altura iOS */
  --control-py: 10px;
  --control-px: 14px;
  --control-radius: 12px;     /* Apple rounded */
  --control-fs: 1rem;
}

/* ============================================================
   ESCALADO RESPONSIVE ACCESIBLE
   ============================================================ */

html {
  font-size: var(--fs-base-m);
}

@media (min-width: 1024px) {
  html {
    font-size: var(--fs-base-d);
  }
}

/* ============================================================
   CUERPO — Apple-like limpio, alto contraste suave
   ============================================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol";
  background: #f5f5f7;            /* Apple soft grey */
  margin: 0;
  color: #1c1c1e;                 /* gris oscuro iOS, casi negro */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   CONTENEDOR PRINCIPAL — APPLE CLEAN DESIGN (sin animaciones)
   ============================================================ */

.container {
  width: min(100% - 48px, var(--container-max));
  margin: 48px auto;

  background: #ffffff;
  border-radius: 20px;

  /* Sombra Apple estilo macOS Sonoma */
  box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.06),
      0 2px 8px rgba(0, 0, 0, 0.04);

  padding: 48px 40px;
  text-align: center;
}

/* ============================
   Mobile-friendly refinements
   ============================ */
@media (max-width: 600px) {
  .container {
    margin: 20px auto;
    padding: 28px 22px;
    border-radius: 16px;

    /* Sombra más suave en móvil */
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.05),
        0 1px 4px rgba(0, 0, 0, 0.04);
  }
}

/* ===================== Logo ===================== */
.logo { width: 220px; height: auto; margin-bottom: 16px; }
@media (max-width:600px){ .logo { width: 170px; } }

/* ===================== Títulos y párrafos ===================== */
h1 {
  font-size: var(--fs-h1-m);
  color: #004b92;
  margin: 0 0 14px 0;
  line-height: 1.25;
  letter-spacing: .2px;
}
@media (min-width:1024px){ h1 { font-size: var(--fs-h1-d); } }

.intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #23384d;
  margin-bottom: 28px;
}

/* ===================== editar estancias ===================== */
.estancias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}


.btn-edit-estancias {
    padding: 10px 20px;
    font-size: 0.9rem;
    height: auto !important;
    min-width: auto !important;
}



/* ============================================================
   BOTONES <a> — base común
   ============================================================ */

   
a.btn,
a.btn-secondary,
a.btn-tertiary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    height: 52px;
    padding: 14px 26px;

    font-size: 1.05rem;
    font-weight: 600;

    border-radius: 14px;
    transition: all .25s ease;
}


/* ============================================================
   BOTÓN— Apple Blue UI (macOS / iOS)
   ============================================================ */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(180deg, #0a66d0 0%, #0054b3 100%);
  color: #ffffff;

  padding: 14px 28px;
  height: 52px;
  min-width: 148px;

  border-radius: 14px;
  border: none;

  font-size: 1.05rem;
  font-weight: 600;

  cursor: pointer;
  user-select: none;

  transition: 
      background .2s ease, 
      box-shadow .2s ease,
      transform .1s ease,
      opacity .2s ease;

  box-shadow: 0 4px 14px rgba(10, 102, 208, 0.18);
}

/* Hover primario */
button:hover,
.btn:hover {
  background: linear-gradient(180deg, #0c72e8 0%, #0063c9 100%);
  transform: translateY(-1px);
}

/* Active primario */
button:active,
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Disabled */
button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}


/* ============================================================
   BOTÓN PRIMARIO — Apple Grey Button
   ============================================================ */

.btn-primary {
    background: linear-gradient(180deg, #0a66d0 0%, #0054b3 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(10, 102, 208, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #0c72e8 0%, #0063c9 100%);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #f1f3f5;
    color: #1c2f43;
    border: 1px solid #cfd7df;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #e9edf2;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(1px);
}





/* ============================================================
   BOTÓN SECUNDARIO — Apple Grey Button
   ============================================================ */

a.btn-secondary {
    background: #f1f3f5;
    color: #1c2f43;
    border: 1px solid #cfd7df;
}

a.btn-secondary:hover {
    background: #e9edf2;
    transform: translateY(-1px);
}

a.btn-secondary:active {
    transform: translateY(1px);
}

/* ============================================================
   BOTÓN TERCIARIO — Gris-azul suave
   ============================================================ */

a.btn-tertiary {
    background: #cfdaee;
    color: #254a92;
    border: 1px solid #d8e4ff;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;

    height: 52px;
    padding: 14px 26px;
    min-width: 148px;

    font-size: 1.05rem;
    font-weight: 600;

    border-radius: 14px;
    transition: all .2s ease;
}

a.btn-tertiary:hover {
    background: #e8f1ff;
    border-color: #c6d8ff;
    transform: translateY(-1px);
}

a.btn-tertiary:active {
    background: #dce9ff;
    transform: translateY(1px);
    opacity: .85;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width:600px){
    .tabla th:nth-child(3),
    .tabla td:nth-child(3){
        white-space: nowrap;
    }
}







/* INPUT Apple Clean */
input[type="email"] {
    width: 260px;
    height: 48px;
    padding: 10px 14px;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #c5d7ec;
    background: #fff;
    font-family: inherit;
    transition: all .2s ease;
}

input[type="email"]:focus {
    border-color: #0a66d0;
    box-shadow: 0 0 0 3px rgba(10,102,208,.2);
    outline: none;
}







/* Nav */
.nav { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:26px; }

/* ===================== Tarjetas y campos ===================== */
.card{
  background:#fff;
  border:1px solid #d5e2f2;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  padding: 16px;
  text-align: left;
}

/* Campos base */
.field { text-align:left; }
.field label {
  font-size: 1rem;
  color:#1a2d42;
  display:block;
  margin-bottom: 8px;
  font-weight: 600;
}
.field input[type="text"],
.field input[type="number"],
.field select{
  width: 100%;
  box-sizing: border-box;
  height: var(--control-h);
  padding: var(--control-py) var(--control-px);
  line-height: calc(var(--control-h) - 2 * var(--control-py));
  border: 2px solid #c5d7ec;
  border-radius: var(--control-radius);
  background: #fff;
  font-size: var(--control-fs);
}
.field input::placeholder { color:#8aa1b9; }

.field--name{ min-width: var(--field-name-min); }
.field--num{ min-width: 120px; max-width: var(--field-num-w); }

/* Estados de error accesibles */
.err{ color:#b00020; margin:10px 0 0; font-weight:600; }
.invalid{ border-color:#b00020 !important; background:#fff5f5; }

/* ===================== Select estilizado ===================== */
.field select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2313263a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 22px 22px;
}
.field select:focus{ outline:none; border-color:#0a66d0; box-shadow:0 0 0 2px rgba(10,102,208,.15); }

/* ===================== Stepper (±) y números centrados ===================== */
/* Quitar spinners nativos */
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.field input[type="number"]{ -moz-appearance: textfield; appearance: textfield; }

/* Centrado de valor/placeholder (incluye Safari) */
.field input[type="number"],
.number-stepper input[type="number"]{ text-align: center !important; color:#111; }
.field input[type="number"]::placeholder,
.number-stepper input[type="number"]::placeholder{ text-align:center; }
.field input[type="number"]::-webkit-input-placeholder,
.number-stepper input[type="number"]::-webkit-input-placeholder{ text-align:center; }

/* Cápsula stepper */
.number-stepper{
  display: inline-flex;
  align-items: stretch;
  border: 2px solid #c5d7ec;
  border-radius: 10px;
  overflow: hidden;
  height: var(--control-h);
  background: #fff;
  width: auto;
  max-width: max-content;
  align-self: flex-start;
}
.number-stepper input[type=number]{
  border: 0 !important;
  height: auto;
  padding: 0 12px;
  width: 96px;
  font-size: var(--control-fs);
  color:#111;
}
.stepper-btn{
  width:44px; min-width:44px;
  border:0;
  background:#f2f6fb;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition:background .15s ease;
  appearance:none; -webkit-appearance:none;
  color:#111 !important; -webkit-text-fill-color:#111 !important;
}
.stepper-btn:hover{ background:#e6eef9; }
.stepper-btn:active{ background:#d9e7fb; }
.stepper-btn[disabled]{ opacity:.5; cursor:not-allowed; }
.stepper-icon{
  font-size:20px; font-weight:800; line-height:1; display:inline-block; transform: translateY(-1px);
  color:#111 !important; -webkit-text-fill-color:#111 !important;
}
@supports (-webkit-touch-callout: none){
  .stepper-btn, .stepper-btn .stepper-icon{ color:#111 !important; -webkit-text-fill-color:#111 !important; }
}

/* ===================== Grids de filtros ===================== */
/* Fila compacta para 2 campos (p.ej. Nº estancias + Altura si lo usas) */
.filters-row{
  display: grid;
  grid-template-columns: 260px 260px;
  column-gap: 80px;
  row-gap: 8px;
  justify-content: start;
  align-items: end;
}
@media (max-width: 680px){ .filters-row{ grid-template-columns: 1fr; } }

/* 3 columnas: Altura + Clima + Aislamiento (alineado arriba) */
.filters.three-cols{
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  column-gap: 24px;
  row-gap: 16px;
  align-items: start;          /* clave: alineado arriba */
}
@media (max-width: 1024px){
  .filters.three-cols{ grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 640px){
  .filters.three-cols{ grid-template-columns: 1fr; }
}
.filters.three-cols .field{ min-width: 240px; display:block; align-self:start; }
.filters.three-cols .number-stepper{ display:inline-flex; width:auto; }

/* ===================== Opciones como botones ===================== */
.options {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 0 auto 14px;
}
@media (min-width: 680px) { .options { grid-template-columns: 1fr 1fr; } }

.option-btn {
  display: inline-block;
  width: 100%;
  padding: 16px 18px;
  background: #e9f3ff;
  color: #0d2b56;
  border: 2px solid #c7dbf3;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all .2s ease;
  text-align: center;
}
.option-btn:hover { transform: translateY(-1px); }
.option-btn.selected {
  background: #0054b3; color: #fff; border-color: #00408c;
  box-shadow: 0 6px 16px rgba(0,64,140,.18);
}
.option-btn[disabled]{ background:#f3f6f9; color:#93a6b8; border-color:#e0e7f1; cursor:not-allowed; opacity:.8; pointer-events:none; }


/* ============================================================
   PASO AIRE 3 — TARJETAS CON IMAGEN (LAYOUT AISLADO)
   ============================================================ */

.options-aire3 {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto 18px;
}

.option-card-aire3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 16px;
  height: 100%;
  border: 2px solid #cfe3f8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.option-card-aire3:hover {
  transform: translateY(-1px);
}

.option-card-aire3.selected {
  border-color: #004b92;
  background: #e9f3ff;
  box-shadow: 0 4px 14px rgba(0,64,140,.15);
}

.option-card-aire3 img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 8px;
}

.option-card-aire3 .option-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.option-card-aire3 .option-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f2c54;
}

.option-card-aire3 .option-desc {
  font-size: 1rem;
  color: #3a5168;
  line-height: 1.45;
}

.option-card-aire3:focus-visible {
  outline: 3px solid #0a66d0;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .option-card-aire3 img {
    height: 150px;
    max-width: 260px;
  }
}




/* ===================== Tarjetas con imagen (paso 3) ===================== 
.options.cards{
  display:grid;
  gap:20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto 18px;
}
.option-card{
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align:center;
  padding:16px;
  height:100%;
  border:2px solid #cfe3f8;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  appearance:none; -webkit-appearance:none;
  box-shadow:none;
}
.option-card:hover{ transform: translateY(-1px); transition: transform .15s ease; }
.option-card.selected{ border-color:#004b92; background:#e9f3ff; box-shadow:0 4px 14px rgba(0,64,140,.15); }
.option-card img{
  display:block; width:100%; max-width: 320px; height: 180px;
  object-fit:contain; margin-bottom:12px; border-radius:8px;
}
.option-text{ display:flex; flex-direction:column; gap:6px; width:100%; }
.option-title{ font-weight:700; font-size:1.1rem; color:#0f2c54; }
.option-desc{ font-size:1rem; color:#3a5168; line-height:1.45; }
.option-card:focus-visible{ outline:3px solid #0a66d0; outline-offset:2px; }
@media (max-width: 480px){
  .option-card img{ height: 150px; max-width: 260px; }
}

*/

/* ============================================================
   FICHAS DE ESTANCIAS — APPLE CLEAN VERSION
   ============================================================ */

.room-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.room-row {
    display: grid;
    align-items: center;
    gap: 20px;
    grid-template-columns: 120px minmax(280px,1fr) 130px 130px auto;
    max-width: 1000px;
    margin: 0 auto;
}

/* Chip con el nombre de la estancia */
.room-chip {
    font-weight: 700;
    text-align: center;
    background: #f4f4f5;
    color: #333;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #dcdcde;
    font-size: 0.95rem;
}

/* m2 alineado */
.room-m2 {
    text-align: right;
    align-self: center;
}

/* Badge de superficie */
.m2-badge {
    background: #f1f1f3;
    color: #222;
    border: 1px solid #dedee0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 1rem;
    white-space: nowrap;
    font-weight: 600;
}

/* Nombre editable */
.field--name {
    min-width: 300px;
    max-width: 460px;
}

@media (max-width: 900px) {
    .room-row {
        grid-template-columns: 1fr;
    }
    .room-chip,
    .room-m2 {
        text-align: left;
    }
}

/* ============================================================
   RESUMEN / TOTALES — APPLE CLEAN
   ============================================================ */

.total-box {
    margin-top: 18px;
    text-align: right;
}

.total-box strong {
    background: #f4f4f5;
    border: 1px solid #e3e3e5;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-block;
    color: #222;
}


/* ============================================================
   MODAL CARRITO
   ============================================================ */

   .btn-add-cart {
    display:inline-block;
    padding:6px 12px;
    background:#ff6500;
    color:white !important;
    border-radius:4px;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    white-space:nowrap;
    transition:0.2s;
}

.btn-add-cart:hover {
    background:#0056b3;
}


.modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.modal-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 360px;
}
.modal-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}
.btn-ok { background: #005eb8; color:#fff; }
.btn-gray { background:#eee; color:#333; }


#modalCarrito {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.45);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
}
#modalCarrito .box {
    background:white;
    padding:25px;
    border-radius:8px;
    max-width:350px;
    text-align:center;
    box-shadow:0 4px 20px rgba(0,0,0,0.3);
}
#modalCarrito button {
    margin-top:15px;
    padding:10px 18px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    font-size:15px;
}
.btn-carrito {
    background:#005eb8;
    color:white;
}
.btn-seguir {
    background:#ccc;
}



/* ============================================================
   UTILIDADES
   ============================================================ */
.text-right { text-align: right; }
.text-left  { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }


/* ============================================================
   TABLA DE ESTANCIAS — APPLE CLEAN VERSION
   ------------------------------------------------------------
   Mantiene las columnas, anchos, spacing y estructura original,
   pero con estética iOS moderna, sombras suaves y mucha claridad.
   ============================================================ */

.tabla-estancias {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;            /* Espacio entre filas estilo Apple */
    font-size: 15px;
    margin: 20px 0 30px 0;
}

/* CABECERA */
.tabla-estancias thead th {
    background: #f4f4f5;              /* Apple-like light grey */
    color: #333;
    font-weight: 600;
    padding: 12px;
    text-align: center;
    font-size: 0.92rem;
    border-bottom: 1px solid #e5e5e7;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* FILAS */
.tabla-estancias tbody tr {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

/* CELDAS */
.tabla-estancias tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f2;
    font-size: 0.95rem;
}

/* Última celda sin borde (estético) */
.tabla-estancias tbody tr td:last-child {
    border-bottom: none;
}

/* ============================================================
   COLUMNAS ESPECÍFICAS (manteniendo tus anchos exactos)
   ============================================================ */

/* Estancia */
.tabla-estancias td:first-child,
.tabla-estancias th:first-child {
    text-align: left;
    width: 180px;
    font-weight: 600;
    color: #222;
}

/* Medidas */
.tabla-estancias td:nth-child(2),
.tabla-estancias th:nth-child(2) {
    text-align: center;
    width: 120px;
    color: #444;
}

/* Superficie */
.tabla-estancias td:nth-child(3),
.tabla-estancias th:nth-child(3) {
    text-align: right;
    width: 120px;
    color: #444;
}

/* Frigorías */
.tabla-estancias td:nth-child(4),
.tabla-estancias th:nth-child(4) {
    text-align: right;
    width: 150px;
    font-weight: 600;
    color: #111;
    letter-spacing: 0.3px;
}

/* ============================================================
   TABLA DE PROPUESTAS POR MARCA — APPLE CLEAN VERSION
   ============================================================ */

/* Contenedor general de la tabla */
.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}

/* CABECERA */
.tabla th {
    background: #f4f4f5; /* Apple-like light grey */
    padding: 12px 10px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #333;
    text-align: left;
    border-bottom: 1px solid #e5e5e7;
}

/* CELDAS */
.tabla td {
    padding: 14px 10px;
    border-bottom: 1px solid #eaeaeb;
    vertical-align: top;
    font-size: 0.95rem;
    color: #222;
}

/* -----------------------------------------
   COLUMNA MARCA (logo + badge)
   ----------------------------------------- */
.tabla td:first-child,
.tabla th:first-child {
    width: 210px;
    font-weight: 600;
    white-space: nowrap;
}

.marca-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marca-logo {
    max-height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
}

/* -----------------------------------------
   COLUMNA MODELOS
   ----------------------------------------- */
.tabla td:nth-child(2),
.tabla th:nth-child(2) {
    width: auto;
    text-align: left;
}

.producto-link {
    margin-bottom: 6px;
}

.producto-link a {
    color: #3a7afe;   /* azul pastel Apple-like */
    text-decoration: none;
    font-weight: 500;
}

.producto-link a:hover {
    text-decoration: underline;
}

.precio-modelo {
    color: #666;
    font-size: 0.85rem;
    margin-left: 4px;
    white-space: nowrap;
}

/* -----------------------------------------
   COLUMNA PRECIO TOTAL DESDE
   ----------------------------------------- */
.tabla td:nth-child(3),
.tabla th:nth-child(3) {
    width: 160px;
    text-align: right;
    white-space: nowrap;
}

.precio-desde {
    vertical-align: center !important;
}

.precio-wrap {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding-top: 20px;
    color: #111;
    font-weight: 700;
    font-size: 1rem;
}



/* ===================== Recomendados ===================== */
.legend { margin: 6px 0 12px; font-size:.92rem; color:#444; display:flex; gap:10px; align-items:center; }
  .badge-gama { display:inline-block; padding:2px 8px; border-radius:999px; font-size:.85rem; border:1px solid transparent; }
  .badge-gama.basica  { background:#e9f7ef; color:#166534; border-color:#b7e2c5; }   /* verde suave */
  .badge-gama.media   { background:#eef2ff; color:#1e3a8a; border-color:#c7d2fe; }   /* azul suave */
  .badge-gama.premium { background:#fff7ed; color:#9a3412; border-color:#fed7aa; }   /* ámbar suave */
  .badge-gama.na      { background:#f3f4f6; color:#374151; border-color:#e5e7eb; }   /* gris sin clasificar */

  /* Chip con lo que se ha seleccionado */

.chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .85rem;
    background: #eef2ff;        /* azul suave */
    color: #1e3a8a;              /* azul oscuro */
    border: 1px solid #c7d2fe;   /* borde azul claro */
}

/* Chip de enlace, con color propio y SIN subrayado */
.chip-enlace {
    display: inline-block;
    padding: 2px 8px ;
    border-radius: 999px;
    font-size: .85rem;
    background: #e0f7ff;        /* Azul más claro (diferente al chip normal) */
    color: #0369a1;             /* Azul más vivo */
    border: 1px solid #7dd3fc;  /* Borde turquesa claro */
    text-decoration: none !important;      /* Quitar subrayado */
}

.chip-enlace a {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}
/* Quitar subrayado incluso si el tag es <a> */
.chip-enlace:link,
.chip-enlace:visited {
    text-decoration: none !important;
}

/* Hover más visible */
.chip-enlace:hover {
    background: #bae6fd;
    border-color: #38bdf8;
    color: #075985;
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE — APPLE CLEAN
   ============================================================ */
@media (max-width: 768px) {

    /* El precio va más arriba para no generar mucho espacio */
    .precio-wrap { padding-top: 0; }

    /* Ocultar cabecera */
    .tabla thead {
        display: none;
    }

    /* Cada fila = tarjeta */
    .tabla tbody tr {
        display: block;
        background: white;
        padding: 14px;
        margin-bottom: 20px;
        border: 1px solid #dadbdd;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    }

    /* Celdas como bloques */
    .tabla tbody td {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
        border: none;
        font-size: 1rem;
    }

    /* Etiqueta del atributo */
    .tabla tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        margin-bottom: 4px;
    }

    /* Imagen de marca */
    .marca-logo {
        max-width: 180px;
        max-height: 90px;
        margin-left: auto;
        margin-top: 6px;
    }

    /* Modelos */
    .producto-link {
        margin-bottom: 6px;
    }

    /* Precio total estilo tarjeta destacada */
    .precio-desde {
        text-align: right !important;
        margin-top: 10px;
    }

    .precio-wrap {
        font-size: 1.35rem;
        font-weight: 800;
        color: #3a7afe; /* Apple accent blue */
    }

 


}

/* === TARJETAS DE OPCIÓN (RADIOS) === */

.options.cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.option-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 1rem;
    position: relative;
}

/* Ocultar input radio */
.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

/* Hover */
.option-card:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

/* Seleccionado */
.option-card:has(input[type="radio"]:checked) {
    border-color: #005eb8;
    background: #e8f2ff;
    box-shadow: 0 0 0 2px rgba(0,94,184,0.2);
    font-weight: bold;
}

.option-card span {
    width: 100%;
    text-align: center;
    color: #333;
}

/* === 2 COLUMNAS === */
.options.cards.two-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .options.cards.two-cols {
        grid-template-columns: 1fr;
    }
}

/* === 3 COLUMNAS === */
.options.cards.three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 640px) {
    .options.cards.three-cols {
        grid-template-columns: 1fr;
    }
}

/* Tarjeta compacta (altura ajustada) */
.option-card.compact {
    padding: 8px 12px !important;
    min-height: 2px;
}

/* separacion preguntas */
.question-block {
    margin-top: 36px;
}

/* Contenedor general del bloque */
#dimensiones-box {
    margin-top: 25px;
    padding: 0 20px;
}

/* Grid centrado de 3 columnas */
.dim-grid {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 0 auto;
    max-width: 900px;
}



/* Cada tarjeta de dimensión */
.input-card {
    flex: 1;
    background: #fff;
    border: 1px solid #ccd;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}


/* GRID DE DIMENSIONES */
.dim-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 900px;
    margin: 0 auto;
}

/* Tarjeta de input */
.input-card {
    background: #fff;
    border: 1px solid #ccd;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.input-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.2;
    word-break: break-word;
    white-space: normal;
}

@media (max-width: 768px) {
    .dim-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .dim-grid {
        grid-template-columns: 1fr;
    }
}


/* Label interior */
.input-card .input-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    color: #333;
    margin-bottom: 6px;
}

/* Input numérico */
.input-card input {
    width: 100%;
    max-width: 160px;          /* 🔥 Clave: No se sale */
    margin: 0 auto;            /* 🔥 Centrado dentro de la tarjeta */
    padding: 8px 10px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
    display: block;
}
/* GRID DE 4 COLUMNAS */
.options.cards.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* Móviles → 2 columnas */
@media (max-width: 768px) {
    .options.cards.four-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pantallas muy pequeñas → 1 columna */
@media (max-width: 480px) {
    .options.cards.four-cols {
        grid-template-columns: 1fr;
    }
}


/* --- GRID DE BAÑOS (4 columnas) --- */
.bath-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 auto 20px auto;
    max-width: 900px;        /* Mismo ancho que las tarjetas */
    width: 100%;
}

/* Tarjeta contenedora del baño */
.bath-option {
    background: #fff;
    border: 1px solid #ccd;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estado ACTIVO (cuando valor > 0) */
.bath-option.active {
    background: #e8f2ff;
    border-color: #005eb8;
    box-shadow: 0 0 0 2px rgba(0,94,184,0.18);
    font-weight: bold;
}

/* Texto del label (Aseo, Ducha, etc.) */
.bath-option span {
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
}

/* Select con estilo limpio y centrado */
.bath-option select {
    width: 80px;
    padding: 7px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    background: #fff;
}

/* Hover suave */
.bath-option:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

/* ============================
   RESPONSIVE GRID DE BAÑOS
   ============================ */

/* Tablets pequeñas y móvil */
@media (max-width: 768px) {
    .bath-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        max-width: 100%;
    }
}

/* Móviles muy pequeños (opcional, más compacto) */
@media (max-width: 420px) {
    .bath-option select {
        width: 100%;
    }
}





.error-title {
    color: #b00020 !important;
}

.input-error {
    border: 2px solid #d00 !important;
    background: #ffecec !important;
}

.tabla-potencias {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.05rem;
}

.tabla-potencias th,
.tabla-potencias td {
    padding: 12px 14px;
    border-bottom: 1px solid #e3e8ef;
    text-align: left;
}

.tabla-potencias th {
    width: 55%;
    color: #333;
    font-weight: 600;
}

.tabla-potencias td {
    text-align: right;
    color: #0056b3;
    font-weight: 600;
}

.fila-recomendada th,
.fila-recomendada td {
    background: #fff8d6;
    border-bottom: 2px solid #f0d97a;
    font-size: 1.15rem;
}

.acumulador-alert {
    margin-top: 18px;
    color: #b00020;
    font-weight: bold;
    font-size: 1.1rem;
}

/*modal filtro calderas*/

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 30px;
    max-width: 420px;
    width: 90%;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.hidden {
    display: none !important;
}

.modal-content .btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 52px;              /* 👈 ALTURA ÚNICA */
    margin: 12px 0;

    padding: 0 16px;           /* 👈 sin padding vertical */
    line-height: 1;            /* 👈 elimina “líneas fantasma” */
    white-space: nowrap;       /* 👈 evita salto de línea */

    box-sizing: border-box;

        font-size: 0.95rem;
    font-weight: 600;
}

/* Botones con doble línea */
.btn-opcion {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 60px;                 /* 👈 altura única */
    padding: 0 16px;
    text-align: center;
    white-space: normal;          /* 👈 ahora sí permitimos 2 líneas */
}

/* Línea principal */
.btn-opcion .btn-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Línea secundaria */
.btn-opcion .btn-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 2px;
}

.chips-gamas {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0 20px;
}

.chip-gama {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.chip-gama input {
    display: none;
}

/* estilos por gama */
.chip-gama.basica {
    background: #e9f7ef;
    color: #166534;
    border-color: #b7e2c5;
}

.chip-gama.media {
    background: #eef2ff;
    color: #1e3a8a;
    border-color: #c7d2fe;
}

.chip-gama.premium {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}


/* estado seleccionado – IGUAL que marcas */
.chip-gama:has(input:checked) {
    border-color: #005eb8;
    box-shadow: 0 0 0 2px rgba(0,94,184,.35);
    transform: scale(1.05);
}



.grid-marcas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin: 10px 0 20px;
}

.marca-logo-option {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: all .2s ease;
}

.marca-logo-option input {
    display: none;
}

.marca-logo-option img {
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
}

/* hover */
.marca-logo-option:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,.1);
}

/* seleccionada */
.marca-logo-option:has(input:checked) {
    border-color: #005eb8;
    box-shadow: 0 0 0 2px rgba(0,94,184,.35);
}


/* ===== RESUMEN SUPERIOR EN DOS COLUMNAS ===== */
.resumen-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

/* Columna izquierda */
.resumen-info {
    flex: 1;
}

/* Columna derecha */
.resumen-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}
.btn-editar-redondo {
    width: 65px;
    height: 65px;
    border-radius: 50%;

    background: #74b1f8;          /* Azul más suave */
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    text-decoration: none;

    box-shadow: 0 8px 20px rgba(31,122,224,0.35);
    transition: all 0.2s ease;
}

.btn-editar-redondo:hover {
    background: #1666c1;          /* Hover natural */
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(31,122,224,0.45);
}


.resumen-edit .edit-label {
    margin-top: 6px;
    font-size: 12px;
    color: #555;
}
@media (max-width: 768px) {
    .resumen-top {
        flex-direction: column;
        align-items: stretch;
    }

    .resumen-edit {
        align-items: center;
        margin-top: 10px;
    }
}

/* ===== MODELOS PROPUESTOS – CABECERA ===== */
.modelos-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin: 10px 0 20px;
}

.modelos-info {
    flex: 1;
}

.modelos-info p {
    margin: 0 0 6px;
    color: #333;
    font-size: .95rem;
    line-height: 1.45;
}

.modelos-subinfo {
    font-size: .85rem;
    color: #666;
}

.modelos-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
}


/* ===== BOTON DE AÑADIR INSTALACION ===== */

.instalacion-cta {
    margin: 20px auto 20px;      /* ⬅️ antes era mucho más */
    padding: 20px 10px;          /* ⬅️ más compacto */
   
    text-align: center;

    background: #f6f7f9;
    border: 1px solid #cfd6df;   /* ⬅️ borde gris medio */
    border-radius: 14px;
}

.instalacion-cta h3 {
    margin-bottom: 0px;
    font-size: 20px;
}

.instalacion-cta p {
    margin-bottom: 18px;
    font-size: 16px;          /* ⬅️ antes 14.5px */
    line-height: 1.5;         /* ⬅️ más aire */
    color: #333;              /* ⬅️ un poco más oscuro */
}


.btn-instalacion {
    display: inline-block;
    padding: 12px 24px;
    background: #0d6efd;
    color: #fff;
    border-radius: 26px;
    font-size: 15px;
    text-decoration: none;
    transition: all .2s ease;
}

.btn-instalacion:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

/* =====================================================
   PASO CALDERA MURAL 3 – MODALES INSTALACIÓN
===================================================== */

/* Overlay del modal */
.modal-step-cal3 {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

/* Modal activo */
.modal-step-cal3.active {
    display: flex;
}

/* Caja del modal */
.modal-content-cal3 {
    background: #fff;
    padding: 38px 42px;
    max-width: 640px;
    width: 95%;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 18px 45px rgba(0,0,0,0.18);
}

/* =====================
   TIPOGRAFÍA
===================== */

/* Títulos */
.modal-content-cal3 h3 {
    margin-bottom: 20px;
    font-size: 23px;
    font-weight: 600;
    color: #0b3c78;
}

/* Texto informativo */
.modal-content-cal3 p {
    font-size: 17.5px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: #333;
}

/* Labels */
.modal-content-cal3 label {
    display: block;
    text-align: left;
    margin: 10px 0;
    font-size: 17.5px;
    line-height: 1.4;
    cursor: pointer;
}

.modal-content-cal3 input[type="radio"] {
    margin-right: 8px;
}

/* =====================
   INPUTS Y SELECTS
===================== */

.modal-content-cal3 select,
.modal-content-cal3 input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 17.5px;
    margin-top: 10px;
}

/* =====================
   NAVEGACIÓN
===================== */

.cal3-nav {
    margin-top: 26px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

/* Botones */
.cal3-btn-primary,
.cal3-btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border-radius: 26px;
    font-size: 16.5px;
    cursor: pointer;
}

/* Botón principal */
.cal3-btn-primary {
    border: none;
    background: #0d6efd;
    color: #fff;
    transition: background .2s ease, transform .1s ease;
}

.cal3-btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

/* Botón secundario */
.cal3-btn-secondary {
    border: 1px solid #cfd6df;
    background: #f1f3f5;
    color: #333;
}

/* =====================
   BARRA DE PROGRESO
===================== */

.cal3-progress {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.cal3-progress span {
    width: 34px;
    height: 6px;
    background: #d0d6df;
    border-radius: 4px;
    transition: background .2s ease;
}

.cal3-progress span.active {
    background: #0d6efd;
}

/* =====================
   RESUMEN DINÁMICO (FONDO GRIS)
===================== */

.cal3-summary {
    margin: 28px auto 0;
    max-width: 740px;
    padding: 20px 24px;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 16px;
    color: #0b3c78;
}

.cal3-summary p {
    margin: 8px 0;
    font-size: 16.5px;
}
