/* Caminata 3D a pantalla completa y su boton en la ficha de la propiedad */

.pdw-open,
.pdw-open body { overflow: hidden; }

.pdw {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--ink);
  color: var(--cream);
  overscroll-behavior: none;
}

.pdw[hidden] { display: none; }

.pdw canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.pdw-room {
  position: absolute;
  top: 16px;
  left: 16px;
  margin: 0;
  padding: 8px 14px;
  background: rgba(13, 26, 28, .78);
  border-left: 3px solid var(--coral);
  font-size: 16px;
}

.pdw-room:empty { display: none; }

.pdw-note {
  position: absolute;
  top: 60px;
  left: 16px;
  margin: 0;
  padding: 4px 10px;
  background: rgba(13, 26, 28, .6);
  font-size: 12px;
}

.pdw-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  background: rgba(13, 26, 28, .78);
  color: var(--cream);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.pdw-close:hover,
.pdw-close:focus-visible { background: var(--cream); color: var(--ink); }

/* selector de terminaciones en vivo (ej. puertas Madera / Blanco) */
.pdw-var {
  position: absolute;
  top: 68px;
  right: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  background: rgba(13, 26, 28, .78);
  color: var(--cream);
  font-size: 13px;
}

.pdw-var > div { display: flex; align-items: center; gap: 4px; }
.pdw-var span { min-width: 64px; padding-left: 8px; }

.pdw-var button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  cursor: pointer;
}

.pdw-var button[aria-pressed="true"] { background: var(--coral); }

@media (pointer: coarse) {
  .pdw-var { top: 104px; }  /* debajo del cartel de muebles ilustrativos */
}
.pdw-var button:hover,
.pdw-var button:focus-visible { outline: 1px solid var(--cream); }

.pdw-map {
  position: absolute;
  right: 16px;
  bottom: 16px;
  height: min(46vh, 380px);
  aspect-ratio: 7 / 21;
  padding: 6px;
  background: rgba(13, 26, 28, .72);
}

.pdw-map polygon {
  fill: rgba(251, 247, 239, .14);
  stroke: rgba(251, 247, 239, .55);
  stroke-width: .05;
  cursor: pointer;
  outline: none;
}

.pdw-map polygon:hover,
.pdw-map polygon:focus-visible { fill: rgba(251, 247, 239, .32); }
.pdw-map polygon.is-on { fill: rgba(192, 101, 63, .62); }
.pdw-me { fill: var(--cream); stroke: var(--ink); stroke-width: .06; pointer-events: none; }

.pdw-help {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 9px 14px;
  background: rgba(13, 26, 28, .78);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  transition: opacity .4s;
}

.pdw-help.is-out { opacity: 0; }

.pdw-stick {
  display: none;
  position: absolute;
  left: 22px;
  bottom: 26px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(251, 247, 239, .55);
  border-radius: 50%;
  background: rgba(13, 26, 28, .35);
  touch-action: none;
}

.pdw-stick i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(251, 247, 239, .85);
}

@media (pointer: coarse) {
  .pdw-stick { display: block; }
  .pdw-help,
  .pdw-load-controles { display: none; }
  .pdw-map { height: min(30vh, 220px); }
}

.pdw-load {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  background: var(--ink);
}

.pdw-load[hidden] { display: none; }
.pdw-load p { margin: 0; font-size: 16px; }

.pdw-load .pdw-load-aviso {
  max-width: min(460px, 84vw);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(251, 247, 239, .82);
}

.pdw-load-controles {
  max-width: min(460px, 84vw);
  margin: 6px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(251, 247, 239, .2);
  list-style: none;
  font-size: 14px;
  line-height: 1.7;
}

.pdw-load-controles b { font-weight: 600; }

.pdw-bar {
  justify-self: center;
  width: min(260px, 70vw);
  height: 3px;
  background: rgba(251, 247, 239, .2);
}

.pdw-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width .2s;
}

/* ---------- boton en la ficha ---------- */
.pg-gallery-section { position: relative; }

.pg-walk {
  position: absolute;
  left: 68px;
  bottom: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 0;
  background: var(--coral);
  color: var(--cream);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(13, 26, 28, .35);
  cursor: pointer;
}

.pg-walk:hover,
.pg-walk:focus-visible { background: var(--ink); color: var(--cream); }

/* acompana el padding de .pg-gallery-section en list-details.css */
@media (max-width: 900px) {
  .pg-walk { left: 34px; }
}

@media (max-width: 600px) {
  .pg-walk { left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 14px; padding: 10px 16px; }
}

@media (pointer: coarse) {
  .pdw-note { top: 56px; font-size: 11px; }
}
