/* Product Videos Plugin Styles */

.pv-container {
    margin: 60px 0;
    padding: 40px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.pv-header {
    text-align: center;
    margin-bottom: 50px;
}

.pv-title {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pv-icon {
    width: 28px;
    height: 28px;
}

.pv-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Grid layouts for different video counts */
.pv-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.pv-grid-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pv-grid-double {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
}

.pv-grid-single {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.pv-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    position: relative;
}

.pv-grid-single .pv-card {
    width: 100%;
}

.pv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    border-color: #ff0000;
}

.pv-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #000;
}

.pv-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pv-card:hover .pv-image {
    transform: scale(1.05);
}

.pv-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
}

/* Overlay with play icon and text */
.pv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pv-card:hover .pv-overlay {
    opacity: 1;
}

.pv-play-icon {
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.pv-card:hover .pv-play-icon {
    transform: scale(1.1);
}

.pv-play-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 0, 0, 0.8);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.pv-card:hover .pv-play-text {
    background: #ff0000;
    transform: scale(1.05);
}

.pv-content {
    padding: 15px;
    text-align: center;
    background: #fff;
}

.pv-video-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Video embed overlay - SIMPLIFIED */
.pv-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pv-video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pv-video-wrapper {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pv-video-overlay.active .pv-video-wrapper {
    transform: scale(1);
}

.pv-video-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.pv-video-close:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.pv-video-iframe {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.pv-video-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .pv-grid-triple {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0 20px;
    }
    
    .pv-grid-double {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .pv-title {
        font-size: 26px;
    }
    
    .pv-thumbnail {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .pv-container {
        margin: 40px 0;
        padding: 30px 0;
    }
    
    .pv-title {
        font-size: 24px;
        flex-direction: column;
        gap: 5px;
    }
    
    .pv-grid-triple,
    .pv-grid-double {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 20px;
        margin: 0 auto;
        padding: 0 15px;
    }
    
    .pv-thumbnail {
        height: 150px;
    }
    
    .pv-video-title {
        font-size: 15px;
    }
    
    .pv-video-wrapper {
        width: 95%;
        margin: 0 10px;
    }
    
    .pv-overlay {
        opacity: 1; /* Always show on mobile for better UX */
        background: rgba(0, 0, 0, 0.4);
    }
}

@media (max-width: 480px) {
    .pv-title {
        font-size: 22px;
    }
    
    .pv-subtitle {
        font-size: 15px;
    }
    
    .pv-content {
        padding: 12px;
    }
    
    .pv-thumbnail {
        height: 140px;
    }
    
    .pv-play-text {
        font-size: 12px;
        padding: 4px 12px;
    }
}