
.catalog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.ws-catalog-sort{display:flex;align-items:center;gap:8px;margin-left:auto}
.ws-catalog-sort select,.ws-catalog-sort button{min-height:34px;padding:0 10px;border:1px solid #ccc;border-radius:5px;background:#fff}
.ws-catalog-sort button{cursor:pointer;background:#eee;font-weight:700}
@media(max-width:760px){.ws-catalog-sort{width:100%;margin-left:0;flex-wrap:wrap}}


/* Search */
.ws-search-page__summary {
    margin: 14px 0 20px;
    font-size: 16px;
    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| New products
|--------------------------------------------------------------------------
*/

.ws-catalog-product__new {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    padding: 0;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #64181c;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .04em;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .20);
}

/*
|--------------------------------------------------------------------------
| Ozon-style catalog layout
|--------------------------------------------------------------------------
*/

.ws-catalog-page {
    width: 100%;
    box-sizing: border-box;
}

.ws-catalog-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.ws-catalog-filters {
    position: sticky;
    top: 16px;
    min-width: 0;
    padding: 18px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
}

.ws-catalog-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.ws-catalog-filters__header h2 {
    display: none;
}

.ws-catalog-filters__reset {
    color: #8b0000;
    font-size: 13px;
    text-decoration: none;
}

.ws-catalog-filter {
    padding: 0 0 18px;
    margin: 0 0 18px;
    border-bottom: 1px solid #ededed;
}

.ws-catalog-filter:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.ws-catalog-filter h3 {
    margin: 0 0 10px;
    color: #222;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.ws-catalog-filter__current {
    margin-top: 8px;
}

.ws-catalog-filter__current-value {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    line-height: 1.4;
}

.ws-catalog-filter__current-subcategory {
    margin: 5px 0 0 25px;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}

.ws-catalog-filter__options,
.ws-catalog-filter__checks {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ws-catalog-filter__link {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 6px 4px;
    color: #333;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    border-radius: 5px;
}

.ws-catalog-filter__link:hover {
    background: #f7f7f7;
    color: #8b0000;
}

.ws-catalog-filter__link.is-active {
    color: #8b0000;
    font-weight: 700;
}

.ws-catalog-filter__radio {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    box-sizing: border-box;
    border: 2px solid #8b0000;
    border-radius: 50%;
    background: #fff;
}

.ws-catalog-filter__link.is-active .ws-catalog-filter__radio,
.ws-catalog-filter__radio.is-active {
    border: 4px solid #8b0000;
}

.ws-catalog-filter__current-value .is-active + span {
    color: #8b0000;
    font-weight: 700;
}

.ws-catalog-filter__check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 2px;
    color: #333;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}

.ws-catalog-filter__check input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #8b0000;
}

.ws-catalog-sort-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 11px;
}

.ws-catalog-sort-filter:first-of-type {
    margin-top: 0;
}

.ws-catalog-sort-filter > span {
    color: #555;
    font-size: 13px;
    font-weight: 700;
}

.ws-catalog-sort-filter select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
}

.ws-catalog-results {
    min-width: 0;
}

.ws-catalog-results__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 8px;
}

.ws-catalog-results__header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.ws-catalog-results__count {
    margin-top: 5px;
    color: #777;
    font-size: 14px;
}

.ws-catalog-results .ws-catalog-products__grid {
    margin-top: 18px;
}

@media (max-width: 1100px) {
    .ws-catalog-layout {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 20px;
    }
}

@media (max-width: 800px) {
    .ws-catalog-layout {
        grid-template-columns: 1fr;
    }

    .ws-catalog-filters {
        position: static;
    }
}

/*
|--------------------------------------------------------------------------
| Catalog Product Grid
|--------------------------------------------------------------------------
*/

.ws-catalog-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.ws-catalog-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ws-catalog-product:hover {
    border-color: #d0d0d0;
    box-shadow: 0 5px 16px rgba(0,0,0,.07);
}

.ws-catalog-product__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 230px;
    padding: 14px;
    background: #fafafa;
    text-decoration: none;
    box-sizing: border-box;
}

