.catalog-page {
    padding: 28px 0 48px;
    background: #f7f8fa;
}

.catalog-header,
.catalog-toolbar,
.catalog-brand-rail,
.catalog-sidebar,
.catalog-results {
    background: #fff;
    border: 1px solid #e8ebef;
    border-radius: 14px;
}

.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.catalog-header h1 {
    margin: 0 0 5px;
    color: #222;
    font-size: 22px;
    font-weight: 800;
}

.catalog-header p {
    margin: 0;
    color: #777;
    font-size: 13px;
}

.catalog-current-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 700;
}

.catalog-current-brand img {
    width: 52px;
    height: 52px;
    border: 1px solid #eceff2;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.catalog-brand-rail {
    margin-bottom: 14px;
    padding: 14px;
}

.catalog-brand-rail__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.catalog-brand-rail__head a {
    color: var(--primary-color, #46a9ae);
    font-size: 12px;
}

.catalog-brand-rail__items {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 5px;
    scrollbar-width: thin;
}

.catalog-brand-rail__item {
    min-width: 94px;
    padding: 8px;
    border: 1px solid #eceff2;
    border-radius: 12px;
    color: #444;
    text-align: center;
    transition: .2s ease;
}

.catalog-brand-rail__item img {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 6px;
    object-fit: contain;
}

.catalog-brand-rail__item span {
    display: block;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-brand-rail__item:hover,
.catalog-brand-rail__item.is-active {
    border-color: var(--primary-color, #46a9ae);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .06);
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.catalog-toolbar__summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-result-count {
    color: #777;
    font-size: 12px;
}

.catalog-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 9px;
    padding: 9px 12px;
    background: #f2f7f7;
    color: #24686c;
    font-family: inherit;
}

.catalog-filter-toggle span {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-color, #46a9ae);
    color: #fff;
    font-size: 10px;
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #666;
    font-size: 12px;
}

.catalog-sort select {
    min-width: 145px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
    color: #333;
    font-family: inherit;
    outline: none;
}

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

.catalog-sidebar {
    position: sticky;
    top: 15px;
    overflow: hidden;
}

.catalog-sidebar__mobile-head {
    display: none;
}

.catalog-filter-section {
    padding: 15px;
    border-bottom: 1px solid #eef0f2;
}

.catalog-filter-section h3 {
    margin: 0 0 11px;
    color: #333;
    font-size: 14px;
    font-weight: 800;
}

.catalog-filter-list--scroll,
.catalog-brand-filter,
.catalog-color-filter {
    max-height: 230px;
    overflow-y: auto;
    padding-left: 3px;
    scrollbar-width: thin;
}

.catalog-check-row,
.catalog-color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 2px;
    color: #505050;
    cursor: pointer;
    font-size: 12px;
}

.catalog-check-row input,
.catalog-color-option input,
.catalog-stock-filter input {
    accent-color: var(--primary-color, #46a9ae);
}

.catalog-brand-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.catalog-brand-option {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px;
    border: 1px solid #eceff2;
    border-radius: 10px;
    cursor: pointer;
}

.catalog-brand-option.is-selected {
    border-color: var(--primary-color, #46a9ae);
    background: #f2fbfb;
}

.catalog-brand-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.catalog-brand-option img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
}

.catalog-brand-option span {
    overflow: hidden;
    color: #444;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-color-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-color-option {
    border-radius: 8px;
    transition: background .2s ease, color .2s ease;
}

.catalog-color-option.is-selected {
    background: #f2fbfb;
    color: var(--primary-color, #46a9ae);
    font-weight: 700;
}

.catalog-color-option__dot,
.catalog-product-card__color {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
    background: var(--catalog-color);
    box-shadow: 0 0 0 2px #fff;
}

.catalog-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.catalog-price-inputs label {
    position: relative;
    margin: 0;
}

.catalog-price-inputs label > span {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 10px;
}

.catalog-price-inputs input {
    width: 100%;
    height: 38px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    padding: 5px 7px;
    direction: ltr;
    font-family: inherit;
    font-size: 11px;
}

.catalog-price-inputs small {
    display: block;
    margin-top: 3px;
    color: #999;
    font-size: 9px;
}

.catalog-price-hint {
    margin: 8px 0 0;
    color: #999;
    font-size: 9px;
    line-height: 1.8;
}

.catalog-stock-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    color: #444;
    font-size: 12px;
}

.catalog-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 14px;
}

.catalog-filter-actions button,
.catalog-filter-actions a {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color, #46a9ae);
    border-radius: 9px;
    font-family: inherit;
    font-size: 11px;
}

.catalog-filter-actions button {
    background: var(--primary-color, #46a9ae);
    color: #fff;
    cursor: pointer;
}

.catalog-filter-actions a {
    background: #fff;
    color: var(--primary-color, #46a9ae);
}

.catalog-results {
    min-width: 0;
    padding: 10px;
}

.catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

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

.catalog-product-card:hover {
    transform: translateY(-2px);
    border-color: #dde4e7;
    box-shadow: 0 9px 24px rgba(37, 55, 68, .08);
}

.catalog-product-card__image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    padding: 10px;
    background: #fff;
}

.catalog-product-card__image > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.catalog-product-card__discount,
.catalog-product-card__stock {
    position: absolute;
    top: 8px;
    z-index: 1;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 9px;
    line-height: 1;
}

.catalog-product-card__discount {
    right: 8px;
    background: #ef394e;
    color: #fff;
    font-weight: 800;
}

.catalog-product-card__stock {
    left: 8px;
    background: #ecf8f3;
    color: #27865d;
}

.catalog-product-card__stock--out {
    background: #f4f4f5;
    color: #8d8d92;
}

.catalog-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0 10px 10px;
}

.catalog-product-card__colors {
    display: flex;
    min-height: 18px;
    align-items: center;
    gap: 3px;
    margin-bottom: 5px;
}

.catalog-product-card__color {
    width: 10px;
    height: 10px;
    flex-basis: 10px;
}

.catalog-product-card__title {
    display: -webkit-box;
    min-height: 39px;
    overflow: hidden;
    margin: 0 0 9px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.8;
    font-size: 11px;
    font-weight: 600;
}

.catalog-product-card__title a {
    color: #333;
}

.catalog-product-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
}

.catalog-product-card__price {
    min-width: 0;
    color: #333;
    line-height: 1.45;
}

.catalog-product-card__price del {
    display: block;
    color: #a0a0a0;
    font-size: 9px;
}

.catalog-product-card__price strong {
    font-size: 13px;
    font-weight: 800;
}

.catalog-product-card__price > span {
    margin-right: 2px;
    color: #777;
    font-size: 9px;
}

.catalog-cart-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: var(--primary-color, #46a9ae);
    color: #fff;
    cursor: pointer;
    transition: .2s ease;
}

.catalog-cart-button:hover {
    filter: brightness(.95);
}

.catalog-cart-button.disabled,
.catalog-cart-button:disabled,
.catalog-cart-button.is-loading {
    opacity: .48;
    cursor: not-allowed;
}

.catalog-cart-button.is-loading i {
    animation: catalog-spin .75s linear infinite;
}

@keyframes catalog-spin {
    to { transform: rotate(360deg); }
}

.catalog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 18px;
    padding: 8px 0 2px;
}

