/* Thumbnail carousel */
.swiper {
    position: relative;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.swiper-slide video {
    width: 100%;
    /* max-width: 260px;   */
    aspect-ratio: 9/16;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s;
}

/* Custom thumbnail navigation */
.thumb-next,
.thumb-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.thumb-next {
    right: 10px;
}

.thumb-prev {
    left: 10px;
}

/* Lightbox overlay */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 91%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Close button */
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

/* Lightbox swiper */
.lightbox .swiper {
    width: 100%;
    max-width: 900px;
    position: relative;
}

.lightbox video {
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    overflow: hidden;
}

/* Custom lightbox navigation */
.lightbox-next,
.lightbox-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev {
    left: 10px;
}

/* Video progress bar */
.video-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: #01c05f;
    width: 0%;
    transition: width 0.1s linear;
    z-index: 5;
}

/* Center mode scaling */
.lightbox .swiper-slide {
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0.5;
    position: relative;
}

.lightbox .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
    z-index: 9;
}

.lightbox .swiper-slide-next,
.lightbox .swiper-slide-prev {
    transform: scale(0.8);
    opacity: 0.7;
}

.swiper-slide-next .thumbnail-content.popup-content-wrapper {
    display: none !important;
}

.lightbox .swiper-slide-prev .thumbnail-content.popup-content-wrapper {
    display: none !important;
}

.lightbox .swiper-slide-next {
    right: 50px;
    z-index: 1;
}

.lightbox .swiper-slide-prev {
    left: 50px;
    z-index: 1;
}

.lightbox .swiper-wrapper {
    gap: 0 !important;
}

.video-popup-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
}

/* Buttons overlay */
.btn-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5;
    display: none;
}

.btn-overlay button {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-overlay button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.swiper-slide-active .btn-overlay {
    display: flex;
}

.thumbnail-product-title {
    font-size: 11px;
    line-height: normal;
    margin-bottom: 4px;
    color: #000;
}

.thumbnail-right-content {
    padding-left: 4px;
    width: calc(100% - 40px);
}

.thumbnail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background-color: #ffffffb5;
    border-radius: 5px;
    padding: 5px;
    align-items: center;
    position: absolute;
    bottom: 10px;
    width: 90%;
    left: 0px;
    right: 0px;
    margin: auto;
}

.view-cart-grid {
    width: 100%;
    display: block;
}

.thumbnail-price {
    margin: 0px;
    font-size: 9px;
    line-height: normal;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: #000;
    font-weight: 600;
}

.thumbnail-left-image img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 5px;
}

.thumbnail-left-image {
    display: flex;
    align-items: center;
}

span.cut-price {
    text-decoration: line-through;
}

.thumbnail-wrapper {
    position: relative;
    display: flex;
    flex-wrap: wrap;
}

.view-cart {
    color: #fff;
    background-color: #000;
    display: block;
    border: 1px solid #000;
    padding: 6px 8px;
    border-radius: 2px;
    font-size: 10px;
    text-align: center;
    line-height: normal;
    width: fit-content;
    margin-top: 4px;
    width: 100%;
}

.arrow-up {
    position: absolute;
    width: 15px;
    right: 2px;
    top: 2px;
}

.view-cart:hover {
    color: #000;
    background-color: transparent;
}

.hide-it {
    display: none !important;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .lightbox .close {
        top: 10px;
        right: 10px;
    }

    .swiper-slide-next .thumbnail-content.popup-content-wrapper {
        display: block !important;
    }

    .lightbox .swiper-slide-prev .thumbnail-content.popup-content-wrapper {
        display: block !important;
    }

    .video-popup-wrapper {
        max-width: 80%;
    }

    .lightbox .swiper-slide-next,
    .lightbox .swiper-slide-prev {
        transform: unset;
    }

    .lightbox .swiper-slide-active {
        transform: unset;
    }
}

@media (max-width: 768px) {
    .thumbnail-left-image img {
        width: 30px;
        height: 30px;
        object-fit: cover;
        border-radius: 5px;
    }
}
