#product-video-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#product-video-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Estilos para el popup de miniaturas - POSICIONAMIENTO FIJO RELATIVO AL BOTÓN */
#video-thumbnails-popup {
    position: fixed;
    bottom: 90px;
    left: 20px;
    z-index: 1001;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 10px;
    display: none;
    max-width: 300px;
    max-height: 200px;
    overflow-y: auto;
}

#video-thumbnails-popup h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

#video-thumbnails-popup .video-thumb-item {
    display: inline-block;
    width: 75px;
    height: 45px;
    margin: 5px;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

#video-thumbnails-popup .video-thumb-item img,
#video-thumbnails-popup .video-thumb-item .local-video-preview-popup {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#video-thumbnails-popup .video-thumb-item .video-overlay-popup {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#video-thumbnails-popup .video-thumb-item:hover .video-overlay-popup {
    opacity: 1;
}

#video-thumbnails-popup .video-thumb-item .video-overlay-popup i {
    color: white;
    font-size: 16px;
}

/* Estilos para el popup de reproducción */
#video-player-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#video-player-content {
    width: 90%;
    height: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#video-player-content .video-container-player {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

#video-player-content .video-container-player iframe,
#video-player-content .video-container-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#close-video-player {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s ease;
}

#close-video-player:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Asegurar que el popup de miniaturas no se salga de la pantalla en dispositivos pequeños */
@media (max-width: 400px) {
    #video-thumbnails-popup {
        max-width: 250px;
        left: 10px;
    }
    
    #product-video-button {
        bottom: 10px;
        left: 10px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}