/* Related / Best-selling Products Carousels - Optimized for Speed */

.products-carousel-section {
    background: #f7f7f7;
    padding: 24px 16px;
    border-radius: 20px;
    margin: 32px 0;
    position: relative;
    contain: content;
}

.products-carousel-section .section-title {
    text-align: center;
    margin-bottom: 20px;
}

.products-carousel-section .section-title h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.products-carousel-section .section-title p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.js-product-swiper {
    padding: 4px 4px 8px;
    position: relative;
}

.js-product-swiper .swiper-slide {
    height: auto;
}

/* Nav buttons */
.js-product-swiper .swiper-button-prev,
.js-product-swiper .swiper-button-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgb(0 0 0 / .12);
    color: #333;
    top: 42%;
}

.js-product-swiper .swiper-button-prev:after,
.js-product-swiper .swiper-button-next:after {
    font-size: 14px;
    font-weight: 700;
}

.js-product-swiper .swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 576px) {
    .js-product-swiper .swiper-button-prev,
    .js-product-swiper .swiper-button-next {
        display: none;
    }
}

/* Product card */
.product-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 10px rgb(0 0 0 / .05);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgb(0 0 0 / .08);
}

.product-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    aspect-ratio: 1/1;
}

.product-card h6 {
    font-size: .9rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    min-height: 2.5em;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-wrapper {
    margin-top: 6px;
}

.price-wrapper del {
    color: #999;
    font-size: .78rem;
}

.price-wrapper .text-danger {
    color: #d32f2f !important;
    font-weight: 600;
    font-size: .9rem;
}

.price-wrapper .text-dark {
    color: #333 !important;
    font-weight: 600;
    font-size: .9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .products-carousel-section {
        padding: 16px 8px;
        border-radius: 12px;
    }

    .product-card {
        padding: 12px;
    }

    .product-card h6 {
        font-size: .85rem;
    }
}

@media (max-width: 575px) {
    .product-card {
        padding: 10px;
    }
}
