.products-listing {
    padding: 30px 0;
    color: #333
}

section.products-listing {
    /* margin-bottom: 30px; */
    overflow: hidden;
    background: #f9fafb;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    gap: 30px;
}

.products-toolbar__left {
    color: #000;
    flex: 1;
    font-size: 16px;
}

.products-toolbar__left strong {
    color: #333;
    font-weight: 700
}

.products-toolbar__right {
    display: flex;
    align-items: center;
    gap: 20px
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-sort__label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    white-space: nowrap;
}

.products-sort__group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.products-sort__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    font-size: 13.5px;
    line-height: 1.3;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    user-select: none;
    overflow: hidden;
    outline: none;
}

.products-sort__item:hover {
    border-color: #4a5248;
    background-color: #3f462d0f;
    color: #4a5248;
}

.products-sort__item--active {
    background-color: #3f462d;
    border-color: #3f462d;
    color: #fff;
    font-weight: 500;
}

.products-sort__item--active:hover {
    background-color: #eef7ff;
    border-color: #4a5248;
    color: #4a5248;
}

.products-sort__badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 15px;
    background-color: #4a5248;
    border-bottom-right-radius: 10px;
    display: none;
    align-items: center;
    justify-content: end;
    color: #ffffff;
    padding-right: 3px;
    padding-bottom: 2px;
    display: none !important;
}

.products-sort__badge-icon {
    width: 8px;
    height: 8px;
    stroke: #ffffff;
}

.products-sort__item--active .products-sort__badge {
    display: flex;
}

.products-sort__text {
    position: relative;
    z-index: 1;
}

.mobile-filters-btn {
    display: none
}

.products-sort__mobile {
    display: none;
}

.products-view-mode {
    display: flex;
    gap: 8px
}

.view-mode-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    color: #9bbced;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s
}

.view-mode-btn:hover,
.view-mode-btn.active {
    background: #f0f5ff;
    color: #3f462d;
    border-color: #3f462d
}

.view-mode-btn svg {
    width: 18px;
    height: 18px
}

.mobile-modal__overlay,
.mobile-modal__header,
.mobile-modal__footer,
.js-mobile-sort-modal {
    display: none;

}

.products-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 20px
}

.filter-dropdown {
    position: relative
}

.filter-tag-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    font-size: 13px;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s
}

.filter-tag-btn:hover {
    border-color: #9bbced
}

.filter-tag-btn svg {
    width: 12px;
    height: 12px
}

.filter-dropdown__panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    padding: 20px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease
}

.filter-dropdown.is-open .filter-dropdown__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.category-main,
.category-main__inner,
.products-layout,
.ctnr {
    overflow: visible !important;
}

.products-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px
}

.products-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #FFF;
    padding: 15px;
    border-radius: 8px;
    /* max-height: 100vh;
    overflow-y: auto; */
}

.products-sidebar::-webkit-scrollbar {
    width: 5px;
}

.products-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.products-sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.products-sidebar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.filter-widget {
    border-bottom: 1px solid #f1f1f1;
    padding: 20px 0 0;
}

.filter-widget:first-child {
    padding-top: 0
}

.filter-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 16px
}

.filter-widget__title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0
}

.filter-widget__arrow {
    width: 16px;
    height: 16px;
    color: #999;
    transition: transform 0.3s
}

.filter-widget.is-collapsed .filter-widget__arrow {
    transform: rotate(-180deg)
}

.filter-widget.is-collapsed .filter-widget__body {
    display: none
}

.filter-price__inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px
}

.filter-price__inputs input {
    flex: 1;
    width: 100%;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    outline: none
}

.filter-price__slider {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 20px 0 10px
}

.filter-price__range {
    position: absolute;
    height: 100%;
    background: #333;
    left: 0;
    right: 0;
    border-radius: 2px
}

.filter-price__input {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    outline: none;
    z-index: 2
}

.filter-price__input::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #333;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-shadow: 0 0 0 1px #fff
}

.filter-price__input::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border: none;
    border-radius: 50%;
    background: #333;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-shadow: 0 0 0 1px #fff
}

