/* Estilos para la miniatura de video */
.video-thumb {
    position: relative;
    cursor: pointer;
    margin: 5px;
    display: inline-block;
    vertical-align: top;
}

.video-thumb-item {
    position: relative;
    display: block;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.video-thumb-item:hover {
    border-color: #25b9d7;
}

.video-thumb-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-thumb:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumb.selected .video-thumb-item {
    border-color: #25b9d7;
    box-shadow: 0 0 0 2px rgba(37, 185, 215, 0.3);
}

/* Estilos para el video principal */
.product-video-main {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.product-video-main:not(.hidden) {
    display: block !important;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .video-play-icon {
        font-size: 1.5rem;
    }

    .video-thumb {
        margin: 3px;
    }

    .product-video-main {
        margin-bottom: 15px;
    }
}

/* Compatibilidad con temas comunes */
.thumbnails .video-thumb,
.product-thumbnails .video-thumb {
    display: inline-block;
    width: auto;
}

.js-qv-product-images .video-thumb,
.product-images .video-thumb {
    display: inline-block;
    vertical-align: top;
}

/* ... (Estilos existentes) ... */

/*  AÑADIDO: Estilos para posicionar correctamente la miniatura del video */
.images-container .video-thumb {
    text-align: center;
    margin-top: 15px;
    /* Espacio entre la galería y la miniatura */
    padding: 5px;
    width: 100px;
    /* Ancho de la miniatura */
    display: inline-block;
    /* Permite centrarlo si el contenedor padre es text-align: center */
    vertical-align: top;
    cursor: pointer;
}

.images-container .video-thumb .video-thumb-item {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.images-container .video-thumb:hover .video-thumb-item,
.images-container .video-thumb.selected .video-thumb-item {
    border-color: #25b9d7;
    box-shadow: 0 0 8px rgba(37, 185, 215, 0.5);
}

.images-container .video-thumb-img {
    display: block;
    width: 100%;
    border-radius: 3px;
}

/* Ocultar/Mostrar el slider de imágenes principal */
#product-images-large.hidden {
    display: none !important;
}

/* ... (Estilos existentes) ... */

/*  NUEVO: Estilos para integrar la miniatura en el carrusel */
.swiper-slide.video-thumb-slide {
    cursor: pointer;
}

.video-thumb-slide .thumb-container {
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.video-thumb-slide.selected .thumb-container,
.video-thumb-slide:hover .thumb-container {
    border-color: #25b9d7;
    /* Color de resaltado de tu tema */
}

.video-thumb-img {
    display: block;
    width: 100%;
}

.video-thumb .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2.5rem;
    /* Icono más grande */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    /* Para que el clic pase a la imagen */
    opacity: 0.85;
    transition: all 0.3s ease;
}

.video-thumb:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/*  NUEVO: Estilos para el contenedor de video principal */
.product-video-main {
    width: 100%;
    height: 100%;
    position: relative;
    /* Ajustado para el nuevo contenedor */
}

.product-video-main .video-wrapper {
    position: relative;
    padding-bottom: 100%;
    /* Ajusta esto si tus imágenes no son cuadradas, 56.25% para 16:9 */
    height: 0;
    width: 100%;
    background-color: #000;
}

.product-video-main .video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}