/* ==========================================================
   Reforzara — página «Pide tu presupuesto»
   Asistente por pasos a pantalla completa, distinto de la portada:
   panel oscuro con el progreso y el resumen a la izquierda,
   y la pregunta de cada paso a la derecha.
   ========================================================== */

body.pp { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.pp-app {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Panel lateral ---------- */
.pp-lado {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--dark);
  color: var(--dark-ink);
  padding: 34px 38px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.pp-lado::before {
  content: "";
  position: absolute;
  inset: auto -30% -20% -30%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(200, 119, 61, .32), transparent 70%);
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}
.pp-marca { display: flex; align-items: center; gap: 10px; color: #fff; }
.pp-marca img { height: 28px; width: auto; }
.pp-marca span { font-weight: 800; letter-spacing: .06em; font-size: 17px; }
.pp-lado h1 {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 46px 0 10px;
}
.pp-lado h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: brightness(1.35); }
.pp-lado > p { color: #b5aca4; font-size: 16px; }

.pp-pasos { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 4px; }
.pp-pasos li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #8f857c;
  font-size: 15px;
  font-weight: 500;
  transition: background .3s, color .3s;
}
.pp-pasos li b {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  box-shadow: inset 0 0 0 1.5px #4a3f37;
  transition: background .3s, box-shadow .3s;
}
.pp-pasos li.actual { background: rgba(255, 255, 255, .07); color: #fff; }
.pp-pasos li.actual b { box-shadow: inset 0 0 0 1.5px #e5a57a; color: #e5a57a; }
.pp-pasos li.hecho { color: #d8cfc7; cursor: pointer; }
.pp-pasos li.hecho:hover { background: rgba(255, 255, 255, .04); }
.pp-pasos li.hecho b { background: var(--brand); box-shadow: none; color: #fff; font-size: 0; }
.pp-pasos li.hecho b::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }

.pp-resumen {
  margin-top: 30px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.pp-resumen h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #8f857c; margin-bottom: 12px; }
.pp-resumen dl { margin: 0; display: grid; gap: 8px; }
.pp-resumen dl div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.pp-resumen dt { color: #8f857c; }
.pp-resumen dd { margin: 0; text-align: right; color: #f5f2ee; font-weight: 500; }
.pp-resumen .vacio { color: #6f665e; font-size: 14px; }

.pp-confianza { margin-top: auto; padding-top: 30px; display: grid; gap: 10px; font-size: 14px; color: #b5aca4; }
.pp-confianza span { display: flex; align-items: center; gap: 10px; }
.pp-confianza svg { color: #e5a57a; flex: none; }
.pp-contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.pp-llamar { padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #b5aca4; font-size: 13px; line-height: 1.3; transition: background .2s; }
.pp-llamar b { display: block; color: #fff; font-size: 15px; white-space: nowrap; }
@media (max-width: 1100px) { .pp-llamar { padding: 10px 11px; } .pp-llamar b { font-size: 14px; } .pp-wa { gap: 7px; } }
.pp-llamar:hover { background: rgba(255, 255, 255, .1); }
.pp-wa { display: flex; align-items: center; gap: 10px; }
.pp-wa svg { width: 24px; height: 24px; }
.pp-wa svg { color: #25d366; flex: none; }

/* Pantallas de poca altura (portátiles): el panel cabe sin scroll */
@media (max-height: 860px) and (min-width: 881px) {
  .pp-lado h1 { font-size: 29px; margin-top: 30px; }
  .pp-pasos { margin-top: 22px; }
  .pp-pasos li { padding: 7px 12px; }
  .pp-resumen { margin-top: 18px; padding: 16px; }
  .pp-confianza { padding-top: 18px; gap: 7px; font-size: 13.5px; }
}

/* ---------- Zona principal ---------- */
.pp-main { display: flex; flex-direction: column; min-width: 0; }
.pp-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 40px 0;
}
.pp-salir { font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.pp-salir:hover { color: var(--ink); }
.pp-top .pp-marca { display: none; }
.pp-progreso { display: none; }

.pp-form { flex: 1; display: flex; flex-direction: column; }
.pp-form[hidden] { display: none; }
.pp-paso {
  display: none;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 6vh 40px 40px;
  animation: entra .5s var(--ease);
}
.pp-paso.activo { display: block; }
.pp-paso.atras { animation-name: entraAtras; }
@keyframes entra { from { opacity: 0; transform: translateX(28px); } }
@keyframes entraAtras { from { opacity: 0; transform: translateX(-28px); } }
.pp-num { font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 10px; }
.pp-paso h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.04em; }
.pp-paso .pp-ayuda { color: var(--ink-2); margin-top: 10px; font-size: 17px; }
.pp-bloque { margin-top: 34px; }
.pp-bloque > label, .pp-etq { display: block; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.pp-bloque > label small, .pp-etq small { font-weight: 400; color: var(--ink-3); }

/* Tarjetas de opción */
.pp-opciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pp-opciones.dos { grid-template-columns: repeat(2, 1fr); }
.pp-opciones.cuatro { grid-template-columns: repeat(4, 1fr); }
.pp-op { position: relative; display: block; cursor: pointer; }
.pp-op input { position: absolute; opacity: 0; pointer-events: none; }
.pp-op > span {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 18px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  transition: box-shadow .2s, background .2s, transform .2s var(--ease);
}
.pp-op > span small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.pp-op svg { color: var(--brand); }
.pp-op:hover > span { box-shadow: inset 0 0 0 1.5px #cdb9a8; }
.pp-op input:checked + span { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand); }
.pp-op input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.pp-op:active > span { transform: scale(.98); }
.pp-op input:checked + span::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
/* Paso 1: casillas (se pueden elegir varios trabajos) */
.pp-multi .pp-op > span::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px #cdb9a8;
}
.pp-multi .pp-op input:checked + span::after { border-radius: 6px; box-shadow: none; }
.pp-op.fila > span { flex-direction: row; align-items: center; padding: 15px 44px 15px 16px; }

/* Pastillas (selección rápida) */
.pp-pastillas { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-pastillas .pp-op > span { padding: 10px 16px; border-radius: 980px; font-weight: 500; flex-direction: row; }
.pp-pastillas .pp-op input:checked + span::after { display: none; }
.pp-pastillas .pp-op input:checked + span { background: var(--brand); color: #fff; box-shadow: none; }

/* Metros cuadrados */
.pp-metros { display: flex; align-items: center; gap: 18px; }
.pp-metros input[type=range] { flex: 1; accent-color: var(--brand); height: 28px; }
.pp-metros output { min-width: 86px; text-align: right; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }

/* Campos de texto */
.pp-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pp-campo { display: flex; flex-direction: column; gap: 7px; }
.pp-campo.ancho { grid-column: 1 / -1; }
.pp-campo label { font-size: 14px; font-weight: 600; }
.pp-campo input, .pp-campo select, .pp-campo textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  padding: 14px 16px;
  width: 100%;
  transition: box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.pp-campo select {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 16px center / 12px no-repeat;
  padding-right: 40px;
}
.pp-campo textarea { min-height: 130px; resize: vertical; line-height: 1.45; }
.pp-campo input:focus, .pp-campo select:focus, .pp-campo textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.pp-campo.error input, .pp-campo.error select, .pp-campo.error textarea { box-shadow: inset 0 0 0 2px #d93025; }
.pp-nota { font-size: 13px; color: var(--ink-3); }

/* Fotos */
.pp-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.pp-subir {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1.5px dashed #cdb9a8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  background: var(--brand-tint);
  transition: background .2s;
}
.pp-subir:hover { background: var(--brand-soft); }
.pp-subir input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pp-foto { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-alt); }
.pp-foto img { width: 100%; height: 100%; object-fit: cover; }
.pp-foto button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* Casilla de privacidad */
.pp-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.pp-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.pp-check.error { color: #d93025; }

/* Revisión */
.pp-revisa { margin-top: 30px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.pp-revisa div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pp-revisa div:last-child { border-bottom: 0; }
.pp-revisa dt { color: var(--ink-2); flex: none; }
.pp-revisa dd { margin: 0; text-align: right; font-weight: 500; }
.pp-revisa button { border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; padding: 0 0 0 8px; }

.pp-error-msg { display: none; margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: #fdecea; color: #b3261e; font-size: 14px; }
.pp-error-msg.visible { display: block; }

/* Barra de botones */
.pp-barra {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 18px 40px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(251, 250, 248, 0), var(--bg) 30%);
}
.pp-atras {
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink-2);
  cursor: pointer;
  padding: 12px 6px;
}
.pp-atras:hover { color: var(--ink); }
.pp-atras[hidden] { display: inline-block; visibility: hidden; }
.pp-siguiente { min-width: 180px; }
.pp-siguiente[disabled] { opacity: .6; cursor: wait; }
.pp-giro { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Honeypot antispam */
.pp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pantalla final ---------- */
.pp-hecho { display: none; flex: 1; align-items: center; justify-content: center; text-align: center; padding: 40px 24px 80px; }
.pp-hecho.visible { display: flex; }
.pp-hecho-in { max-width: 520px; animation: entra .6s var(--ease); }
.pp-ok {
  width: 84px;
  height: 84px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 20px 40px -16px rgba(140, 69, 27, .6);
}
.pp-ok svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: traza .6s var(--ease) .3s forwards; }
@keyframes traza { to { stroke-dashoffset: 0; } }
.pp-hecho h2 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.04em; line-height: 1.08; }
.pp-hecho p { color: var(--ink-2); font-size: 18px; margin-top: 14px; }
.pp-ref { display: inline-block; margin-top: 22px; padding: 8px 16px; border-radius: 980px; background: var(--bg-alt); font-size: 14px; color: var(--ink-2); }
.pp-ref b { color: var(--ink); letter-spacing: .04em; }
.pp-demo { margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.pp-hecho .hero-ctas { margin-top: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pp-app { grid-template-columns: 340px 1fr; }
  .pp-lado { padding: 30px 28px; }
  .pp-opciones { grid-template-columns: repeat(2, 1fr); }
  .pp-opciones.cuatro { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .pp-app { display: flex; flex-direction: column; }
  .pp-lado { display: none; }
  .pp-top {
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(251, 250, 248, .9);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    flex-wrap: wrap;
  }
  .pp-top .pp-marca { display: flex; color: var(--brand); }
  .pp-top .pp-marca img { height: 24px; }
  .pp-top .pp-marca span { font-size: 15px; }
  .pp-progreso { display: flex; gap: 4px; width: 100%; margin-top: 12px; }
  .pp-progreso i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
  .pp-progreso i.on { background: var(--brand); }
  .pp-paso { padding: 28px 16px 24px; }
  .pp-barra { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(251, 250, 248, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid rgba(0,0,0,.06); width: 100%; }
  .pp-siguiente { flex: 1; max-width: 320px; margin-left: auto; }
}
@media (max-width: 520px) {
  .pp-opciones, .pp-opciones.dos, .pp-opciones.cuatro { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pp-op > span { padding: 14px 12px; font-size: 14px; }
  .pp-campos { grid-template-columns: 1fr; }
  .pp-bloque { margin-top: 28px; }
  .pp-paso .pp-ayuda { font-size: 16px; }
  .pp-revisa div { font-size: 14px; padding: 12px 14px; }
}
@media (max-width: 360px) {
  .pp-opciones, .pp-opciones.dos, .pp-opciones.cuatro { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-paso, .pp-hecho-in { animation: none; }
}
