.category-products-page {
    padding: 28px 0px 56px;
    background: #f6f7f9;
}

.category-products-layout {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    width: min(1400px, 100%);
    margin: 0 auto;
    align-items: start;
}

.category-filter-panel {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e4e6e9;
    border-radius: 8px;
    background: #fff;
}

.category-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0f3;
}

.category-filter-head span,
.catalog-search-field span,
.price-filter-grid span,
.sort-control span {
    display: block;
    color: #77808e;
    font-size: 11px;
    line-height: 1.4;
}

.category-filter-head strong {
    display: block;
    color: #20242b;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 600;
}

.category-filter-head a {
    color: #ed650c;
    font-size: 12px;
    text-decoration: none;
}

.category-filter-group {
    display: grid;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf0f3;
}

.category-filter-group:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.category-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    color: #20242b;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.category-filter-toggle i {
    color: #89909b;
    font-size: 16px;
    transition: transform 180ms ease;
}

.category-filter-group.is-collapsed .category-filter-toggle i {
    transform: rotate(-90deg);
}

.category-filter-group.is-collapsed .category-filter-body {
    display: none;
}

.category-filter-body {
    display: grid;
    gap: 10px;
}

.catalog-search-field,
.price-filter-grid label {
    display: grid;
    gap: 6px;
}

.catalog-search-field input,
.price-filter-grid input,
.sort-control select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    color: #20242b;
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.catalog-search-field input:focus,
.price-filter-grid input:focus,
.sort-control select:focus {
    border-color: #ed650c;
    outline: 2px solid #ffe0c8;
    outline-offset: 0;
}

.option-filter-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.option-filter-item,
.stock-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.option-filter-item input,
.stock-filter input {
    width: 16px;
    height: 16px;
    accent-color: #ed650c;
}

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

.price-filter-range {
    display: flex;
    justify-content: space-between;
    color: #89909b;
    font-size: 11px;
}

.apply-filter-btn,
.mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #ed650c;
    border-radius: 6px;
    color: #fff;
    background: #ed650c;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.category-products-content {
    min-width: 0;
}

.category-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #e4e6e9;
    border-radius: 8px;
    background: #fff;
}

.mobile-filter-btn {
    display: none;
    color: #ed650c;
    background: #fff7f1;
}

.mobile-filter-btn span {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    color: #fff;
    background: #ed650c;
    font-size: 11px;
}

.active-filter-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.active-filter-strip span {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    color: #5b6472;
    background: #f2f4f7;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.sort-control select {
    min-width: 168px;
}

.catalog-products-card-scope {
    padding: 0;
    background: transparent;
}

.catalog-products-card-scope .top-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.catalog-products-card-scope .simple-product-card {
    min-height: 100%;
}

.catalog-products-card-scope .btn-add-cart.is-added {
    border-color: #17804a;
    background: #17804a;
}

.category-products-pagination {
    margin-top: 24px;
}

.category-products-pagination .pagination {
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
}

.category-products-pagination .page-link {
    border-color: #e4e6e9;
    color: #4b5563;
    border-radius: 6px;
}

.category-products-pagination .active .page-link {
    border-color: #ed650c;
    background: #ed650c;
}

.category-empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 58px 20px;
    border: 1px solid #e4e6e9;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.category-empty-state i {
    color: #ed650c;
    font-size: 36px;
}

.category-empty-state h2 {
    margin: 0;
    color: #20242b;
    font-size: 22px;
    font-weight: 600;
}

.category-empty-state p {
    margin: 0;
    color: #747c88;
    font-size: 14px;
}

.category-empty-state a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin-top: 6px;
    padding: 8px 13px;
    border-radius: 6px;
    color: #fff;
    background: #ed650c;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .category-products-layout {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 18px;
    }

    .catalog-products-card-scope .top-products-grid {
        gap: 16px;
    }

    .catalog-products-card-scope .simple-product-card {
        grid-template-columns: 1fr;
    }

    .catalog-products-card-scope .simple-product-img {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 900px) {
    .category-products-page {
        padding: 18px 12px 42px;
    }

    .category-products-layout {
        display: block;
    }

    .category-products-layout::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1900;
        background: rgba(17, 24, 39, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .category-products-layout.is-filter-open::before {
        opacity: 1;
        pointer-events: auto;
    }

    .category-filter-panel {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1910;
        width: min(380px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        padding: 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 0 8px 8px 0;
        box-shadow: 20px 0 40px #11182726;
        transform: translateX(-110%);
        transition: transform 180ms ease;
    }

    .category-filter-panel.is-open {
        transform: translateX(0);
    }

    .category-products-toolbar {
        position: sticky;
        top: 0;
        z-index: 20;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .mobile-filter-btn {
        display: inline-flex;
    }

    .active-filter-strip {
        order: 3;
        flex-basis: 100%;
    }

    body.category-filter-lock {
        overflow: hidden;
    }
}

@media (max-width: 767px) {
    .catalog-products-card-scope .top-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sort-control {
        width: 100%;
        justify-content: space-between;
    }

    .sort-control select {
        min-width: 0;
        width: min(220px, 100%);
    }
}

@media (max-width: 767px) {
    .category-products-page {
        padding: 14px 10px 36px;
    }

    .category-products-toolbar {
        gap: 10px;
        padding: 10px;
    }

    .catalog-products-card-scope .top-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-products-card-scope .simple-product-card {
        padding: 8px;
    }

    .catalog-products-card-scope .product-summary,
    .catalog-products-card-scope .product-rating,
    .catalog-products-card-scope .product-gallery-thumbs,
    .catalog-products-card-scope .product-price-note,
    .catalog-products-card-scope .product-card-meta,
    .catalog-products-card-scope .product-min-order,
    .catalog-products-card-scope .product-delivery,
    .catalog-products-card-scope .gallery-arrow,
    .catalog-products-card-scope .gallery-counter {
        display: none;
    }

    .catalog-products-card-scope .product-action-btns {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .catalog-products-card-scope .btn-explore,
    .catalog-products-card-scope .btn-add-cart {
        width: 100%;
        min-height: 34px;
        padding: 7px 8px;
        font-size: 11px;
        line-height: 1.15;
    }
}

@media (max-width: 380px) {
    .category-products-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .catalog-products-card-scope .top-products-grid {
        gap: 8px;
    }
}
