/* Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif; /* Fuente actualizada a Poppins */
}

/* --- AJUSTE PARA PANTALLA COMPLETA (ELIMINA BORDES BLANCOS) --- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background-color: #000 !important;
}

#contenedor-tour, #panorama {
    width: 100vw !important;
    height: 100vh !important;
}

/* ELIMINACIÓN FORZADA DEL CUADRO DE CARGA */
.pnlm-load-box, 
.pnlm-lbox, 
.pnlm-lbar, 
.pnlm-lmsg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Bloquear el menú de clic derecho propio de Pannellum */
.pnlm-context-menu {
    display: none !important;
}

#contenedor-tour {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#panorama {
    width: 100%;
    height: 100%;
    background: #111;
}

/* Panel Cristal (Glassmorphism) */
.panel-cristal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* UI Superior */
#nav-superior {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    z-index: 1000;
}

/* UI Superior - Acciones (Contactar Asesor) */
#acciones-superior {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* --- AÑADE ESTE BLOQUE NUEVO --- */
.caja-accion {
    display: flex;
    flex-direction: column; /* Coloca el texto arriba y el botón abajo */
    align-items: center;    /* Centra ambos elementos horizontalmente */
    padding: 15px 20px;     /* Da un buen margen interno como en el ejemplo */
    gap: 10px;              /* Espacio entre el texto y el botón */
}

.accion-titulo {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
/* --------------------------------- */
/* Estilo del Botón WhatsApp - Versión corregida para <button> */
.btn-blanco {
    background: #25D366;
    color: white;
    border: none;            /* Quitamos el borde por defecto del botón */
    outline: none;           /* Quitamos el borde de enfoque */
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;    /* OBLIGATORIO: Para que use Poppins y no la letra fea del sistema */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;           /* Alineamos el icono y el texto */
    align-items: center;
    justify-content: center;
    gap: 10px;               /* Espacio automático entre el icono y el texto */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-blanco:hover {
    background: #1eb954;     /* Un verde un poco más oscuro al pasar el mouse */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-blanco i {
    font-size: 1.2rem;       /* Tamaño del icono de WhatsApp */
}
/* Minimapa Premium */
#minimapa {
    position: absolute;
    bottom: 20px; 
    left: 20px;
    width: 220px;
    height: 220px;
    background-color: rgba(0, 0, 0, 0.2);
    background-image: url('mapa.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1100;
}

#punto-ubicacion {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #0088ff;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: 0.5s ease;
    z-index: 100;
}

#radar-cono {
    position: absolute;
    width: 100px;
    height: 100px;
    top: -45px;
    left: -45px;
    background: conic-gradient(from -30deg at 50% 50%, rgba(0, 136, 255, 0.3) 0deg, rgba(0, 136, 255, 0.3) 60deg, transparent 60deg);
    pointer-events: none;
}

/* ========================================================
   UBICACIÓN DEL LOGO DENTRO DEL MINIMAPA (NUEVO)
   ======================================================== */
/* Minimapa Premium */
#minimapa {
    position: absolute;
    bottom: 20px; 
    left: 20px;
    width: 250px;  /* Caja un poco más ancha para dar respiro */
    height: 250px; /* Caja un poco más alta */
    background-color: rgba(0, 0, 0, 0.4); /* Un poquito más oscuro para que el plano resalte más */
    background-image: url('mapa.png');
    background-size: 95%; /* EL TRUCO: El plano ocupa el 80% de la caja, creando un "padding" visual */
    background-repeat: no-repeat;
    background-position: center 15px; /* Centrado a los lados, y empujado 15px desde arriba */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1100;
}

/* Ajuste fino para el logo en la nueva caja */
#titulo-minimapa {
    position: absolute;
    bottom: 15px;       
    left: 50%;
    transform: translateX(-50%);
    width: 200px;  /* <-- ¡AQUÍ ESTÁ LA MAGIA! Aumenta este número */      
    z-index: 100;
    display: flex;
    justify-content: center;
}
/* ======================================================== */

/* ========================================================
   Contenedor del Logo y Texto de Escena (Abajo)
   ======================================================== */
#info-inferior-izquierda {
    position: absolute;
    bottom: 20px; 
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    gap: 8px; 
    z-index: 1100;
}

