/* Keep the bestseller product grid usable if the external Bootstrap CSS is delayed. */
.bestseller-header .container,
.bestseller-listing .products-section-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 20px;
}

.bestseller-listing .products-section-container > .row {
    display: block;
    width: 100%;
    margin: 0;
}

.bestseller-listing .listing-main {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
}

.bestseller-listing .products-list-bar,
.bestseller-listing .products-list-bar-controls form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.bestseller-listing .products-list-bar { justify-content: space-between; }
.bestseller-listing .products-list-bar-controls form { gap: 12px; }

.bestseller-listing #productsContainer > .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 22px;
    width: 100%;
    margin: 0;
}

.bestseller-listing .rw-product-col {
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.bestseller-listing .rw-product-card { min-width: 0; }

.bestseller-listing .listing-pagination {
    max-width: 100%;
    margin-top: 40px;
}

.bestseller-listing .listing-pagination .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.bestseller-listing .listing-pagination .page-item { display: block; }
.bestseller-listing .listing-pagination .page-link {
    box-sizing: border-box;
    border: 1px solid #dedede;
    text-decoration: none;
}

.bestseller-listing .listing-pagination .page-item.disabled .page-link {
    opacity: .55;
    cursor: default;
}

@media (max-width: 991.98px) {
    .bestseller-listing .listing-pagination .pagination {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        justify-content: center !important;
    }
}

@media (max-width: 991.98px) {
    .bestseller-listing #productsContainer > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }
}

@media (max-width: 575.98px) {
    .bestseller-header .container,
    .bestseller-listing .products-section-container { padding-inline: 16px; }
    .bestseller-listing #productsContainer > .row { grid-template-columns: minmax(0, 1fr); }
}
