/*!
 * pdm-cotizador.css — cotizador de lote + casa para palmasdemallorca.co
 *
 * Acompana a pdm-cotizador.js. Todo cuelga de .pdm-cot para no chocar con
 * Tailwind.
 *
 * Va en negativo —fondo tinta, tarjeta translucida, resumen en crema— porque
 * es el unico bloque de la pagina que no es lectura sino herramienta: partir
 * la crema en dos le da respiro al recorrido y deja claro que aqui se hace
 * algo. La paleta es la misma del sitio (tinta, crema, oro), solo cambiados
 * los papeles. Para volverlo claro basta con invertir este bloque de :root.
 */

.pdm-cot {
  --oro: #c8a96e;
  --oro-claro: #e2c992;
  --oro-hondo: #9e7f45;
  --crema: #f5f3ee;
  --crema-alta: #ede9e0;
  --borde-claro: #d8d4ca;
  --tinta: #12100d;
  --apagado: #7a736a;

  /* Sobre el fondo oscuro */
  --texto: #efece6;
  --texto-tenue: rgba(239, 236, 230, .62);
  --texto-debil: rgba(239, 236, 230, .45);
  --linea: rgba(255, 255, 255, .10);
  --relleno: rgba(255, 255, 255, .04);

  position: relative;
  z-index: 3;
  overflow: hidden;
  padding: 120px 60px 130px;
  background: var(--tinta);
  color: var(--texto);
  font-family: var(--font-body), "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.pdm-cot *,
.pdm-cot *::before,
.pdm-cot *::after { box-sizing: border-box; }

/* Dos halos tenues para que el negro no quede plano detras de las tarjetas */
.pdm-cot::before,
.pdm-cot::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.pdm-cot::before {
  top: -280px; left: -220px; width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(200, 169, 110, .16), transparent 68%);
}
.pdm-cot::after {
  bottom: -340px; right: -260px; width: 820px; height: 820px;
  background: radial-gradient(circle, rgba(200, 169, 110, .10), transparent 70%);
}

.pdm-cot__inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }

/* ---- Encabezado ---- */
.pdm-cot__head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.pdm-cot__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: var(--oro); margin-bottom: 22px;
}
.pdm-cot__eyebrow::before,
.pdm-cot__eyebrow::after {
  content: ''; width: 34px; height: 1px; background: var(--oro-hondo);
}
.pdm-cot__title {
  margin: 0 0 20px;
  font-family: var(--font-display), "Playfair Display", Georgia, serif;
  font-weight: 400; font-size: clamp(34px, 5vw, 60px); line-height: 1.08;
  letter-spacing: -.01em; color: #fff;
}
.pdm-cot__title em { font-style: italic; color: var(--oro); }
.pdm-cot__sub { margin: 0; font-size: 16px; line-height: 1.7; color: var(--texto-tenue); }

/* ---- Rejilla ---- */
.pdm-cot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 26px;
  align-items: start;
}

.pdm-cot__card {
  background: var(--relleno);
  border: 1px solid var(--linea);
  padding: 38px 34px;
  backdrop-filter: blur(6px);
}

/* ---- Pasos ---- */
.pdm-cot__paso + .pdm-cot__paso {
  margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--linea);
}
.pdm-cot__paso-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pdm-cot__num {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--oro-hondo); color: var(--oro);
  font-family: var(--font-display), "Playfair Display", Georgia, serif;
  font-size: 13px; letter-spacing: .04em;
}
.pdm-cot__paso-titulo {
  margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .01em; color: #fff;
}
.pdm-cot__paso-nota { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--texto-tenue); }

/* ---- Deslizadores ---- */
.pdm-cot__campo + .pdm-cot__campo { margin-top: 26px; }
.pdm-cot__campo-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.pdm-cot__campo-label {
  font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--texto-debil);
}
.pdm-cot__campo-valor {
  font-family: var(--font-display), "Playfair Display", Georgia, serif;
  font-size: 26px; color: #fff; font-variant-numeric: tabular-nums; line-height: 1;
}
.pdm-cot__campo-valor small {
  font-family: var(--font-body), "DM Sans", sans-serif;
  font-size: 12px; font-weight: 400; color: var(--texto-debil); margin-left: 4px;
}

.pdm-cot input[type=range] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 22px; margin: 0; padding: 0;
  background: transparent; border: 0; cursor: pointer;
}
.pdm-cot input[type=range]::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--oro) 0 var(--p, 30%), rgba(255, 255, 255, .14) var(--p, 30%) 100%);
}
.pdm-cot input[type=range]::-moz-range-track {
  height: 3px;
  background: linear-gradient(90deg, var(--oro) 0 var(--p, 30%), rgba(255, 255, 255, .14) var(--p, 30%) 100%);
}
.pdm-cot input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%;
  background: var(--crema); border: 1px solid var(--oro);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s;
}
.pdm-cot input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--crema); border: 1px solid var(--oro);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.pdm-cot input[type=range]:hover::-webkit-slider-thumb,
.pdm-cot input[type=range]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.12); box-shadow: 0 0 0 6px rgba(200, 169, 110, .22);
}
.pdm-cot input[type=range]:focus-visible { outline: none; }

