/* =========================================
   1. CONTENEDOR PRINCIPAL
   ========================================= */
.e360-wrapper {
    position: relative;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
    border-radius: 8px;
    line-height: 0; /* Elimina espacio fantasma */
    user-select: none;
    -webkit-user-select: none;
    transform: translateZ(0); /* Aceleración GPU */
}

/* =========================================
   2. CANVAS Y VISOR (Motor Híbrido)
   ========================================= */
.e360-canvas-container {
    position: relative;
    width: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: grab;
    
    /* FIX MOBILE CRÍTICO: Permite scroll vertical pero captura horizontal */
    touch-action: pan-y; 
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}
.e360-canvas-container:active { cursor: grabbing; }

/* Imagen Fuente (Define altura) */
.e360-source-img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}
/* Ocultar imagen fuente si el modo Canvas está activo */
.e360-wrapper.mode-canvas .e360-source-img { opacity: 0; }

/* Canvas de Dibujo (High-DPI) */
.e360-draw-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; display: none;
}
.e360-wrapper.mode-canvas .e360-draw-canvas { display: block; }

/* =========================================
   3. CAPAS SUPERIORES (Poster y Loader)
   ========================================= */
.e360-poster, .e360-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    transition: opacity 0.4s, visibility 0.4s;
}

/* Portada */
.e360-poster { 
    background-size: cover; 
    background-position: center; 
    z-index: 10; 
    background-color: #fff;
}

/* Loader (Fondo) */
.e360-loader { 
    background: rgba(255,255,255,0.95); 
    z-index: 20; 
    opacity: 0; 
    visibility: hidden; 
}

/* =========================================
   4. BOTÓN DE INICIO (NUEVO UI v1.4)
   ========================================= */
.e360-btn-start {
    /* Estilos base reset */
    border: none;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    /* Transiciones suaves para hover */
    transition: all 0.3s ease;
    
    /* Valores por defecto (se sobrescriben desde Elementor) */
    background: #d82c2c; 
    color: white; 
    padding: 12px 25px;
    font-size: 16px; 
    border-radius: 50px; 
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

.e360-btn-start:hover { 
    transform: scale(1.05); 
}

/* Contenedor interno para manejar Icono + Texto */
.e360-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Gap y Flex-direction se inyectan vía PHP style="" */
    width: 100%;
}

.e360-btn-icon {
    line-height: 1;
    display: flex;
}

/* =========================================
   5. ESTILOS DEL CARGADOR (LOADER)
   ========================================= */

/* A) Barra de Progreso (Default) */
.e360-bar-container { 
    width: 50%; 
    height: 6px; 
    background: #eee; 
    border-radius: 10px; 
    overflow: hidden; 
    margin-bottom: 10px; 
}
.e360-bar-fill { 
    height: 100%; 
    background: #d82c2c; 
    transition: width 0.1s linear; 
}

/* B) Loader Custom (Imagen/GIF) */
.e360-loader-custom-wrapper {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.e360-loader-custom-img {
    height: auto;
    display: block;
    /* Ancho controlado por Elementor */
}

/* Animación de Rotación (Opcional) */
.e360-spin-anim {
    animation: e360-spin 2s linear infinite;
}

@keyframes e360-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Texto de Carga */
.e360-loading-text { 
    font-family: sans-serif; 
    font-weight: 600; 
    font-size: 12px; 
    color: #333; 
}

/* =========================================
   6. VISIBILIDAD DE ESTADOS
   ========================================= */
.e360-wrapper.is-loading .e360-poster { opacity: 0; visibility: hidden; }
.e360-wrapper.is-loading .e360-loader { opacity: 1; visibility: visible; }

.e360-wrapper.is-loaded .e360-poster { opacity: 0; visibility: hidden; pointer-events: none; }
.e360-wrapper.is-loaded .e360-loader { opacity: 0; visibility: hidden; }
.e360-wrapper.is-loaded .e360-canvas-container { opacity: 1; }

/* =========================================
   7. EXTRAS (Lupa e Icono)
   ========================================= */
.e360-magnifier {
    display: none; 
    position: absolute; 
    width: 200px; height: 200px;
    border: 2px solid white; 
    border-radius: 50%; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 30; 
    background-color: white; 
    background-repeat: no-repeat; 
    pointer-events: none;
}

.e360-icon-hint {
    position: absolute; bottom: 20px; right: 20px;
    background: rgba(255,255,255,0.8); width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); color: #333; pointer-events: none;
}