/* ===== NAPACOMP VIDEO GALLERY v2.0.2 ===== */
/* Credit by Liemmkt - 0345781754 */
/* CHỈ CSS cho Video - KHÔNG override Flatsome/Flickity */

/* Fix row thumbnail margin */
.napacomp-product-gallery .product-thumbnails.row-small.row-slider {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.napacomp-product-gallery .product-thumbnails .is-nav-selected a,
.napacomp-product-gallery .product-thumbnails a:hover {
    border-color: var(--fs-color-alert, #446084);
}

/* ===== VIDEO SLIDE ===== */
.napacomp-product-gallery .video-slide .video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    margin: 0;
    background: #000;
    border-radius: 4px;
}

/* Ratio Classes */
.napacomp-product-gallery .video-slide.ratio-1-1 .video-wrapper {
    padding-top: 100%;
}

.napacomp-product-gallery .video-slide.ratio-4-3 .video-wrapper {
    padding-top: 75%;
}

.napacomp-product-gallery .video-slide.ratio-16-9 .video-wrapper {
    padding-top: 56.25%;
}

.napacomp-product-gallery .video-slide.ratio-9-16 .video-wrapper {
    padding-top: 177.78%;
    max-height: 70vh;
}

/* Video thumbnail & iframe */
.napacomp-product-gallery .video-slide .video-wrapper img.video-placeholder-img,
.napacomp-product-gallery .video-slide .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play button */
.napacomp-product-gallery .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.napacomp-product-gallery .video-play-overlay:hover {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.napacomp-product-gallery .video-play-overlay:hover i {
    color: #fff;
}

.napacomp-product-gallery .video-play-overlay i {
    color: #ff0000;
    font-size: 24px;
    margin-left: 3px;
}

/* Shorts badge */
.napacomp-product-gallery .shorts-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff0050, #ff0000);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 3;
}

/* Hide play button when video is playing */
.napacomp-product-gallery .video-slide.is-playing .video-play-overlay {
    display: none;
}

/* ===== VIDEO THUMBNAIL ===== */
.napacomp-product-gallery .video-thumb .video-thumb-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 4px;
    text-align: center;
    padding-top: 100%;
}

.napacomp-product-gallery .video-thumb .video-thumb-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: auto;
}

.napacomp-product-gallery .video-thumb .video-thumb-label {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

/* Prevent zoom effect on video */
.napacomp-product-gallery .video-slide:hover .video-wrapper img {
    transform: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 849px) {
    .napacomp-product-gallery .video-play-overlay {
        width: 50px;
        height: 50px;
    }

    .napacomp-product-gallery .video-play-overlay i {
        font-size: 20px;
    }

    .napacomp-product-gallery .video-slide.ratio-9-16 .video-wrapper {
        max-height: 50vh;
    }
}

@media (max-width: 549px) {
    .napacomp-product-gallery .shorts-badge {
        font-size: 9px;
        padding: 3px 6px;
    }

    .napacomp-product-gallery .video-thumb .video-thumb-label {
        font-size: 9px;
    }
}
