/* استایل لودینگ جدید */
#woodmart-ajax-loading {
    position: fixed;
    z-index: 1000;
    width: 100%;
    height: 100%;
    background: rgb(255 255 255 / 50%);
    top: 0;
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;
}

#woodmart-ajax-loading div {
    border: 4px solid #f3f3f3;
    border-top: 4px solid rgb(37,165,149);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استایل مرتب سازی در موبایل و تبلت */
@media (max-width: 1024px) {
    .wd-ordering-responsive {
        position: relative;
        width: 40px;
        height: 40px;
        overflow: hidden;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .wd-ordering-responsive select {
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

    .wd-ordering-responsive:after {
        position: absolute;
        content: "\f119";
        font-family: "woodmart-font";
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--color-gray-900);
        font-size: 120%;
        z-index: 2;
        pointer-events: none;
    }
}

/* استایل دسکتاپ - نمایش عادی */
@media (min-width: 1025px) {
    .wd-ordering-responsive {
        width: auto;
        height: auto;
        overflow: visible;
    }

    .wd-ordering-responsive:after {
        display: none;
    }

    .wd-ordering-responsive select {
        opacity: 1;
        position: static;
        width: auto;
        height: auto;
    }
}

/* استایل های عمومی */
.woodmart-filter-group {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--brdcolor-gray-300);
}

.woodmart-filter-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

.woodmart-filter-group ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.woodmart-filter-group li {
    margin-bottom: 5px;
}

.products.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.woodmart-filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.price-slider {
    padding: 0 10px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ui-slider {
    height: 5px;
    background: #ddd;
    position: relative;
    margin: 15px 0;
}

.ui-slider-range {
    background: #3498db;
    height: 100%;
    position: absolute;
}

.woodmart-filter-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.woodmart-filter-label input {
    margin-left: 10px;
}

.price-slider-wrapper {
    padding: 10px 5px;
}

.price-slider-values {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

/* اسلایدر */
.ui-slider {
    position: relative;
    height: 2px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 15px 0;
}

.ui-slider-range {
    position: absolute;
    height: 2px;
    background: rgb(37,165,149);
    border-radius: 3px;
}

.ui-slider-handle {
    position: absolute;
    width: 4px;
    height: 15px;
    background: rgb(37, 165, 149);
    border: 0;
    top: -7px;
    margin-left: 0;
    cursor: ew-resize;
    z-index: 2;
}

/* مولتی سلکت */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 38px;
    padding: 2px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgb(37,165,149) !important;
    color: #fff !important;
    border: 1px solid rgb(15 123 109) !important;
    border-radius: 3px !important;
    padding: 2px 8px !important;
    margin: 3px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-left: 5px !important;
    color: rgb(8 97 86) !important;
}

.woodmart-clear-filters {
    text-align: center;
    margin-top: 20px;
}

#clear-all-filters {
    background: rgb(37,165,149);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#clear-all-filters:hover {
    background: rgb(13 113 101);
}

/* استایل صفحه بندی */
.woocommerce-pagination {
    margin-top: 30px;
    text-align: center;
}

.woocommerce-pagination ul.page-numbers {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination ul.page-numbers li {
    display: inline-block;
    margin: 0 3px;
}

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.woocommerce-pagination ul.page-numbers li span.current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.woocommerce-pagination ul.page-numbers li a:hover {
    background: #f5f5f5;
}

.woodmart-button-loader div {
    border: 2px solid #f3f3f3;
    border-top: 2px solid rgb(37,165,149);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}



/* استایل های مرتب سازی ایجکس */
.woodmart-ajax-ordering {
    padding: 10px;
}

.woodmart-ajax-ordering select.orderby {
    cursor: pointer;
    padding: 10px 30px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    width: 100%;
    max-width: 250px;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNSIgaGVpZ2h0PSIyNSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2U9IiNiYmIiPjxwYXRoIGQ9Ik02IDlsNiA2IDYtNiIvPjwvc3ZnPg==");
    background-position: left 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.woodmart-ajax-ordering.wd-style-underline select.orderby {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-inline-start: 2px;
    padding-inline-end: 30px;
    height: auto;
    border-top: none;
    border-right: none;
    border-left: none;
    border-radius: 0;
    background-color: transparent;
    background-position: left 0 center;
    color: var(--color-gray-900, #333);
    font-weight: 600;
    font-size: inherit;
    line-height: 1.2;
    border-bottom: 2px solid #ddd;
}

.woodmart-ajax-ordering.wd-style-underline select.orderby:focus {
    border-bottom-color: rgb(37, 165, 149);
    outline: none;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .woodmart-ajax-ordering.wd-ordering-mb-icon {
        position: relative;
        width: 40px;
        height: 40px;
    }
    
    .woodmart-ajax-ordering.wd-ordering-mb-icon select.orderby {
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 2;
    }
    
    .woodmart-ajax-ordering.wd-ordering-mb-icon:after {
        position: absolute;
        top: 50%;
        left: 50%;
        color: var(--color-gray-900);
        font-size: 120%;
        z-index: 2;
        pointer-events: none;
        content: "\f119";
        font-family: "woodmart-font";
    }
}


.wd-loop-footer.products-footer nav.woocommerce-pagination.wd-pagination {
    display: none !important;
}