/* Tour 3D do imóvel — banner na página + visualizador em tela cheia. */
.galeria-acao--3d { background: var(--roxo, #3c004f) !important; color: #fff !important; border-color: transparent !important; }
.galeria-acao--3d:hover { background: #55106c !important; }
@media (max-width: 768px) { .galeria-acao--3d span { display: inline !important; } }

.t3d-banner {
  display: flex; align-items: center; gap: 16px; margin: 28px 0; padding: 18px 20px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #3c004f 0%, #6a1b86 60%, #ff6633 140%);
}
.t3d-banner-icone { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; }
.t3d-banner-icone svg { width: 26px; height: 26px; }
.t3d-banner-txt { flex: 1 1 auto; min-width: 0; }
.t3d-banner-txt h2 { margin: 0 0 2px; font-size: 1.1rem; font-weight: 700; color: #fff; }
.t3d-banner-txt p { margin: 0; font-size: .9rem; opacity: .9; line-height: 1.35; }
.t3d-banner-btn {
  flex: 0 0 auto; border: 0; cursor: pointer; padding: 12px 20px; border-radius: 10px;
  background: #fff; color: #3c004f; font: inherit; font-weight: 700; font-size: .92rem; transition: transform .15s ease;
}
.t3d-banner-btn:hover { transform: translateY(-2px); }
@media (max-width: 560px) {
  .t3d-banner { flex-wrap: wrap; }
  .t3d-banner-btn { width: 100%; }
}

html.t3d-aberto, html.t3d-aberto body { overflow: hidden !important; }

.t3d { position: fixed; inset: 0; z-index: 100000; background: #0b0d18; color: #fff; font-family: inherit; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; }
.t3d[hidden] { display: none !important; }
.t3d button { font: inherit; cursor: pointer; }
.t3d-palco, .t3d-palco canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.t3d-palco canvas { cursor: grab; }
.t3d-palco canvas:active { cursor: grabbing; }

.t3d-topo {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 14px 26px;
  background: linear-gradient(180deg, rgba(8,10,20,.72), rgba(8,10,20,0)); pointer-events: none;
}
.t3d-topo > * { pointer-events: auto; }
.t3d-titulo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.t3d-titulo strong { font-size: 1rem; }
.t3d-titulo span { font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3d-modos { display: flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.t3d-modos button { border: 0; background: transparent; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .86rem; font-weight: 600; }
.t3d-modos button.ativo { background: #fff; color: #2a052f; }
.t3d-fechar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.t3d-fechar svg { width: 20px; height: 20px; }

.t3d-comodos {
  position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 56px); left: 0; right: 0;
  display: flex; gap: 8px; padding: 0 14px; overflow-x: auto; scrollbar-width: none;
}
.t3d-comodos::-webkit-scrollbar { display: none; }
.t3d-chip {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.25); background: rgba(12,14,26,.55); color: #fff;
  padding: 7px 13px; border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.t3d-chip.ativo { background: #ff6633; border-color: #ff6633; }
.t3d-chip--teto { border-style: dashed; }
.t3d-chip--teto.ativo { background: #fff; color: #2a052f; border-color: #fff; border-style: solid; }
.t3d[data-modo="andar"] .t3d-chip--teto { display: none; }

.t3d-rotulos { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.t3d[data-modo="andar"] .t3d-rotulos { display: none; }
.t3d-rotulo {
  position: absolute; top: 0; left: 0; pointer-events: auto; border: 0; text-align: center; line-height: 1.15;
  background: rgba(255,255,255,.93); color: #2a052f; padding: 5px 10px; border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); will-change: transform;
}
.t3d-rotulo strong { display: block; font-size: .76rem; }
.t3d-rotulo span { font-size: .66rem; opacity: .7; }
.t3d-rotulo:hover { background: #ff6633; color: #fff; }

.t3d-base {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(8,10,20,.8), rgba(8,10,20,0)); pointer-events: none; text-align: center;
}
.t3d-tempo {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 760px; margin: 0 auto;
  padding: 10px 14px; border-radius: 16px; background: rgba(12,14,26,.62); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.t3d-play { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: #2a052f; display: grid; place-items: center; }
.t3d-play svg { width: 18px; height: 18px; }
.t3d-play.ativo { background: #ff6633; color: #fff; }
.t3d-relogio { flex: 0 0 auto; min-width: 82px; text-align: left; line-height: 1.1; }
.t3d-relogio strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.t3d-relogio span { font-size: .72rem; opacity: .75; }
.t3d-tempo input[type=range] { flex: 1 1 180px; min-width: 0; height: 28px; accent-color: #ff6633; cursor: pointer; }
.t3d-presets { display: flex; gap: 6px; flex: 1 1 100%; justify-content: center; }
.t3d-presets button { border: 0; background: rgba(255,255,255,.13); color: #fff; padding: 6px 11px; border-radius: 999px; font-size: .74rem; }
.t3d-presets button:hover { background: rgba(255,255,255,.26); }
.t3d-dica { margin: 8px 0 2px; font-size: .76rem; opacity: .85; }
.t3d-aviso { margin: 0 auto; max-width: 760px; font-size: .66rem; opacity: .6; line-height: 1.3; }

.t3d-joy {
  display: none; position: absolute; left: 18px; bottom: 215px; width: 112px; height: 112px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); touch-action: none;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.t3d-joy i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255,255,255,.9); }
@media (pointer: coarse) { .t3d[data-modo="andar"] .t3d-joy { display: block; } }

.t3d-carregando, .t3d-erro {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #0b0d18; font-size: .95rem; text-align: center; padding: 24px;
}
.t3d-carregando[hidden], .t3d-erro[hidden], .t3d-foto[hidden] { display: none; }
.t3d-carregando span { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #ff6633; animation: t3d-gira .8s linear infinite; }
@keyframes t3d-gira { to { transform: rotate(360deg); } }
.t3d-erro button { border: 0; background: #fff; color: #2a052f; padding: 10px 18px; border-radius: 10px; font-weight: 700; }

.t3d-foto { position: absolute; inset: 0; background: rgba(5,6,12,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; cursor: zoom-out; }
.t3d-foto img { max-width: 100%; max-height: 84%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.t3d-foto span { font-size: .76rem; opacity: .75; }

@media (max-width: 600px) {
  .t3d-modos button { padding: 7px 12px; font-size: .8rem; }
  .t3d-titulo span { display: none; }
  .t3d-presets button { padding: 6px 9px; font-size: .7rem; }
  .t3d-relogio strong { font-size: 1.1rem; }
}

/* fachada: sem chips/rótulos; botão de entrar */
.t3d[data-modo="fachada"] .t3d-comodos, .t3d[data-modo="fachada"] .t3d-rotulos { display: none; }
.t3d-entrar {
  display: none; position: absolute; left: 50%; bottom: 218px; transform: translateX(-50%); align-items: center; gap: 10px;
  border: 0; padding: 15px 26px; border-radius: 999px; background: #ff6633; color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 30px rgba(255,102,51,.45); white-space: nowrap; animation: t3d-pulso 2.2s ease-in-out infinite;
}
.t3d-entrar svg { width: 20px; height: 20px; }
.t3d[data-modo="fachada"] .t3d-entrar { display: inline-flex; }
@keyframes t3d-pulso { 50% { box-shadow: 0 10px 38px rgba(255,102,51,.8), 0 0 0 10px rgba(255,102,51,.12); } }
.t3d-real {
  position: absolute; right: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 104px); width: 168px; padding: 5px 5px 7px;
  border: 0; border-radius: 12px; background: rgba(255,255,255,.95); color: #2a052f; text-align: center; box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.t3d-real[hidden] { display: none; }
.t3d-real img { display: block; width: 100%; height: 104px; object-fit: cover; border-radius: 8px; margin-bottom: 5px; }
.t3d-real span { font-size: .72rem; font-weight: 600; }
.t3d[data-modo="fachada"] .t3d-real { top: calc(max(12px, env(safe-area-inset-top)) + 60px); }
.t3d-carregando small { opacity: .6; font-size: .78rem; }
.t3d-carregando b { font-weight: 600; }
@media (max-width: 600px) { .t3d-real { width: 118px; } .t3d-real img { height: 74px; } .t3d-entrar { bottom: 232px; } }

/* imersão na foto real */
.t3d-imersao {
  position: absolute; left: 50%; bottom: 212px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px);
  padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(12,14,26,.72); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: .82rem; white-space: nowrap;
}
.t3d-imersao[hidden], .t3d-imersao [hidden] { display: none; }
.t3d-imersao span { overflow: hidden; text-overflow: ellipsis; }
.t3d-imersao button { border: 0; background: rgba(255,255,255,.16); color: #fff; min-width: 34px; height: 34px; border-radius: 999px; font-size: 1.1rem; line-height: 1; }
.t3d-imersao .t3d-imersao-alt { background: #ff6633; font-size: .8rem; font-weight: 700; padding: 0 14px; }
.t3d--imerso .t3d-joy, .t3d--imerso .t3d-tempo, .t3d--imerso .t3d-aviso { display: none !important; }
.t3d--imerso .t3d-imersao { bottom: 46px; }
.t3d--imerso .t3d-base { padding-top: 0; background: none; }
.t3d--imerso .t3d-dica { visibility: hidden; }
.t3d-chip--fotos { border-color: #ff6633; }
@media (max-width: 600px) { .t3d-imersao { bottom: 226px; font-size: .74rem; } }