.pdm-cot__escala {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: .04em; color: var(--texto-debil); margin-top: 6px;
}

/* ---- Fichas ---- */
.pdm-cot__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pdm-cot__chip {
  flex: 1 1 auto; min-width: 108px;
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 11px 14px; cursor: pointer;
  background: var(--relleno); border: 1px solid var(--linea);
  color: var(--texto); font-family: inherit; font-size: 13px; font-weight: 500; text-align: left;
  transition: border-color .25s, background .25s, color .25s;
}
.pdm-cot__chip small { font-size: 11px; font-weight: 400; color: var(--texto-debil); line-height: 1.35; }
.pdm-cot__chip:hover { border-color: var(--oro); }
.pdm-cot__chip[aria-pressed="true"] {
  background: var(--oro); border-color: var(--oro); color: var(--tinta);
}
.pdm-cot__chip[aria-pressed="true"] small { color: rgba(18, 16, 13, .7); }

/* ---- Interruptor de la casa ---- */
.pdm-cot__switch {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; cursor: pointer; text-align: left;
  background: var(--relleno); border: 1px solid var(--linea);
  color: var(--texto); font-family: inherit;
  transition: border-color .25s, background .25s;
}
.pdm-cot__switch:hover { border-color: var(--oro); }
.pdm-cot__switch[aria-pressed="true"] { border-color: var(--oro); background: rgba(200, 169, 110, .12); }
.pdm-cot__switch-pista {
  flex: 0 0 auto; position: relative; width: 42px; height: 24px; border-radius: 99px;
  background: rgba(255, 255, 255, .16); transition: background .25s;
}
.pdm-cot__switch-pista::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--crema); box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.pdm-cot__switch[aria-pressed="true"] .pdm-cot__switch-pista { background: var(--oro); }
.pdm-cot__switch[aria-pressed="true"] .pdm-cot__switch-pista::after { transform: translateX(18px); }
.pdm-cot__switch-txt { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 500; }
.pdm-cot__switch-txt span { font-size: 12px; font-weight: 400; color: var(--texto-tenue); }

.pdm-cot__casa { margin-top: 24px; }
.pdm-cot__casa[hidden] { display: none; }

/* ---- Resumen ----
 * En crema sobre el fondo tinta: es el dato que el visitante vino a buscar,
 * asi que es lo unico que se ilumina en toda la seccion. */
.pdm-cot__resumen {
  position: sticky; top: 110px;
  background: var(--crema);
  border: 1px solid var(--borde-claro);
  padding: 34px 30px 30px;
  color: var(--tinta);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .8);
}
.pdm-cot__resumen-label {
  display: block; font-size: 10px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--oro-hondo); margin-bottom: 12px;
}
.pdm-cot__cuota {
  margin: 0;
  font-family: var(--font-display), "Playfair Display", Georgia, serif;
  font-size: clamp(38px, 4.6vw, 52px); line-height: 1.05; color: var(--tinta);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.pdm-cot__cuota-pie { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--apagado); }
.pdm-cot__cuota-pie b { color: var(--oro-hondo); font-weight: 500; }

.pdm-cot__barra {
  display: flex; height: 6px; margin: 26px 0 12px; overflow: hidden;
  background: var(--borde-claro);
}
.pdm-cot__barra i { display: block; height: 100%; transition: width .4s cubic-bezier(.16, 1, .3, 1); }
.pdm-cot__barra .sep { background: var(--oro-claro); }
.pdm-cot__barra .ini { background: var(--oro); }
.pdm-cot__barra .lote { background: var(--oro-hondo); }
.pdm-cot__barra .casa { background: #b3aca2; }

.pdm-cot__leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--apagado); }
.pdm-cot__leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.pdm-cot__leyenda em { width: 8px; height: 8px; }
.pdm-cot__leyenda .sep em { background: var(--oro-claro); }
.pdm-cot__leyenda .ini em { background: var(--oro); }
.pdm-cot__leyenda .lote em { background: var(--oro-hondo); }
.pdm-cot__leyenda .casa em { background: #b3aca2; }

.pdm-cot__filas { margin: 26px 0 0; padding: 0; }
.pdm-cot__fila {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--borde-claro);
}
.pdm-cot__fila dt { margin: 0; font-size: 14px; color: var(--tinta); }
.pdm-cot__fila dt small { display: block; font-size: 11px; color: var(--apagado); margin-top: 2px; }
.pdm-cot__fila dd {
  margin: 0; font-size: 14px; font-weight: 500; color: var(--tinta);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pdm-cot__fila--total dt,
.pdm-cot__fila--total dd { color: var(--oro-hondo); font-size: 16px; font-weight: 500; }

/* ---- Acciones ---- */
.pdm-cot__wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 26px; padding: 16px 20px;
  background: var(--oro); color: #fff; text-decoration: none;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.pdm-cot__wa:hover { background: var(--oro-hondo); color: #fff; }
.pdm-cot__wa svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }

