/* ============================================
   Videos TikTok – Frontend Styles
   ============================================ */

.bsv-section {
    padding: 40px 0;
    overflow: hidden;
}

.bsv-heading {
    text-align: left;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 24px 40px;
    font-weight: 400;
    color: #333;
}

/* Carousel wrapper */
.bsv-carousel-wrapper {
    position: relative;
    padding: 0 40px;
}

.bsv-carousel {
    overflow: hidden;
    width: 100%;
}

.bsv-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    cursor: grab;
}

.bsv-track.is-dragging {
    cursor: grabbing;
    transition: none;
}

/* Slide */
.bsv-slide {
    flex: 0 0 auto;
    width: calc((100% - 16px * 4) / 5);
    display: flex;
    flex-direction: column;
    gap: 0;
    user-select: none;
}

/* Video container */
.bsv-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    cursor: pointer;
}

.bsv-video-container video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Instagram iframe embed */
.bsv-ig-container {
    background: #000;
    aspect-ratio: auto;
    height: 560px;
}

.bsv-ig-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Play overlay */
.bsv-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bsv-video-container:not(.is-playing) .bsv-video-overlay {
    opacity: 1;
}

.bsv-play-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s;
}

.bsv-play-btn:hover {
    transform: scale(1.1);
}

/* Mute button */
.bsv-mute-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.bsv-video-container.is-playing .bsv-mute-btn {
    opacity: 1;
}

.bsv-mute-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ============================================
   Lightbox
   ============================================ */

.bsv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.bsv-lightbox.is-open {
    display: flex;
}

.bsv-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.bsv-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
}

.bsv-lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    background: #000;
    outline: none;
}

.bsv-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bsv-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Lightbox navigation */
.bsv-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.bsv-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.bsv-lightbox-prev {
    left: -64px;
}

.bsv-lightbox-next {
    right: -64px;
}

@media (max-width: 768px) {
    .bsv-lightbox-prev {
        left: 8px;
    }

    .bsv-lightbox-next {
        right: 8px;
    }
}

/* Navigation arrows */
.bsv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 30px));
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #333;
}

.bsv-nav:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.bsv-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.bsv-nav-prev {
    left: 4px;
}

.bsv-nav-next {
    right: 4px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1200px) {
    .bsv-slide {
        width: calc((100% - 16px * 3) / 4);
    }
}

@media (max-width: 992px) {
    .bsv-slide {
        width: calc((100% - 16px * 2) / 3);
    }
}

@media (max-width: 768px) {
    .bsv-heading {
        margin-left: 16px;
        font-size: 1.1rem;
    }

    .bsv-carousel-wrapper {
        padding: 0 16px;
    }

    .bsv-slide {
        width: calc((100% - 12px) / 2);
    }

    .bsv-track {
        gap: 12px;
    }

    .bsv-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .bsv-slide {
        width: 75%;
    }
}
