/* ORIGEN Nueva Romana — página /recorrido: edificio 3D, ficha de unidad y recorrido 360 */

.rec { background: var(--cream); }
.rec__intro { padding-block: clamp(48px, 7vw, 96px) 0; }
.rec__intro .lead { max-width: 64ch; }

.rec__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 0;
  margin-top: clamp(28px, 4vw, 48px);
  margin-bottom: var(--section);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  min-height: 640px;
  height: min(78vh, 820px);
}
.rec__canvas { position: relative; min-width: 0; min-height: 0; }
.rec__canvas canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }

.rec__hud {
  position: absolute; left: 16px; top: 16px; right: 16px;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.rec__hud > * { pointer-events: auto; }
.rec__legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(20, 26, 22, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text-light); font-size: .78rem; letter-spacing: .02em;
}
.rec__legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rec__legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; border: 1px solid rgba(255,255,255,.25); }
.rec__legend i[data-e="disponible"] { background: #f4f0e7; }
.rec__legend i[data-e="reservada"] { background: #b8975a; }
.rec__legend i[data-e="vendida"] { background: #3a4a40; }
.rec__legend i[data-e="bloqueada"] { background: #8c8577; }

.rec__filters { display: flex; gap: 6px; flex-wrap: wrap; }
.rec__filters button {
  font: 500 .78rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-light); background: rgba(20, 26, 22, .72); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 9px 13px; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.rec__filters button:hover { background: rgba(255,255,255,.14); }
.rec__filters button[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.rec__hint {
  position: absolute; left: 16px; bottom: 14px; color: rgba(233,228,216,.7); font-size: .76rem; letter-spacing: .03em;
  pointer-events: none;
}
.rec__tip {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(14px, -50%);
  background: var(--cream); color: var(--ink); border-radius: 4px; padding: 7px 10px;
  font-size: .8rem; line-height: 1.3; box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: nowrap;
  opacity: 0; transition: opacity .12s;
}
.rec__tip.is-on { opacity: 1; }
.rec__tip b { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; display: block; }
.rec__loading {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-light-muted);
  font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); z-index: 4;
  transition: opacity .4s var(--ease);
}
.rec__loading.is-off { opacity: 0; pointer-events: none; }

/* ---- Ficha lateral ---- */
.rec__panel {
  background: var(--cream); color: var(--text); border-left: 1px solid var(--stone);
  display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
}
.rec__empty { padding: 36px 28px; }
.rec__empty h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; margin: 0 0 .5rem; }
.rec__empty p { color: var(--text-muted); font-size: .95rem; margin: 0 0 1.4rem; }
.rec__summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.rec__summary div { background: var(--sand); border-radius: var(--radius); padding: 12px 12px 10px; }
.rec__summary dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.rec__summary dd { margin: .2rem 0 0; font-family: var(--serif); font-size: 1.7rem; line-height: 1; font-weight: 600; }

.unit { display: none; flex-direction: column; min-height: 100%; }
.unit.is-on { display: flex; }
.unit__head { padding: 26px 28px 18px; border-bottom: 1px solid var(--stone); }
.unit__head .eyebrow { margin-bottom: .5rem; }
.unit__code { font-family: var(--serif); font-weight: 600; font-size: 2.6rem; line-height: 1; margin: 0; display: flex; align-items: baseline; gap: 12px; }
.unit__code small { font-size: 1rem; font-family: var(--sans); font-weight: 500; color: var(--text-muted); }
.unit__state {
  display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.unit__state[data-e="disponible"] { background: #dfe9df; color: #1f4d2f; }
.unit__state[data-e="reservada"] { background: #f0e4c8; color: #6b5120; }
.unit__state[data-e="vendida"] { background: var(--forest); color: var(--cream); }
.unit__state[data-e="bloqueada"] { background: var(--stone); color: var(--text-muted); }
.unit__price { margin: 14px 0 0; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.unit__price small { font-family: var(--sans); font-weight: 500; font-size: .75rem; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-left: 8px; }

.unit__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; padding: 18px 28px; border-bottom: 1px solid var(--stone); }
.unit__facts dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.unit__facts dd { margin: .15rem 0 0; font-weight: 500; }

.unit__cta { padding: 18px 28px; display: grid; gap: 8px; }
.unit__cta .btn { width: 100%; justify-content: center; margin: 0; }
.btn--360 { background: var(--forest); color: var(--cream); display: inline-flex; align-items: center; gap: 10px; }
.btn--360:hover { background: #2a3d31; }
.btn--360 svg { width: 18px; height: 18px; }

.unit__tabs { display: flex; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
.unit__tabs button {
  flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 8px; cursor: pointer;
  font: 500 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.unit__tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.unit__tab { padding: 18px 28px 28px; }
.unit__tab[hidden] { display: none; }
.unit__plan { margin: 0 0 14px; border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden; background: #fff; }
.unit__plan img { display: block; width: 100%; height: auto; }
.unit__plan figcaption { padding: 8px 12px; font-size: .8rem; color: var(--text-muted); }
.unit__docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.unit__docs a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--stone); border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-size: .9rem; background: #fff; transition: border-color .2s;
}
.unit__docs a:hover { border-color: var(--gold); }
.unit__docs svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.unit__docs small { color: var(--text-muted); margin-left: auto; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.unit__note { color: var(--text-muted); font-size: .85rem; margin: 0; }

/* ---- Recorrido 360 ---- */
.tour__soon[hidden], .tour__bottom[hidden] { display: none; }
.pnlm-container .pnlm-panorama-info { display: none !important; }
.tour { position: fixed; inset: 0; z-index: 90; background: #0b0e0c; color: var(--text-light); display: none; }
.tour.is-on { display: block; }
.tour__viewer { position: absolute; inset: 0; }
.tour__viewer .pnlm-container { background: #0b0e0c; }
.tour__top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px 14px 64px; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0)); pointer-events: none;
}
.tour__top > * { pointer-events: auto; }
.tour__title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.1; }
.tour__title small { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2, #d4b77a); margin-bottom: 4px; }
.tour__close {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 999px; width: 42px; height: 42px; cursor: pointer; font-size: 1.3rem; line-height: 1;
}
.tour__close:hover { background: rgba(255,255,255,.22); }
.tour__bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 18px; background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,0)); pointer-events: none;
}
.tour__bottom > * { pointer-events: auto; }
.tour__scenes { display: flex; gap: 8px; flex-wrap: wrap; }
.tour__scenes button {
  font: 500 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 10px 14px; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tour__scenes button[aria-current="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tour__map { position: relative; width: min(300px, 38vw); background: rgba(255,255,255,.92); border-radius: 6px; overflow: hidden; }
.tour__map img { display: block; width: 100%; height: auto; }
.tour__pin {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; transform: translate(-50%, -50%);
  cursor: pointer; box-shadow: 0 0 0 0 rgba(184,151,90,.6);
}
.tour__pin[aria-current="true"] { background: var(--forest); animation: pin 1.6s infinite; }
@keyframes pin { 0% { box-shadow: 0 0 0 0 rgba(28,42,34,.55); } 100% { box-shadow: 0 0 0 12px rgba(28,42,34,0); } }
.tour__soon {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 4;
}
.tour__soon div { max-width: 520px; }
.tour__soon h3 { font-family: var(--serif); font-weight: 500; font-size: 2rem; margin: 0 0 .4rem; }
.tour__soon p { color: var(--text-light-muted); margin: 0 0 1.2rem; }
.tour__soon img { width: 100%; max-width: 520px; border-radius: 6px; }
.pnlm-container .pnlm-hotspot-base.rec-hs { position: absolute; cursor: pointer; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: rgba(244,240,231,.18); border: 2px solid rgba(244,240,231,.9); backdrop-filter: blur(4px); }
.pnlm-container .pnlm-hotspot-base.rec-hs::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--gold); }
.pnlm-container .pnlm-hotspot-base.rec-hs:hover { background: rgba(244,240,231,.4); }
.pnlm-container .pnlm-hotspot-base.rec-hs .pnlm-tooltip span { font-family: var(--sans); font-size: .8rem; background: var(--cream); color: var(--ink); border-radius: 4px; }
.pnlm-load-box { background: rgba(11,14,12,.9); border-radius: 6px; font-family: var(--sans); }

@media (max-width: 900px) {
  .rec__stage { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .rec__canvas { height: 62vh; min-height: 420px; }
  .rec__panel { border-left: 0; border-top: 1px solid var(--stone); max-height: none; }
  .rec__hint { display: none; }
  .tour__bottom { flex-direction: column; align-items: stretch; }
  .tour__map { width: 100%; max-width: 360px; }
}
