/* fotoproducto360-front.css */

/* ----------------------------
   Overlay principal con degradado
   ---------------------------- */
   .fotoproducto360-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; 
    left: 0;
    width: 100%;
    /* Degradado vertical de negros con un toque azulado */
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 20, 0.85),
        rgba(10, 15, 35, 0.85)
    );
    backdrop-filter: blur(3px); /* efecto de desenfoque trasero, si el navegador lo soporta */
    overflow: auto;
    animation: fadeOverlay 0.3s ease forwards;
}

/* Suave animación de entrada para el overlay */
@keyframes fadeOverlay {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ----------------------------
   Contenedor del contenido 
   ---------------------------- */
/* El contenedor del modal ya no oculta el overflow */
.fotoproducto360-modal-content {
    position: relative;
    margin: 50px auto;
    width: 70%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    /* Quitar overflow: hidden; */
    overflow: visible;
    padding: 20px;
    color: #333;
    animation: fadeInScale 0.3s ease forwards;
}

/* Controles con un z-index mayor para que estén por encima de la imagen */
.fotoproducto360-controls {
    position: relative;
    z-index: 2; 
}

/* La imagen se escalará desde su centro.
   Ponemos z-index menor a la de los controles (1 < 2),
   y también permitimos que se 'desborde'. */
.fotoproducto360-canvas {
    display: block;
    margin: 0 auto;
    transform-origin: center center;
    z-index: 1;

}


/* Animación de aparición escalada */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ----------------------------
   Botón de cierre (esquina)
   ---------------------------- */
.fotoproducto360-close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    font-weight: bold;
    color: #999;
    transition: color 0.2s ease;
}
.fotoproducto360-close-modal:hover {
    color: #444;
}

/* ----------------------------
   Contenedor de la imagen 360
   ---------------------------- */
.fotoproducto360-frames {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    /* Algo de altura mínima para no colapsar en pantallas pequeñas */
    min-height: 200px;
}

/* Imagen principal */
.fotoproducto360-canvas {
    max-width: 100%;
    height: auto;
    display: none;
    object-fit: contain;
    border-radius: 6px;
    /* Pequeña sombra interior */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ----------------------------
   Controles (Prev/Play-Pause/Next)
   ---------------------------- */
.fotoproducto360-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Botones de control con iconos simulados */
.fotoproducto360-controls button {
    border: none;
    background: #2e2e2e;
    color: #fff;
    font-size: 16px;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

/* Sutil hover y active */
.fotoproducto360-controls button:hover {
    background: #444;
}
.fotoproducto360-controls button:active {
    transform: scale(0.95);
}

/* Ejemplo: iconos por pseudo-elemento */
.fotoproducto360-btn-prev::before {
    content: "←";
    margin-right: 4px;
}
.fotoproducto360-btn-next::after {
    content: "→";
    margin-left: 4px;
}

/* El botón play/pause cambia el texto dinámicamente en JS.
   Podrías usar un pseudo-elemento también si quieres un icono. */

/* ----------------------------
   Botón que abre el modal
   ---------------------------- */
/* Botón sin fondo pesado, solo con un pequeño padding */
.fotoproducto360-open-modal {
    border: none !important;
    background: white !important;
    padding: 8px; /* Ajusta según el tamaño deseado */
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin:10px 10px;
}

/* Efecto hover con un fondo muy sutil */
.fotoproducto360-open-modal:hover {
    background: #f0f0f0 !important;
}

/* Efecto active para feedback táctil */
.fotoproducto360-open-modal:active {

    transform: scale(0.97);
    background: #e0e0e0 !important;
}
.fotoproducto360-open-modal:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(195, 195, 195, 0.5);
    background: #e0e0e0 !important;
}


/* mas efectos para el fondo del boton cuando esta activo */

/* Estilos para el ícono */
.fotoproducto360-open-modal img {
    all: unset;
    width: 32px;      /* o el tamaño que mejor se adapte */
    height: auto;
    opacity: 0.8;     /* opacidad sutil por defecto */
    transition: opacity 0.2s ease;
    background: transparent;
    display: block;
    margin: 0 auto;
    padding: 0 !important;

}

/* Al hacer hover, el ícono se vuelve totalmente visible */
.fotoproducto360-open-modal:hover img {
    opacity: 1;
}


/* ----------------------------
   Media Queries (Responsive)
   ---------------------------- */

/* En pantallas pequeñas, reducimos márgenes y ampliamos la modal al 95% */
@media (max-width: 600px) {
    .fotoproducto360-modal-content {
        margin: 20px auto;
        width: 95%;
        border-radius: 6px;
    }
    .fotoproducto360-close-modal {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
    .fotoproducto360-controls button {
        font-size: 14px;
        padding: 6px 10px;
    }

    .fotoproducto360-frames {
        height: 50% !important;
    }
}
.fotoproducto360-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(5, 10, 20, 0.85),
        rgba(10, 15, 35, 0.85)
    );
    backdrop-filter: blur(3px);
    overflow: auto;
    
    /* Centrado vertical y horizontal */
    display: flex;
    align-items: center;
    justify-content: center;
}


.fotoproducto360-modal-content {
    position: relative;
    /* Eliminar margin-top para que se centre */
    margin: 0 auto;
    max-width: 80%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 20px;
    color: #333;
    animation: fadeInScale 0.3s ease forwards;
}


.fotoproducto360-frames {
    width: 100%;
    overflow-y: none;
    margin-top: 20px;
    position: relative;
    height: 80vh;      /* Altura máxima */
}

/* Para la imagen, quitamos max-width al 100% 
   porque ahora controlaremos su tamaño con JS */
.fotoproducto360-canvas {
    display: block;
    position: relative;
    max-width: none;       /* Importante */
    height: auto;
    margin: 0 auto;        /* Centrar horizontalmente */
    padding: 100px 20px;   /* Añadir padding horizontal */
  

}


.fotoproducto360-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none; /* Inicialmente oculto */
}

.fotoproducto360-modal.active {
    opacity: 1;
    display: flex; /* O el display que uses para el modal */
}

/* Estilos para el placeholder en el contenedor sortable */
.ui-sortable-placeholder {
    background-color: #f7f7f7;
    border: 2px dashed #ccc;
    visibility: visible !important;
    height: 60px;  /* Ajusta a la altura de tus imágenes */
    width: 60px;   /* Ajusta a la anchura de tus imágenes */
    margin: 0 5px 5px 0;
    display: inline-block;
}
