/* ==========================================================================
   Cart Carousel – assets/css/cartCarousel.css
   Kompatybilne z Divi 4 i WooCommerce
   ========================================================================== */

/* Wrapper ------------------------------------------------------------------ */
.cartCarousel-wrapper {
    position: relative;
}

.cartCarousel-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 24px;
    color: #1a1a1a;
    text-align:center;
}

/* Swiper override ---------------------------------------------------------- */
.cartCarousel-swiper {
    width: 100%;
    padding-bottom: 48px !important; /* miejsce na paginację */
    overflow: hidden; /* slider nie wychodzi poza wrapper */
}

.swiper-slide.cartCarousel-slide {
    height: auto;
}

/* Karta produktu ----------------------------------------------------------- */
.cartCarousel-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}


/* Obraz -------------------------------------------------------------------- */
.cartCarousel-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f6f6f6;
}

.cartCarousel-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cartCarousel-card:hover .cartCarousel-image-link img {
    transform: scale(1.05);
}

/* Info --------------------------------------------------------------------- */
.cartCarousel-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    flex: 1;
}

.cartCarousel-productTitle {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a !important;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cartCarousel-productTitle:hover {
    color: var(--accent, #000);
}

.cartCarousel-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent, #000);
}

.cartCarousel-price del {
    color: #999;
    font-weight: 400;
    font-size: 0.85rem;
    margin-right: 4px;
}

/* Przycisk ----------------------------------------------------------------- */
.cartCarousel-btn {
    text-align: center;
}

/* Nawigacja Swiper --------------------------------------------------------- */
.cartCarousel-wrapper .swiper-button-prev,
.cartCarousel-wrapper .swiper-button-next {
    width: 44px;
    height: 44px;
    color: #1a1a1a;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.cartCarousel-wrapper .swiper-button-prev::after,
.cartCarousel-wrapper .swiper-button-next::after {
    font-size: 28px;
    font-weight: 700;
}

.cartCarousel-wrapper .swiper-button-prev {
    left: -60px;
}

.cartCarousel-wrapper .swiper-button-next {
    right: -50px;
}

/* Pagination --------------------------------------------------------------- */
.cartCarousel-swiper .swiper-pagination-bullet-active {
    background: var(--accent, #000);
    margin-top: 16px;
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 980px) {
    .cartCarousel-wrapper {
        padding: 0;
    }

    .cartCarousel-wrapper .swiper-button-prev,
    .cartCarousel-wrapper .swiper-button-next {
        display: none;
    }
}

@media (max-width: 768px) {
    .cartCarousel-title {
        font-size: 1.2rem;
    }
}