/* ══════════════════════════════════════
   Plano 3D del centro — estética clara de render de interiorismo
══════════════════════════════════════ */
.pl {
  --pl-ink: #121417;
  --pl-muted: #6b7078;
  --pl-panel: rgba(255,255,255,0.9);
  --pl-line: rgba(18,20,23,0.08);
  position: fixed; inset: 0; z-index: 2000; background: #ffffff; color: var(--pl-ink);
  opacity: 0; transition: opacity 350ms var(--ease-out-expo);
}
.pl.is-open { opacity: 1; }
.pl[hidden] { display: none; }
.pl h2, .pl h3 { color: var(--pl-ink); }
.pl-stage { position: absolute; inset: 0; overflow: hidden; }
.pl-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.pl-stage canvas:active { cursor: grabbing; }

.pl-tabs, .pl-close, .pl-info, .pl-view, .pl-hint {
  background: var(--pl-panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--pl-line); box-shadow: 0 10px 30px rgba(18,20,23,0.08);
}

/* barra superior */
.pl-top {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; pointer-events: none;
}
.pl-top > * { pointer-events: auto; }
.pl-kicker { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #0e9aa6; }
#pl-title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.1; margin-top: 0.15rem; letter-spacing: -0.01em; }

.pl-tabs { display: flex; gap: 0.15rem; padding: 0.3rem; border-radius: 999px; }
.pl-tabs button {
  border: 0; background: none; color: var(--pl-muted); cursor: pointer; white-space: nowrap;
  font: 600 0.8rem "Inter", sans-serif; padding: 0.55rem 0.9rem; border-radius: 999px;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.pl-tabs button:hover { color: var(--pl-ink); }
.pl-tabs button[aria-selected="true"] { color: #fff; background: var(--pl-ink); }

.pl-close {
  width: 44px; height: 44px; flex: none; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--pl-ink);
  transition: transform var(--dur-fast), background var(--dur-fast);
}
.pl-close:hover { transform: rotate(90deg); background: #fff; }

/* ficha lateral */
.pl-info {
  position: absolute; z-index: 2; top: 6.25rem; right: 1.5rem; width: 330px;
  padding: 1.5rem; border-radius: 18px;
}
.pl-info-meta { font-size: 0.75rem; font-weight: 600; color: #0e9aa6; letter-spacing: 0.04em; }
.pl-info h3 { font-size: 1.45rem; font-weight: 800; line-height: 1.15; margin: 0.35rem 0 0.5rem; }
.pl-info-desc { font-size: 0.875rem; line-height: 1.6; color: var(--pl-muted); }
.pl-info-list { list-style: none; margin: 1.1rem 0 1.25rem; padding: 1rem 0 0; border-top: 1px solid var(--pl-line); }
.pl-info-list li { position: relative; padding-left: 1.2rem; font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.45rem; color: #33373d; }
.pl-info-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 2px; background: #10c4d1; }
.pl-info-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.pl-info-actions .btn { width: 100%; justify-content: center; }
.pl-foto-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
  padding: 0.7rem 1rem; border-radius: 999px; cursor: pointer;
  font: 600 0.85rem "Inter", sans-serif; color: var(--pl-ink);
  background: #fff; border: 1px solid rgba(18,20,23,0.14);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.pl-foto-btn:hover { border-color: var(--pl-ink); background: #f7f7f5; }
.pl-foto-btn[hidden] { display: none; }

/* barra inferior */
.pl-bottom {
  position: absolute; z-index: 2; left: 1.5rem; bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem; pointer-events: none;
}
.pl-bottom > * { pointer-events: auto; }
.pl-view { display: flex; padding: 0.3rem; border-radius: 999px; }
.pl-view button {
  border: 0; background: none; cursor: pointer; color: var(--pl-muted);
  font: 600 0.8rem "Inter", sans-serif; padding: 0.55rem 1.1rem; border-radius: 999px;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.pl-view button[aria-pressed="true"] { background: var(--pl-ink); color: #fff; }
.pl-hint { font-size: 0.75rem; color: var(--pl-muted); padding: 0.6rem 1rem; border-radius: 999px; }

/* etiquetas sobre el plano */
.pl-labels { position: absolute; inset: 0; pointer-events: none; }
.pl-label {
  position: absolute; top: 0; left: 0; pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  padding: 0.35rem 0.7rem; border-radius: 8px; border: 0;
  background: rgba(255,255,255,0.88); color: var(--pl-ink);
  box-shadow: 0 4px 14px rgba(18,20,23,0.14);
  transition: opacity 200ms, background var(--dur-fast), color var(--dur-fast);
  white-space: nowrap;
}
.pl-label b { font: 700 0.74rem/1.2 "Urbanist", sans-serif; letter-spacing: 0.02em; text-transform: uppercase; }
.pl-label span { font-size: 0.66rem; color: var(--pl-muted); }
.pl-label:hover { background: #fff; }
.pl-label.is-active { background: var(--pl-ink); color: #fff; }
.pl-label.is-active span { color: #67e8f9; }

.pl-tabs button:focus-visible, .pl-close:focus-visible, .pl-view button:focus-visible,
.pl-label:focus-visible, .pl-foto-btn:focus-visible { outline: 2px solid #10c4d1; outline-offset: 2px; }

/* loader */
.pl-loader {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 1rem;
  color: var(--pl-muted); font-size: 0.875rem; background: #ffffff;
}
.pl-loader[hidden] { display: none; }
.pl-loader i {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(18,20,23,0.1); border-top-color: #10c4d1;
  animation: pl-spin 0.9s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) { .pl-tabs button { padding: 0.5rem 0.6rem; } }
@media (max-width: 860px) {
  .pl-top { flex-wrap: wrap; padding: 1rem; }
  .pl-brand { flex: 1; }
  .pl-tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pl-info { top: auto; bottom: 4.75rem; left: 1rem; right: 1rem; width: auto; padding: 1rem 1.1rem; }
  .pl-info-list, .pl-info-desc { display: none; }
  .pl-info-actions { flex-direction: row; margin-top: 0.75rem; }
  .pl-bottom { left: 1rem; bottom: 1rem; }
  .pl-hint { display: none; }
}
