/* BEST SELLING BOOKS SLIDER - FIX HEIGHT COLLAPSE & ADD NAVIGATION */

/* Prevent height collapse during transitions */
.swiper-two {
    overflow: hidden !important;
    min-height: 500px !important;
    position: relative;
}

.swiper-two .swiper-wrapper {
    display: flex;
    align-items: stretch;
    min-height: 480px;
}

.swiper-two .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure book cards maintain height */
.swiper-two .books-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

/* Navigation arrows styling */
.bestseller-button-prev,
.bestseller-button-next {
    position: static !important;
    width: 45px;
    height: 45px;
    background: #9b8143;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.bestseller-button-prev:hover,
.bestseller-button-next:hover {
    background: #7a6534;
    transform: scale(1.1);
}

.bestseller-button-prev.swiper-button-disabled,
.bestseller-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Pagination dots styling */
.bestseller-pagination {
    position: relative !important;
    margin-top: 30px;
    text-align: center;
}

.bestseller-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #9b8143;
    opacity: 0.3;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.bestseller-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.3);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .swiper-two {
        min-height: 450px !important;
    }

    .swiper-two .swiper-wrapper {
        min-height: 430px;
    }
}

@media (max-width: 767px) {
    .swiper-two {
        min-height: 400px !important;
    }

    .swiper-two .swiper-wrapper {
        min-height: 380px;
    }

    .bestseller-button-prev,
    .bestseller-button-next {
        width: 40px;
        height: 40px;
    }
}

/* Prevent flash during initialization */
.swiper-two:not(.swiper-container-initialized) {
    opacity: 0;
}

.swiper-two.swiper-container-initialized {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Smooth transitions */
.swiper-two .swiper-slide {
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* Ensure no blank space shows */
.swiper-two .swiper-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}
