/* Video Player Styling */

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.video-embed {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Direct video element */
video.video-embed {
    max-width: 100%;
    display: block;
}

/* Category Video Banner */
.category-video-banner {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.category-video-banner .video-responsive {
    border-radius: 0;
    box-shadow: none;
}

/* Product Video Section */
.product-video-section {
    margin: 2rem 0;
}

.product-video-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Video Ad Section - Homepage */
.video-ads-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.video-ad-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-ad-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.video-ad-content {
    padding: 2rem;
}

.video-ad-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

.video-ad-content p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.video-ad-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--bs-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.video-ad-cta:hover {
    background: var(--bs-secondary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Video Play Button Overlay (for thumbnails with lazy load) */
.video-thumbnail-wrapper {
    position: relative;
    cursor: pointer;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-play-overlay i {
    font-size: 2rem;
    color: var(--bs-primary);
    margin-left: 5px;
}

.video-thumbnail-wrapper:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .video-ads-section {
        padding: 2rem 0;
    }
    
    .video-ad-content {
        padding: 1.5rem;
    }
    
    .video-ad-content h3 {
        font-size: 1.4rem;
    }
    
    .video-ad-content p {
        font-size: 1rem;
    }
    
    .category-video-banner {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .video-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .video-play-overlay i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .video-ad-content {
        padding: 1rem;
    }
    
    .video-ad-content h3 {
        font-size: 1.25rem;
    }
    
    .video-ad-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .video-ad-cta {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Video in Product Gallery */
.product-gallery .video-responsive {
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Loading State */
.video-loading {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    border-radius: 12px;
}

.video-loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 3px solid #e9ecef;
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