.filter-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 220px;
    overflow-y: auto
}

.filter-checkbox-list::-webkit-scrollbar {
    width: 6px
}

.filter-checkbox-list::-webkit-scrollbar-track {
    background: #f1f1f1
}

.filter-checkbox-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px
}

.filter-checkbox-list li {
    margin-bottom: 15px
}

.filter-checkbox-list li:last-child {
    margin-bottom: 0
}

.filter-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #000;
    cursor: pointer
}

.filter-checkbox-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer
}

.products-main {
    flex: 1;
    min-width: 0
}

.products-grid.view-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px
}

.products-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.products-grid.view-list .product-card {
    flex-direction: row;
    align-items: center;
    gap: 30px
}

.products-grid.view-list .product-card__img-wrap {
    width: 240px;
    margin-bottom: 0;
    flex-shrink: 0
}

.products-grid.view-list .product-card__info {
    justify-content: center
}

.products-grid.view-list .product-card__title {
    font-size: 18px;
    margin-bottom: 12px
}

@media (max-width:1200px) {
    .products-grid.view-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .products-toolbar {
        flex-wrap: wrap;
    }

    .products-toolbar__left {
        flex: auto;
    }

    .products-sidebar {
        top: 0;
    }
}

@media (max-width:991px) {
    .products-main {
        width: 100%
    }

    .products-layout {
        flex-direction: column
    }

    .mobile-filters-btn {
        display: block;
        background: none;
        border: 1px solid #e0e0e0;
        border-radius: 20px;
        padding: 6px 14px;
        color: #3f462d;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        text-transform: uppercase;
        display: none;
    }

    .products-sort {
        border-radius: 20px;
        color: #9bbced;
        font-weight: 600;
        text-transform: uppercase;
        flex-wrap: wrap;
    }

    .products-sort__group {
        display: none;
    }

    .products-sort__mobile {
        display: block !important;
    }

    .products-sort__select {
        padding: 8px 30px 8px 15px;
        border: 1px solid #e0e0e0;
        border-radius: 20px;
        background-color: #fff;
        color: #333;
        font-size: 13px;
        outline: none;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 14px;
        font-weight: 500;
        text-transform: none;
        max-width: 100%;
    }

    .products-sort svg path {
        stroke: #9bbced
    }

    .products-toolbar__right {
        gap: 10px
    }

    .products-filter-tags {
        display: none
    }

    .mobile-modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        pointer-events: none
    }

    .mobile-modal__overlay {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease
    }

    .mobile-modal__content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
        max-height: 85vh
    }

    .mobile-modal.is-open {
        pointer-events: auto;
        width: 100%
    }

    .mobile-modal.is-open .mobile-modal__overlay {
        opacity: 1
    }

    .mobile-modal.is-open .mobile-modal__content {
        transform: translateY(0)
    }

    .mobile-modal__header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid #f1f1f1;
        margin-bottom: 20px
    }

    .mobile-modal__header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600
    }

    .mobile-modal__close {
        background: none;
        border: none;
        padding: 4px;
        cursor: pointer;
        color: #000
    }

    .mobile-modal__body {
        flex: 1;
        overflow-y: auto;
        padding: 0 20px
    }

    .mobile-modal__body::-webkit-scrollbar {
        width: 5px;
    }

    .mobile-modal__body::-webkit-scrollbar-track {
        background: transparent;
    }

    .mobile-modal__body::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 4px;
    }

    .mobile-modal__body::-webkit-scrollbar-thumb:hover {
        background: #cbd5e1;
    }

    .mobile-modal__footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 16px 20px;
        border-top: 1px solid #f1f1f1
    }

    .mobile-modal__btn {
        width: 100%;
        padding: 12px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        border: 1px solid transparent;
        text-align: center
    }

    .mobile-modal__btn--primary {
        background: #3f462d;
        color: #fff
    }

    .mobile-modal__btn--outline {
        background: #fff;
        border-color: #e0e0e0;
        color: #e53e3e
    }

    .mobile-sort-list {
        list-style: none;
        padding: 0;
        margin: 0
    }

    .mobile-sort-list li {
        border-bottom: 1px solid #f1f1f1
    }

    .mobile-sort-list li:last-child {
        border-bottom: none
    }

    .mobile-sort-list label {
        display: flex;
        align-items: center;
        padding: 16px 0 16px 24px;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        position: relative
    }

    .mobile-sort-list input[type="radio"] {
        display: none
    }

    .mobile-sort-list li.active label {
        font-weight: 600
    }

    .mobile-sort-list li.active label::before {
        content: '✓';
        position: absolute;
        left: 0;
        color: #000;
        font-size: 12px
    }

    .products-sidebar {
        display: block;
        position: fixed;
        max-height: none;
        overflow-y: visible;
        top: 0;
        background: transparent;
    }

    .products-grid.view-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .products-grid.view-list .product-card__img-wrap {
        width: 200px
    }
}