/* Ajuste de textos en el Panel de Información */
#info-titulo {
    font-size: 1.1rem;      /* Reduce el tamaño del título principal */
    margin-bottom: 6px;     /* Da un pequeño respiro debajo del título */
    line-height: 1.2;
}

#info-descripcion {
    font-size: 0.85rem;     /* Reduce el tamaño de la descripción */
    line-height: 1.4;       /* Mejora el espacio entre las líneas de texto */
    margin-bottom: 15px;    /* Separa la descripción de los iconos de abajo */
    color: rgba(255, 255, 255, 0.85); /* Un blanco ligeramente suave para que no compita con el título */
}

/* ELIMINACIÓN TOTAL DE FONDOS EN HOTSPOTS */

/* Esto quita el cuadro blanco y cualquier borde del contenedor */
.pnlm-tooltip, 
.pnlm-tooltip span {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: transparent !important; /* Esconde cualquier texto negro que se asome */
    padding: 0 !important;
}

/* Esto asegura que la imagen sea lo único que se vea */
.logo-nadir-responsive {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Opcional: una sombra suave para que el logo no se pierda en el piso */
    filter: drop-shadow(0px 4px 5px rgba(0,0,0,0.4));
}

/* --- ESTILO PARA LAS ETIQUETAS DE LAS PUERTAS (RESTABLECIDO) --- */
.pnlm-tooltip span {
    display: block !important; /* ¡Vuelven a aparecer las letras! */
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
}

/* --- ESTILO SOLO PARA TUS LOGOS (ESTO MANTIENE EL LOGO LIMPIO) --- */
.custom-hotspot-logo {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.custom-hotspot-logo img {
    pointer-events: none; /* Para que el clic pase a través de la imagen al hotspot */
}

.logo-independiente {
    width: 140px; 
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.texto-escena-actual {
    background-color: rgba(30, 30, 30, 0.85); 
    color: white;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
/* ======================================================== */

/* Panel Info */
#panel-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 260px;
    padding: 15px;
    z-index: 1100;
}

.foto-acabados {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Panel Modo Creador */
#panel-creador {
    position: absolute;
    top: 150px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 10px;
    z-index: 1500;
    display: none;
}

#panel-creador button {
    margin-top: 10px;
    padding: 5px;
    width: 100%;
    cursor: pointer;
}

/* Hotspots Estilo Inmobiliario (EFECTO RIPPLE INFINITO) */
.pnlm-hotspot.pnlm-scene {
    background: none !important;
    border: none !important;
    width: 24px !important;
    height: 24px !important;
    cursor: pointer !important;
}

.pnlm-hotspot.pnlm-scene::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.pnlm-hotspot.pnlm-scene::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid white;
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: pulso-inmueble 2s infinite ease-out;
    z-index: 1;
}

@keyframes pulso-inmueble {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* ========================================================
   DISEÑO RESPONSIVE (TABLETS Y MÓVILES)
   ======================================================== */
@media (max-width: 1024px) {
    /* Ocultamos los paneles que estorban en modo tablet/móvil */
    #panel-info,
    #panel-creador,
    #minimapa,
    #info-inferior-izquierda,
    .accion-titulo {
        display: none !important;
    }

    /* Movemos el botón de WhatsApp (CON PADDING ADICIONAL) */
    #acciones-superior {
        top: auto !important;
        left: auto !important;
        right: 30px !important;  /* Más separado del borde derecho */
        bottom: 40px !important; /* Más separado del borde inferior */
        position: absolute;
        z-index: 2000;
    }

    /* Convertimos el contenedor de acciones en transparente */
    .caja-accion {
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Botón circular de WhatsApp con CENTRADO PERFECTO */
    .btn-blanco {
        width: 65px !important;
        height: 65px !important;
        border-radius: 50% !important;
        background: #25D366 !important;
        
        display: flex !important;
        align-items: center !important;   /* Centrado vertical exacto */
        justify-content: center !important; /* Centrado horizontal exacto */
        
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        padding: 0 !important;
        margin: 0 !important;
        font-size: 0 !important; /* Oculta el texto "Chatear Ahora" */
        border: none !important;
        cursor: pointer;
    }

    .btn-blanco i {
        font-size: 35px !important;
        margin: 0 !important;
        display: block !important;
        line-height: 1 !important; /* Asegura que el icono no se desplace */
    }
}