.filter-box {
    padding: 16px 12px;
    box-shadow: 0px 0px 20px 0px #8282821F;
    border-radius: 12px;
    margin-bottom: 16px;
}

.slider-shop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    min-height: 0px;
}

.slider-shop:not(.hidden-on-load) {
    opacity: 1;
    visibility: visible;
    min-height: 100%;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: bold;
}

.filter-header a {
    display: flex;
    align-items: center;
    color: #828282;
    font-size: 12px;
    text-decoration: none;
}

.filter-header a svg {
    margin-left: 4px;
}

/* Sections */
.filter-section {
    margin-bottom: 12px;
}

.filter-section span {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    display: inline-block;
}

/* Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.filter-tag {
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tag svg {
    margin-bottom: -4px;
}

.filter-section .filter-labels {
    color: #828282;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0;
    display: inline-block;
    text-align: right;
    width: 100%;
}

.filter-tag button {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    margin-right: 6px;
    cursor: pointer;
}

.filter-tag button:hover {
    color: #ff4d4d;
}

#active-filters {
    margin-top: 20px;
}

/* .filter-tag {
    background-color: #007bff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    margin: 4px;
} */

.filter-tag button {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    margin-right: 6px;
    cursor: pointer;
}

/* Desktop styles (larger than 768px) */
.desktop-filter {
    display: block;
}

.mobile-filter {
    display: none;
}

.nm-shop .nm-product-box {
    /*height: 95%;*/
}

.nm-product-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nm-product-box img {
    /*height: 282px;*/
}

.swiper-nm-shop .swiper-button-prev, .swiper-nm-shop .swiper-button-next, .swiper-nm-shop .swiper-button-prev, .swiper-nm-shop .swiper-button-next {
    background-image: none !important;
    background: #F5F5F5;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 4px 0px 20px 0px #4F4F4F33;

}

/* Mobile/Tablet styles (max-width: 768px) */
@media screen and (max-width: 768px) {
    .desktop-filter {
        display: none;
    }

    .mobile-filter {
        display: block;
    }
}


@media (max-width: 991px) {
    .nm-product-box-title a {
        font-size: 71%;
        line-height: 19px;
        margin-top: 10px;
    }

    .nm-product-box-title {
        width: 60%;
    }

    #close-filter-sort {
        z-index: 100000000;
    }

    #close-filter-items {
        z-index: 100000000;
    }

    .nm-shop-sidebar {
        width: 100%;
    }

    .nm-shop .nm-cat-title-phone {
        display: flex;
    }

    .nm-shop .filter-item {
        display: flex;
    }

    .nm-shop .filter-sidebar {
        display: none;
    }

    .nm-shop .nm-sidebar-search {
        display: none;
    }

    .nm-shop .banner-shop {
        flex-wrap: wrap;
    }

    .shop-img-wrapper {
        width: 37%;
        height: 130px;
    }

    .nm-shop .nm-product-box img {
        height: 130px;
        width: 130px;
        padding: 12px;
    }

    .nm-shop .card-product {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .nm-shop .nm-brands-slider .swiper-button-prev,
    .nm-brands-slider .swiper-button-next {
        display: block;
    }

    .nm-shop .nm-cat-filter {
        box-shadow: none;
    }

    .nm-shop .nm-filter-Switch {
        box-shadow: none;
    }

    .nm-shop .price-filter {
        margin-bottom: 5rem;
    }

    .nm-shop .set-filter {
        text-align: right;
    }

    .nm-shop .set-filter .head {
        color: #4F4F4F;
        font-size: 14px;
        font-weight: 600;
        border-top: 1px solid #dfdede;
        padding: 11px 0;
    }

    .nm-shop .set-filter .delete-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        font-weight: 400;
        color: #828282;
    }

    .nm-shop .set-filter .delete-item svg {
        margin-left: 0;
        margin-right: 4px;
    }

    .nm-shop .set-filter h5 {
        color: #828282;
        font-size: 13px;
        font-weight: 600;
        margin: 10px 0;
    }

    .nm-shop .set-filter span {
        background: var(--primary-color);
        color: #fff;
        border-radius: 4px;
        padding: 3px 5px;
        margin: 0 4px;
        font-size: 12px;
        font-weight: 600;
        display: flex;
        width: max-content;
    }

    .nm-shop .set-filter span svg {
        margin: 0 !important;
    }

    .swiper-nm-shop .swiper-button-prev,
    .swiper-nm-shop .swiper-button-next,
    .swiper-nm-shop .swiper-button-prev,
    .swiper-nm-shop .swiper-button-next {
        display: none;
    }
}

@media (max-width: 640px) {
    .nm-product-box {
        min-height: unset !important;
    }
}

.all-categories {
    padding: 10px;
    max-height: 255px;
    overflow: auto;
    direction: ltr;

    /* Firefox: make scrollbars thin and set thumb/track color */
    scrollbar-width: thin;
    scrollbar-color: #ccc #eee;
}

/* WebKit (Chrome, Safari, Edge) */
.all-categories::-webkit-scrollbar {
    width: 4px; /* width of the scrollbar */
    height: 3px; /* height if horizontal */
}

.all-categories::-webkit-scrollbar-track {
    background: #BDBDBD; /* track color */
}

.all-categories::-webkit-scrollbar-thumb {
    background-color: #ccc; /* thumb color */
    border-radius: 10px; /* round the corners */
    border: 1px solid #BDBDBD; /* gives a 1px gap around thumb */
}

/* optional: hover state */
.all-categories::-webkit-scrollbar-thumb:hover {
    background-color: #b3b3b3;
}

.category-group {
    margin-bottom: 10px;
}

.subcategory-group {
    margin-top: 5px;
}

.subcategory-group label::before {
    content: " -";
    font-weight: normal;
    color: #666;
    margin-left: 5px;
}

.sub-subcategory-group {
    padding-left: 15px;
    font-size: 0.9em;
}

.woocommerce-notices-wrapper {
    display: none;
}

/* make the label into a flex container, text on left, checkbox on right */
.current-category-checkbox,
.subcategory-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

/* checked state: fill in with accent color & draw a white checkmark */
.current-category-checkbox:checked,
.subcategory-checkbox:checked {
    background: #0031A2;
    border-color: #0031A2;
}

.current-category-checkbox:checked::after,
.subcategory-checkbox:checked::after {
    content: "✔";
    color: white;
    font-size: 10px;
    line-height: 1;
    position: absolute;
    top: 57%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* force label layout so checkbox sits on right */
.nm-cat-filter-body label {
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
    user-select: none;
}

/* optional: hover state to gently darken the border */
.current-category-checkbox:hover,
.subcategory-checkbox:hover {
    border-color: #ccc;
}

/* 1) hide native UI and size */
.all-categories input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

/* 2) checked state: fill & draw checkmark */
.all-categories input[type="checkbox"]:checked {
    background: #0031A2;
    border-color: #0031A2;
}

.all-categories input[type="checkbox"]:checked::after {
    content: "✔";
    color: white;
    font-size: 10px;
    line-height: 1;
    position: absolute;
    top: 57%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 3) flex‐reverse labels so text is left, box is right */
.all-categories label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
    user-select: none;
}

/* 4) optional hover tweak */
.all-categories input[type="checkbox"]:hover {
    border-color: #ccc;
}

.mobile-filer-nm-popup {
    min-height: 500px;
}

@media (max-width: 400px) {
    .nm-shop .card-product {
        display: flex;
        gap: 10px;
        flex-wrap: unset;
    }
}