:root {
    --product-card-columns: 4;
    --product-card-min-width: 175px;
    --product-card-gap: 6px;
}

.products-list:has(.slide.manager-view),
.view-slider:has(.slide.manager-view) {
    --product-card-columns: 5;
    --product-card-min-width: 178px;
}

.last-views .product-title {
    height: auto;
    overflow-y: visible;
}

/* Both badges stay inside the photo on desktop and mobile. */
.last-views .image.product-preview .overlay.moll-original {
    position: absolute;
    left: 5px;
    right: auto;
    top: auto;
    bottom: 5px;
    width: 77px;
}

.last-views .image.product-preview .overlay.moll-original .overlay-content {
    position: static;
    width: auto;
}

.image.product-preview .product-country-flag {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 1;
    line-height: 0;
}

.last-views .image.product-preview .product-country-flag img {
    display: block;
    width: 32px;
    height: 24px;
    max-width: none;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .12);
}

@media (min-width: 769px) {
    .last-views .image.product-preview .overlay.free-delivery .overlay-btn,
    .last-views .image.product-preview .overlay.delivery-1-2-h .overlay-btn {
        margin-right: 0;
    }

    .products-list,
    .products-list > .row {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(max(
            var(--product-card-min-width),
            calc((100% - (var(--product-card-columns) - 1) * var(--product-card-gap)) / var(--product-card-columns))
        ), 1fr));
        gap: 15px var(--product-card-gap);
    }

    /* Legacy brand groups contain their own row of product cards. */
    .products-list > .row {
        width: 100%;
        margin: 0;
    }

    .products-list > :not(.slide):not(.show-more),
    .products-list > .row > :not(.slide):not(.show-more) {
        grid-column: 1 / -1;
    }

    .products-list .slide,
    .products-list .slide.manager-view,
    .products-list .show-more {
        width: auto;
        max-width: none;
        min-width: 0;
        margin: 0;
        float: none;
    }
}
