// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    .block.widget .products-grid .owl-carousel .product-item {
        margin-bottom:0;
    }
    .block-product-link,
    .block-category-link {
        &.widget {
            display: block;
            margin-bottom: @indent__base;
        }
    }

    .block-product-link-inline {
        &.widget {
            margin: 0;
        }
    }

    .block.widget {
        .product-item-info {
            width: auto;
        }

        .pager {
            padding: 0;

            .toolbar-amount {
                float: none;
                .lib-font-size(12);
            }

            .pages-item-previous {
                padding-left: 0;
            }

            .pages-item-next {
                position: relative;
            }

            .items {
                white-space: nowrap;
            }
        }
    }
}

//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
    .block.widget .products-grid .product-item {
        .grid-col(3);
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .block.widget .products-grid .product-item {
        .grid-col(3);

        .sidebar & {
            margin-left: 0;
            width: 100%;

            .actions-secondary {
                display: block;
                padding: 10px 0;
            }
        }
    }

    .page-layout-1column .block.widget .products-grid .product-item {
        .grid-col(4);
    }

    .page-layout-3columns .block.widget .products-grid .product-item {
        .grid-col(2);
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
    .block.widget .products-grid .product-item {
        .grid-col(4);
        padding: 0;
    }
    .page-layout-1column .block.widget .products-grid .product-item {
        .grid-col(5);
    }
    .page-layout-3columns .block.widget .products-grid .product-item {
        .grid-col(3);
    }
    .block.widget .products-grid .owl-carousel.product-grid .product-item {
        margin-left:0;
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .sidebar .block.widget .pager {
        .item:not(.pages-item-next):not(.pages-item-previous) {
            &:extend(.abs-no-display-desktop all);
        }

        .pages-item-next {
            padding: 0;

            .action {
                margin: 0;
            }
        }
    }
}