@media (max-width:768px) {
    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px
    }

    .products-toolbar__right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .products-grid.view-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 15px
    }

    .products-grid.view-grid>* {
        width: calc(50% - 7.5px);
    }

    .products-grid.view-list .product-card {
        flex-direction: row;
        gap: 15px
    }

    .products-grid.view-list .product-card__img-wrap {
        width: 140px
    }

    .products-grid.view-list .product-card__title {
        font-size: 15px
    }

    .products-sidebar__heading {
        display: none !important;
    }
}

@media (max-width:480px) {
    .products-grid.view-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px
    }

    .products-grid.view-grid>* {
        width: calc(50% - 5px);
    }

    .products-grid.view-list .product-card {
        flex-direction: column;
        align-items: flex-start
    }

    .products-grid.view-list .product-card__img-wrap {
        width: 100%
    }

    .filter-dropdown__panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1000
    }

    .filter-dropdown.is-open .filter-dropdown__panel {
        transform: translateY(0)
    }
}

@media (max-width:380px) {

    .products-grid.view-grid>* {
        width: 100%;
    }
}

.filter-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    position: relative;
    margin: 0
}

.filter-checkbox-input:checked {
    background-color: #3f462d;
    border-color: #3f462d
}

.filter-checkbox-input:checked::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px
}

.filter-checkbox-input:hover {
    border-color: #3f462d
}

.filter-category-tree,
.filter-brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 10px;
}

.filter-category-tree li,
.filter-brand-list li {
    margin-bottom: 4px
}

.filter-category-tree li.level-0>label {
    font-weight: 600;
    color: #1f2937;
    font-size: 13.5px
}

.filter-category-tree li.level-child {
    /* margin-left: 10px; */
    /* padding-left: 8px; */
    /* border-left: 1.5px solid #e5e7eb; */
}

.filter-category-tree li.level-child>label {
    font-weight: 400;
    color: #4b5563;
    font-size: 13px
}

.filter-category-tree li label,
.filter-brand-list li label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    user-select: none
}

.filter-category-tree li label:hover,
.filter-brand-list li label:hover {
    background: #f0f5ff;
    color: #3f462d
}

.filter-category-tree li.is-active>label,
.filter-category-tree li label.is-checked,
.filter-brand-list li.is-active>label,
.filter-brand-list li label.is-checked {
    background-color: #f0f5ff;
    color: #3f462d;
    font-weight: 600;
}

/* Expandable List Styles */
.js-expandable-list.is-collapsed li:nth-child(n+6) {
    display: none;
}

.filter-expand-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333654;
    cursor: pointer;
    /* margin-top: 5px; */
    transition: color 0.2s;
    margin-bottom: 10px;
}

.filter-expand-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.filter-expand-btn .filter-expand-icon {
    transition: transform 0.3s;
}

.filter-expand-btn.is-expanded .filter-expand-icon {
    transform: rotate(180deg);
}

.filter-tag-btn.is-active {
    border-color: #3f462d;
    background-color: #f0f5ff;
    color: #3f462d;
    font-weight: 600
}

.filter-tag-btn.is-active svg {
    stroke: #3f462d
}

.filter-widget.has-checked .filter-widget__title {
    color: #3f462d;
    font-weight: 700
}