.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px 8px;
}
.catalog-product-grid > .a-col-pr { width: auto; min-width: 0; }
.catalog-product-grid > .a-spt-hl { grid-column: 1 / -1; }
/* Size the photo row from this card's current width when the column count changes. */
.catalog-product-grid .a-item { container-type: inline-size; }
.catalog-product-grid .a-item_img { height: 100cqi; }

.catalog-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin: 28px 0;
    font-variant-numeric: tabular-nums;
}
.catalog-pages a, .catalog-pages [aria-current] {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    flex: 0 1 44px;
    min-width: 36px;
    min-height: 44px;
    padding: 0 4px;
    border-radius: 5px;
    color: #61656b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.catalog-pages [aria-current] {
    background: #303438;
    color: #fff;
    font-weight: 600;
}
.catalog-pages a {
    background: #f5f6f7;
    border: 1px solid #dde0e4;
    touch-action: manipulation;
    transition: none;
}
.catalog-pages a[rel] { font-size: 18px; }
.catalog-pages a:focus-visible { outline: 2px solid #52667b; outline-offset: 2px; }
@media (hover: hover) {
    .catalog-pages a:hover { background: #e7edf2; color: #34485b; text-decoration: none; }
}
.catalog-pages a:active {
    background: #d9e2ea;
    color: #263949;
    box-shadow: inset 0 1px 3px rgb(38 57 73 / 16%);
}
@media (prefers-reduced-motion: no-preference) {
    .catalog-pages a { transition: background-color 140ms ease-out, color 140ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out; }
    .catalog-pages a:active { transform: translateY(1px) scale(.96); transition-duration: 0s; }
}
.catalog-pages .pages-gap { flex: 0 0 10px; text-align: center; color: #757a80; }
.catalog-density { display: none; }
@media (max-width: 1100px) {
    .catalog-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .catalog-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 5px; }
    .catalog-product-grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subcategory-toolbar {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .subcategory-toolbar .catalog-sort {
        flex: 1 1 0;
        padding-inline: 8px 24px;
        background-position: right 7px center;
        text-overflow: ellipsis;
    }
    .subcategory-toolbar .catalog-density { flex: 0 0 auto; }
    .subcategory-toolbar .catalog-filter-toggle {
        flex: 0 0 auto;
        padding-inline: 8px;
    }
    .subcategory-toolbar .catalog-filter-toggle.is-filtered {
        color: #fff;
        background: #1463bc;
        border-color: #1463bc;
    }
    .subcategory-toolbar .catalog-filter-toggle.is-filtered[aria-expanded="true"] {
        background: #104e96;
        border-color: #104e96;
    }
    .search-catalog-toolbar { flex-wrap: nowrap; }
    .search-catalog-toolbar .catalog-sort { flex: 1 1 0; }
    .search-catalog-toolbar .catalog-density { flex: 0 0 auto; margin-left: auto; }
    .catalog-density:not([hidden]) {
        display: inline-flex;
        border: 1px solid #d9dbde;
        border-radius: 6px;
        padding: 2px;
        background: #f1f2f3;
    }
    .catalog-density button {
        display: grid;
        place-items: center;
        width: 34px;
        height: 30px;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: #71767d;
    }
    .catalog-density [aria-pressed="true"] { background: white; color: #202124; box-shadow: 0 1px 3px #0002; }
}