.ws-catalog-product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ws-catalog-product__no-image {
    color: #999;
    font-size: 14px;
}


/*
|--------------------------------------------------------------------------
| Favorite button — top-left on the product image
|--------------------------------------------------------------------------
*/
.ws-catalog-product__image .ws-favorite-button {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: normal;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.16);

    transition: color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ws-catalog-product__image .ws-favorite-button:hover {
    color: #8b0000;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0,0,0,.20);
}

.ws-catalog-product__image .ws-favorite-button.is-favorite {
    color: #8b0000;
}

.ws-catalog-product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 10px 12px 12px;
    box-sizing: border-box;
}

.ws-catalog-product__price {
    margin: 0;
    color: #8b0000;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.ws-catalog-product__stock {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.ws-catalog-product__stock.is-available,
.ws-catalog-product__stock.is-stock-low {
    color: #b00000;
}

.ws-catalog-product__stock.is-stock-good {
    color: #159447;
}

.ws-catalog-product__stock.is-out {
    color: #b00020;
}

.ws-catalog-product__stock.is-archived {
    color: #777;
}

.ws-catalog-product__name {
    display: -webkit-box;
    overflow: hidden;
    min-height: 40px;
    margin-top: 7px;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ws-catalog-product__name:hover {
    color: #222;
}

.ws-catalog-product__actions {
    position: relative;
    display: block;
    margin-top: auto;
    padding-top: 10px;
}

.ws-catalog-product__buy,
.ws-catalog-product__quantity {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.ws-catalog-product__buy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: #8b0000;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}

.ws-catalog-product__buy:hover {
    background: #6f0000;
}

.ws-catalog-product__buy:active {
    transform: scale(.98);
}

.ws-catalog-product__buy:disabled {
    background: #aaa;
    color: #fff;
    cursor: not-allowed;
    transform: none;
}

.ws-catalog-product__quantity {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #8b0000;
}

.ws-catalog-product__quantity button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.ws-catalog-product__quantity button:hover {
    background: rgba(255,255,255,.12);
}

.ws-catalog-product__quantity button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ws-catalog-product__quantity-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.ws-catalog-empty {
    padding: 35px 10px;
    color: #777;
    text-align: center;
}

@media (max-width: 1000px) {
    .ws-catalog-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ws-catalog-products__grid {
        grid-template-columns: 1fr;
    }

    .ws-catalog-product__image {
        height: 240px;
    }
}

/*
|--------------------------------------------------------------------------
| Catalog Infinite Scroll
|--------------------------------------------------------------------------
*/

.ws-catalog-infinite {
    position: relative;
    min-height: 1px;
    margin-top: 20px;
}

.ws-catalog-infinite__sentinel {
    height: 1px;
}

.ws-catalog-infinite__loading {
    display: none;
    padding: 18px 0 25px;
    color: #777;
    font-size: 14px;
    text-align: center;
}

.ws-catalog-infinite__loading.is-visible {
    display: block;
}

.ws-catalog-infinite.is-error .ws-catalog-infinite__loading {
    display: block;
    color: #a00000;
}


/*
|--------------------------------------------------------------------------
| Favorites button in catalog cards
|--------------------------------------------------------------------------
*/

.ws-catalog-product__actions {
    display: block;
}

.ws-catalog-product__actions .ws-catalog-product__details,
.ws-catalog-product__actions .ws-catalog-product__buy,
.ws-catalog-product__actions .ws-favorite-button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ws-catalog-product {
    position: relative;
}

.ws-catalog-product__actions .ws-favorite-button {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: normal;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .16);

    transition:
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.ws-catalog-product__actions .ws-favorite-button:hover {
    color: #8b0000;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .20);
}

.ws-catalog-product__actions .ws-favorite-button.is-favorite {
    color: #8b0000;
}

.ws-catalog-product__actions .ws-favorite-button.is-favorite:hover {
    color: #a00000;
}

@media (max-width: 520px) {
    .ws-catalog-product__actions {
        display: block;
    }
}
