/* Category title: name left, View all right */
.hp-module-trending .hp-module-title,
.home-carousel-container .hp-module-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    width: 100%;
}
.hp-module-trending .hp-module-title .title-wrapper { flex: 1 1 auto; text-align: left !important; }
.hp-module-trending .hp-module-title .view-all,
.hp-module-trending .hp-module-title a.view-all.btn {
    flex: 0 0 auto;
    margin-left: auto !important;
    text-align: right !important;
    color: #274158 !important;
    font-weight: 600;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
}

/* Product slider: phone 2 cards, tablet 2, desktop 4 */
.t3-product-carousel {
    position: relative;
    overflow: hidden !important;
    width: 100%;
    max-width: 100%;
}
.t3-product-carousel .carousel-inner.product-carousels {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    overflow: visible !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.35s ease;
    will-change: transform;
    float: none !important;
}
.t3-product-carousel .carousel-inner.product-carousels > .product {
    display: flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
}
.t3-product-carousel .product-inner {
    width: 100%;
    height: 100%;
    padding: 12px !important;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
}
.t3-product-carousel .product-image,
.t3-product-carousel .product-image-link,
.t3-product-carousel .product-image.image-available {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 0 12px !important;
    min-height: 0;
    text-align: center;
}
.t3-product-carousel .product-image img,
.t3-product-carousel .product-image-link img,
.t3-product-carousel .carousel-container .product-inner .product-image img {
    width: 100% !important;
    max-width: 220px;
    height: auto !important;
    max-height: 220px;
    margin: 0 auto;
    object-fit: contain;
    display: block !important;
}
.t3-product-carousel .carousel-control {
    z-index: 5;
    cursor: pointer;
}
.t3-product-carousel .carousel-control.disabled {
    opacity: 0.35;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .t3-product-carousel .carousel-inner.product-carousels > .product {
        flex: 0 0 50% !important;
        flex-basis: 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }
    .t3-product-carousel .product-inner {
        padding: 10px 8px 12px !important;
        border-radius: 14px;
        box-shadow: 0 6px 16px rgba(24, 27, 31, 0.06);
    }
    .t3-product-carousel .product-image,
    .t3-product-carousel .product-image-link {
        min-height: 0;
        margin-bottom: 8px !important;
    }
    .t3-product-carousel .product-image img,
    .t3-product-carousel .product-image-link img,
    .t3-product-carousel .carousel-container .product-inner .product-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 150px !important;
        min-height: 0 !important;
    }
    .t3-product-carousel .product-title,
    .t3-product-carousel .product-inner .product-title {
        height: 2.7em !important;
        margin-top: 2px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        font-weight: 600 !important;
        text-align: left !important;
    }
    .t3-product-carousel .product-price .price,
    .t3-product-carousel .product-price .price bdi {
        font-size: 15px !important;
        font-weight: 700 !important;
    }
    .t3-product-carousel .product-price .price-olp,
    .t3-product-carousel .product-price .price-olp bdi {
        font-size: 12px !important;
    }
    .t3-product-carousel .btn-add-to-cart,
    .t3-product-carousel .add-to-cart-wrapper .btn-add-to-cart {
        width: 100% !important;
        min-height: 36px !important;
        padding: 8px 6px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }
    .carousel-container {
        padding: 8px 0 4px !important;
    }
    .hp-module-trending .hp-module-title,
    .home-carousel-container .hp-module-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 8px 0 12px;
        padding: 0;
    }
    .hp-module-trending .hp-module-title b,
    .hp-module-trending .title-wrapper b {
        font-size: 20px !important;
        line-height: 1.3;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .t3-product-carousel .carousel-inner.product-carousels > .product {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding: 0 8px !important;
    }
    .t3-product-carousel .product-image img,
    .t3-product-carousel .product-image-link img,
    .t3-product-carousel .carousel-container .product-inner .product-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
    }
    .t3-product-carousel .product-title,
    .t3-product-carousel .product-inner .product-title {
        font-size: 16px !important;
        height: auto !important;
        line-height: 1.35 !important;
    }
    .t3-product-carousel .btn-add-to-cart {
        min-height: 44px !important;
        width: 100% !important;
        border-radius: 10px !important;
    }
    .carousel-container {
        padding: 16px 0 8px !important;
    }
}

@media (min-width: 992px) {
    .t3-product-carousel .carousel-inner.product-carousels > .product {
        flex: 0 0 calc(100% / 4) !important;
        width: calc(100% / 4) !important;
        max-width: calc(100% / 4) !important;
        padding: 0 8px !important;
    }
}
