/**
 * =============================================
 * ESTILOS PARA VIDEO DE VARIACIONES
 * =============================================
 */

/* Contenedor del video */
#variation-video-container {
    display: none;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease-out;
    position: relative;
    z-index: 10;
    max-width: 100%;
}

#variation-video-container.active {
    display: block;
}

/* Ajuste para Shorts (9:16) */
#variation-video-container.is-short .video-wrapper {
    padding-bottom: 177.78%;
    max-width: 450px;
    margin: 0 auto;
}

/* Animación de entrada */
@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Encabezado del video */
.video-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.video-header::before {
    content: "▶";
    font-size: 16px;
}

.video-header.short-badge::after {
    content: "SHORT";
    background: #ff0000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: auto;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Wrapper del video (aspect ratio) */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Botón de cerrar */
.video-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-close-btn:hover {
    background: rgba(255,0,0,0.9);
    transform: scale(1.1);
}

/* ============================================
   THUMBNAIL DEL VIDEO (SOLO MÓVIL)
   ============================================ */

.variation-video-thumb {
    display: none; /* Oculto en desktop */
}

.variation-video-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* Botón de play */
.variation-video-thumb::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    padding-left: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.variation-video-thumb:hover::after {
    background: rgba(102, 126, 234, 0.95);
    transform: translate(-50%, -50%) scale(1.15);
}

/* Badge SHORT */
.variation-video-thumb.is-short::before {
    content: "SHORT";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */

@media (max-width: 768px) {
    /* Mostrar thumbnail solo en móvil */
    .variation-video-thumb {
        display: block !important;
        cursor: pointer;
        position: relative;
        border: 3px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        transition: all 0.3s ease;
        margin: 15px 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .variation-video-thumb:hover {
        border-color: #667eea;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    #variation-video-container {
        margin: 15px 0;
        border-radius: 0;
    }
    
    #variation-video-container.is-short .video-wrapper {
        max-width: 100%;
        padding-bottom: 177.78%;
    }
}