/* WooCommerce YouTube Gallery Styles */

/* YouTube thumbnail styles */
.youtube-thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Increase thumbnail height */
.youtube-thumbnail-container img.wp-post-image {
    width: 100%;
    height: auto;
    min-height: 120px; /* Increased height */
    object-fit: cover;
}

/* YouTube logo overlay for thumbnails */
.youtube-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 42px;
    z-index: 2;
    opacity: 0.9;
}

/* YouTube embed container - Increased size by 1.5x */
.youtube-embed-container {
    position: relative;
    padding-bottom: 84.375%; /* 16:9 aspect ratio * 1.5 = 84.375% */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Fix for FlexSlider integration */
.youtube-video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Product YouTube icon for archive/shop pages */
.product-youtube-icon {
    position: absolute;
    top: 45%; /* Размещение по вертикальному центру */
    right: 3px;
    transform: translateY(-50%); /* Корректировка для идеального центрирования */
    z-index: 10;
}

/* YouTube button style */
.youtube-button {
    width: 55px;
    height: 55px;
    background-color: #caab82;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.youtube-button:hover {
    opacity: 1;
}

.youtube-button svg {
    width: 25px;
    height: 25px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .youtube-logo-overlay {
        width: 48px;
        height: 34px;
    }
    
    .youtube-button {
        width: 45px;
        height: 45px;
    }
    
    .youtube-button svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .youtube-logo-overlay {
        width: 40px;
        height: 28px;
    }
    
    .youtube-button {
        width: 35px;
        height: 35px;
    }
    
    .youtube-button svg {
        width: 18px;
        height: 18px;
    }
}