/* ===================
   CONTENEDOR PRINCIPAL
=================== */
.vision360-container {
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-family: Arial, sans-serif;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: grab;
    box-sizing: border-box;
    max-width: 100%;
}

/* ===================
   VISOR
=================== */
.vision360-container.vision360-dragging {
    cursor: grabbing;
}


/* ===================
   IMÁGENES
=================== */
.vision360-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vision360-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.vision360-image.blurred {
    filter: blur(10px);
}

.vision360-image.zoomed {
    transform-origin: center;
    cursor: zoom-in;
    z-index: 2;
}

/* ===================
   LOADER
=================== */
.vision360-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    z-index: 5;
}

.vision360-progress {
    width: 80%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.vision360-progress-bar {
    width: 0;
    height: 100%;
    background: #007cba;
    transition: width 0.3s ease;
}

/* ===================
   ROTATE ICON
=================== */
.vision360-rotate-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5;
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* Ocultar la pista de rotación mientras se cargan las imágenes */
.vision360-container.vision360-loading .vision360-rotate-hint {
    display: none;
}

.vision360-rotate-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.rotate-icon {
    width: 60px;
    height: 60px;
}

/* ===================
   CONTROLES
=================== */
.vision360-controls {
    position: relative;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 20;
    width: 100%;
    background: transparent;
    pointer-events: auto;
    box-sizing: border-box;
}

/* ===================
   BOTONES
=================== */
.vision360-btn {
    min-width: 40px;
    min-height: 40px;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(59, 130, 246, 0.95);
    color: white;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    outline: none;
    padding: 0;
}

.vision360-btn img {
    width: 20px !important;
    height: 20px !important;
    pointer-events: none;
    filter: brightness(0) invert(1) !important;
    display: block;
}

.vision360-btn:hover {
    transform: scale(1.1);
}

.vision360-btn:active {
    transform: scale(0.95);
}

.vision360-btn.hidden {
    display: none !important;
}

.vision360-btn-text {
    width: auto;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.vision360-btn-fullscreen {
    white-space: nowrap;
}

.vision360-btn-compact {
    border-radius: 18px !important;
    flex-direction: column;
    padding: 10px 14px;
    min-width: 72px;
    background: rgba(59, 130, 246, 0.9);
}

.vision360-btn-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}


.vision360-label {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

/* Botones por ícono */
.icon-move-left,
.icon-move-right,
.icon-zoom-in,
.icon-zoom-out {
    font-size: 18px;
}

/* ===================
   RESPONSIVE
=================== */
    @media (max-width: 768px) {
        .vision360-controls {
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 10px;
            padding: 8px;
            gap: 8px;
        }
        .vision360-btn {
            min-width: 35px;
            min-height: 35px;
            font-size: 16px;
        }
        .vision360-btn-compact {
            min-width: 64px;
            padding: 8px 10px;
            gap: 4px;
        }
        .vision360-btn-text {
            min-height: 35px;
            padding: 0 12px;
            font-size: 13px;
        }
    }

.vision360-container.vision360-fullscreen {
    position: fixed !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    border-radius: 0;
    background: #000;
    z-index: 9999;
    cursor: grab;
}

.vision360-container.vision360-fullscreen .vision360-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.65);
    padding: 12px 18px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    width: auto;
    max-width: calc(100% - 32px);
}

.vision360-container.vision360-fullscreen .vision360-btn {
    box-shadow: none;
}

.vision360-container.vision360-fullscreen .vision360-image {
    object-fit: contain;
}