.pdm-cot__ver {
  display: block; width: 100%; margin-top: 10px; padding: 13px 16px; cursor: pointer;
  background: transparent; border: 1px solid var(--borde-claro);
  color: var(--apagado); font-family: inherit;
  font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  transition: border-color .3s, color .3s;
}
.pdm-cot__ver:hover { border-color: var(--oro); color: var(--oro-hondo); }

/* ---- Plan mes a mes ---- */
.pdm-cot__plan { margin-top: 16px; }
.pdm-cot__plan[hidden] { display: none; }
.pdm-cot__plan-scroll { max-height: 340px; overflow: auto; border: 1px solid var(--borde-claro); }
.pdm-cot__plan table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pdm-cot__plan th {
  position: sticky; top: 0; z-index: 1;
  background: var(--crema-alta); padding: 10px 12px; text-align: left;
  font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--oro-hondo);
}
.pdm-cot__plan td {
  padding: 10px 12px; border-top: 1px solid var(--borde-claro);
  color: var(--tinta); font-variant-numeric: tabular-nums;
}
.pdm-cot__plan td:last-child { text-align: right; white-space: nowrap; }
.pdm-cot__etq {
  display: inline-block; margin-left: 8px; padding: 2px 7px;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
}
.pdm-cot__etq--lote { background: rgba(200, 169, 110, .28); color: var(--oro-hondo); }
.pdm-cot__etq--casa { background: var(--crema-alta); color: var(--apagado); }

.pdm-cot__legal {
  max-width: 900px; margin: 40px auto 0; text-align: center;
  font-size: 12px; line-height: 1.7; color: var(--texto-debil);
}

/* ---- Adaptable ---- */
@media (max-width: 1024px) {
  .pdm-cot { padding: 90px 30px 100px; }
  .pdm-cot__grid { grid-template-columns: minmax(0, 1fr); }
  .pdm-cot__resumen { position: static; }
}
@media (max-width: 767px) {
  .pdm-cot { padding: 70px 20px 80px; }
  .pdm-cot__card { padding: 28px 20px; }
  .pdm-cot__resumen { padding: 28px 22px 24px; }
  .pdm-cot__chip { min-width: calc(50% - 4px); }
  .pdm-cot__head { margin-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdm-cot *, .pdm-cot *::before, .pdm-cot *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}

/* ==================================================================== *
 * Tamano compacto.
 *
 * Venia con la escala de una pagina entera (titular de 60px, 130px de aire
 * arriba y abajo, tarjetas de 38px de relleno) y pesaba mas que cualquier
 * otra seccion. Se comprime para que sea una herramienta dentro de la
 * pagina y no el centro de gravedad.
 * ==================================================================== */
.pdm-cot { padding: 84px var(--margen, 60px) 92px; }
.pdm-cot__inner { max-width: 1080px; }
.pdm-cot__head { margin-bottom: 40px; max-width: 620px; }
.pdm-cot__title { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 14px; }
.pdm-cot__sub { font-size: 15px; }
.pdm-cot__eyebrow { margin-bottom: 16px; }
.pdm-cot__grid { gap: 20px; }
.pdm-cot__card { padding: 28px 26px; }
.pdm-cot__paso + .pdm-cot__paso { margin-top: 22px; padding-top: 22px; }
.pdm-cot__paso-head { margin-bottom: 16px; }
.pdm-cot__campo + .pdm-cot__campo { margin-top: 20px; }
.pdm-cot__campo-valor { font-size: 22px; }
.pdm-cot__resumen { padding: 26px 24px 24px; top: 80px; }
.pdm-cot__cuota { font-size: clamp(32px, 3.4vw, 42px); }
.pdm-cot__filas { margin-top: 18px; }
.pdm-cot__fila { padding: 10px 0; }
.pdm-cot__wa { margin-top: 18px; padding: 14px 18px; }
.pdm-cot__legal { margin-top: 28px; font-size: 11px; }

@media (max-width: 767px) {
  .pdm-cot { padding: 64px var(--margen, 60px) 70px; }
}

/* Las etiquetas "lote"/"casa" del plan mes a mes iban a 9px: en un telefono
   no se leen. */
@media (max-width: 767px) {
  .pdm-cot__etq { font-size: 10px; }
}
