/**
 * Styly pro carousel nejprodávanějších produktů
 * Používá existující produktové karty
 */

/* Wrapper pro carousel */
.bestselling-carousel-wrapper {
    margin: 30px 0;
}

/* Nadpis nad carouselem */
.bestselling-title-homepage {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* Základní carousel kontejner */
.bestselling-carousel {
    display: flex;
    align-items: center;
}

/* Ovládací tlačítka carouselu */
.bestselling-carousel-prev,
.bestselling-carousel-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.bestselling-carousel-prev:hover,
.bestselling-carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Carousel inner container */
.bestselling-carousel-inner {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Carousel slides container */
.bestselling-carousel-slides {
    display: flex;
    transition: transform 0.5s ease;
}

/* Carousel slide */
.bestselling-carousel-slide {
    width: 100%;
    flex-shrink: 0;
}

/* Produkty v slidu */
.bestselling-carousel-products {
    /* Same as category pages */
    width: 100%;
    display: flex;
}

/* Produkt item */
.bestselling-product-item {
    display: block;
    width:100%;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
}
.swiper-pagination {
    display:none;
}
/* Swiper arrows smaller */
.swiper-button-prev,
.swiper-button-next {
    width: 30px !important;
    height: 30px !important;
    font-size: 16px !important;
    background: unset !important;
    border-radius: 50% !important;
    color: #d5470f !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: unset !important;
}
.swiper-pagination-bullet-active {
    background: #d5470f !important;
}
/* Wrapper for carousel with buttons inside wrapper */
.bestselling-carousel-wrapper,
.category-carousel-wrapper,
.reference-carousel-wrapper {
    position: relative;
    padding-left: 40px;
    padding-right: 40px;
}

.bestselling-carousel-wrapper .swiper,
.category-carousel-wrapper .swiper {
    margin-left: -0px;
    margin-right: -0px;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
}

.reference-carousel-wrapper .swiper {
    margin-left: -0px;
    margin-right: -0px;
}

.bestselling-carousel-wrapper .swiper-button-prev,
.category-carousel-wrapper .swiper-button-prev,
.reference-carousel-wrapper .swiper-button-prev {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.bestselling-carousel-wrapper .swiper-button-next,
.category-carousel-wrapper .swiper-button-next,
.reference-carousel-wrapper .swiper-button-next {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Ensure products are 4 per row */
.bestselling-product-item .construct {
    width: 100% !important;
}

.bestselling-carousel-prev span,
.bestselling-carousel-next span {
    display: block;
    line-height: 1;
}

/* Indikátory */
.bestselling-carousel-indicators {
    position: relative;
    bottom: auto;
    margin-top: 20px;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.bestselling-carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease;
    text-indent: -9999px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.bestselling-carousel-indicators button.active {
    background: #e74c3c;
    border-color: #e74c3c;
}

.bestselling-carousel-indicators button:hover {
    border-color: #e74c3c;
}

/* Responsivita */
@media (max-width: 991px) {
    .bestselling-carousel {
        padding: 0 40px;
    }

    .bestselling-carousel-prev,
    .bestselling-carousel-next {
        width: 35px;
        height: 35px;
        font-size: 25px;
    }

    .bestselling-carousel-products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .bestselling-carousel {
        padding: 0 35px;
    }

    .bestselling-carousel-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .bestselling-carousel-prev,
    .bestselling-carousel-next {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .bestselling-carousel {
        padding: 0 30px;
    }

    .bestselling-carousel-products {
        grid-template-columns: 1fr;
    }
}