.ui-slider {
    position: relative;
    text-align: left;
    background: #e9e9e9;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.ui-slider-horizontal {
    height: 8px;
}
.ui-slider-range {
    position: absolute;
    z-index: 1;
    font-size: .7em;
    display: block;
    border: 0;
    background-position: 0 0;
    background: #aaa;
    border-radius: 4px;
}
.ui-slider-horizontal .ui-slider-range {
    top: 0;
    height: 100%;
}
.ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
    background: #333; 
    border: 1px solid #333;
    border-radius: 50%; 
    outline: none;
}
.ui-slider-horizontal .ui-slider-handle {
    top: -0.3em;
    margin-left: -0.6em;
}

#cwcpf-filter-container {
    min-width: 25%;
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 15px 0;
    transition: all .4s ease;
    overflow: hidden; 
    visibility: visible;
    opacity: 1;
}

#cwcpf-filter-container.cwcpf-filters-hidden {
    min-width: 0;
    width: 0;
    opacity: 0; 
    gap: 0; 
    visibility: hidden; 
}

.cwcpf-filter-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}

#cwcpf-hide-filter {
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 3px;
    border: 1px solid #4E5147;
    padding: 10px 12px;
    cursor: pointer;
}

#cwcpf-new-arrivals {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 12px;
    cursor: pointer;
}

.cwcpf-filter-buttons .switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.cwcpf-filter-buttons .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cwcpf-filter-buttons .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #DCDCDA;
    -webkit-transition: .4s;
    transition: .4s;
}

.cwcpf-filter-buttons .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #F4F0EA;
    -webkit-transition: .4s;
    transition: .4s;
}

.cwcpf-filter-buttons input:checked + .slider {
    background-color: #4E5147;
}

.cwcpf-filter-buttons input:focus + .slider {
    box-shadow: 0 0 1px #4E5147;
}

.cwcpf-filter-buttons input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

.cwcpf-filter-buttons .slider.round {
    border-radius: 34px;
}

.cwcpf-filter-buttons .slider.round:before {
    border-radius: 50%;
}

#cwcpf-filter-container-inner {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 32px;
    margin-bottom: 30px;
    border-radius: 0;
}

#cwcpf-filter-container-inner input[type="checkbox"]{
    accent-color: #4E5147;
}

.cwcpf-filter-group {
    border-bottom: 1px solid #e0e0e0;
}
.cwcpf-filter-group:last-of-type {
    border-bottom: none;
}

h3.cwcpf-filter-toggle {
    margin: 0;
    padding: 16px 0;
    cursor: pointer;
    position: relative;
    user-select: none;
    color: #4E5147;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

h3.cwcpf-filter-toggle::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    font-weight: 400;
    color: #4E5147;
}
.cwcpf-filter-group.cwcpf-open h3.cwcpf-filter-toggle::after {
    content: '–';
}

.cwcpf-filter-options {
    padding: 0 20px 20px 20px;
    display: none;
    max-height: 250px;
    overflow-y: auto;
}

.cwcpf-filter-options ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cwcpf-filter-options ul ul {
    margin-left: 20px;
    padding-top: 8px;
}

.cwcpf-filter-options li {
    margin-bottom: 8px;
}

.cwcpf-filter-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.cwcpf-filter-options input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

#cwcpf-active-filters {
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#cwcpf-active-filters:empty {
    display: none;
}

#cwcpf-active-filters > span:first-child {
    font-weight: 600;
    margin-right: 5px;
    font-size: 0.9em;
    color: #555;
}

.cwcpf-active-tag {
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#cwcpf-clear-filters {
    color: #4E5147;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    cursor: pointer;
}

button.cwcpf-remove-tag {
    background: none;
    border: none;
    color: #999;
    padding: 0;
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

button.cwcpf-remove-tag:hover {
    color: #c00;
}

p.cwcpf-loading-text {
    color: #888;
    font-style: italic;
    padding: 10px 0;
}

#cwcpf-price-slider {
    margin: 20px 5px;
}

#cwcpf-price-slider .ui-slider-handle {
    background: #333;
    border-color: #333;
}
#cwcpf-price-slider .ui-slider-range {
    background: #aaa;
}

#cwcpf-price-display {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #444;
    margin-top: 10px;
}

.cwcpf-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
}

.cwcpf-filter-controls button {
    padding: 12px 20px;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid #4E5147;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

#cwcpf-apply-filters {
    background: #4E5147;
    color: white;
    text-transform: uppercase;
}
#cwcpf-apply-filters:hover {
    background: #555;
    border-color: #555;
}

#cwcpf-reset-filters {
    background: #fff;
    color: #4E5147;
    text-transform: uppercase;
}
#cwcpf-reset-filters:hover {
    background: #f0f0f0;
}

#cwcpf-product-list-wrapper {
    position: relative;
    min-height: 300px;
    width: 100%;
}

.cwcpf-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.cwcpf-loading::after {
    content: 'Loading...';
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    z-index: 11;
}

.woocommerce-shop .main-products-column {
    display: flex;
    gap: 20px;
}

.woocommerce-shop .woocommerce-ordering {
    float: right;
}

#cwcpf-product-list-wrapper-products {
    display: flex;
    width: 100%;
    gap: 20px;
}

.woocommerce-shop #cwcpf-product-list-wrapper-products ul.products {
    width: 100%;
}

.woocommerce-shop .woocommerce-no-products-found {
    display: none;
}

.woocommerce-shop .woocommerce-result-count {
    padding: 6px 12px 6px 24px;
}

#cwcpf-filter-container-inner .mobile-title {
    display: none;
}

@media screen and (max-width: 1024px) {
    #cwcpf-filter-container {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        z-index: 9999;
        min-width: 60%;
        width: 60%;
        opacity: 0;
        padding: 0;
    }

    #cwcpf-filter-container-inner {
        height: 100%;
        margin: 0;
        overflow-y: scroll;
    }

    #cwcpf-filter-container-inner .mobile-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #cwcpf-filter-container-inner .mobile-title span {
        color: #4E5147;
        font-size: 20px;
        font-style: normal;
        font-weight: 400;
        line-height: 26px;
    }
}

@media screen and (max-width: 992px) {
    .cwcpf-filter-buttons {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .woocommerce-shop .woocommerce-result-count {
        width: 50%;
        text-align: right;
    }

    .woocommerce-shop .woocommerce-ordering {
        width: 50%;
    }

    .woocommerce-shop .woocommerce-ordering select,
    #cwcpf-hide-filter span {
        line-height: 16px;
        font-size: 14px;
    }

    .woocommerce-shop .woocommerce-ordering select,
    #cwcpf-hide-filter {
        padding: 8px !important;
        height: 36px;
    }

    .cwcpf-filter-buttons span,
    .cwcpf-filter-buttons p {
        line-height: 16px;
        font-size: 14px;
    }
}

@media screen and (max-width: 767px) {
    #cwcpf-filter-container {
        width: 100%;
        min-width: 100%;
    }
}