.catalog-pagination a,
.catalog-pagination span {
    display: inline-flex;
    min-width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e8eb;
    border-radius: 9px;
    color: #555;
    font-size: 11px;
}

.catalog-pagination a.is-active {
    border-color: var(--primary-color, #46a9ae);
    background: var(--primary-color, #46a9ae);
    color: #fff;
}

.catalog-empty {
    padding: 70px 20px;
    text-align: center;
    color: #777;
}

.catalog-empty i {
    margin-bottom: 12px;
    color: #b8c0c4;
    font-size: 34px;
}

.catalog-empty h2 {
    color: #333;
    font-size: 18px;
}

.catalog-empty a {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary-color, #46a9ae);
}

.catalog-filter-backdrop {
    display: none;
}

@media (max-width: 1199px) {
    .catalog-layout {
        grid-template-columns: 245px minmax(0, 1fr);
    }
    .catalog-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .catalog-page {
        padding-top: 15px;
    }
    .catalog-filter-toggle {
        display: inline-flex;
    }
    .catalog-layout {
        display: block;
    }
    .catalog-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 10002;
        display: block;
        width: min(360px, 90vw);
        height: 100vh;
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(105%);
        transition: transform .22s ease;
    }
    .catalog-sidebar.is-open {
        transform: translateX(0);
    }
    .catalog-sidebar__mobile-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 15px;
        border-bottom: 1px solid #eceff2;
        background: #fff;
    }
    .catalog-sidebar__mobile-head button {
        border: 0;
        background: transparent;
        color: #555;
        font-size: 25px;
        line-height: 1;
    }
    .catalog-filter-backdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 10001;
        display: block;
        background: rgba(0, 0, 0, .38);
    }
    body.catalog-filter-open {
        overflow: hidden;
    }
    .catalog-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .catalog-page .container {
        padding-right: 8px;
        padding-left: 8px;
    }
    .catalog-header {
        padding: 14px;
    }
    .catalog-header h1 {
        font-size: 17px;
    }
    .catalog-header p {
        font-size: 11px;
        line-height: 1.8;
    }
    .catalog-current-brand img {
        width: 42px;
        height: 42px;
    }
    .catalog-toolbar {
        align-items: stretch;
        padding: 8px;
    }
    .catalog-toolbar__summary {
        gap: 6px;
    }
    .catalog-result-count {
        display: none;
    }
    .catalog-sort {
        gap: 4px;
    }
    .catalog-sort > span {
        display: none;
    }
    .catalog-sort select {
        min-width: 128px;
        height: 39px;
        padding: 6px 8px;
        font-size: 10px;
    }
    .catalog-results {
        padding: 6px;
    }
    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .catalog-product-card {
        border-radius: 10px;
    }
    .catalog-product-card__image {
        padding: 7px;
    }
    .catalog-product-card__body {
        padding: 0 7px 8px;
    }
    .catalog-product-card__title {
        min-height: 36px;
        font-size: 10px;
    }
    .catalog-product-card__price strong {
        font-size: 11px;
    }
    .catalog-product-card__price > span {
        font-size: 8px;
    }
    .catalog-cart-button {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        border-radius: 9px;
    }
    .catalog-brand-rail {
        padding: 10px;
    }
    .catalog-brand-rail__item {
        min-width: 78px;
    }
    .catalog-brand-rail__item img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 380px) {
    .catalog-product-card__discount,
    .catalog-product-card__stock {
        padding: 3px 5px;
        font-size: 8px;
    }
    .catalog-product-card__colors {
        margin-bottom: 3px;
    }
    .catalog-product-card__price del {
        font-size: 8px;
    }
}
