.agra-product-filter-wrapper {
    position: relative;
    width: 100%;
}

.agra-filtering {
    pointer-events: none;
    opacity: 0.6;
}

.agra-filtering::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1B8216;
    border-radius: 50%;
    animation: agra-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes agra-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.agra-filter-mobile-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #1B8216;
    color: #FFF;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agra-filter-mobile-button:hover {
    background: #156a12;
    box-shadow: 0 4px 8px rgba(27, 130, 22, 0.25);
}

.agra-filter-mobile-button:active {
    transform: scale(0.98);
}

.agra-filter-mobile-button svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.agra-filter-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.agra-filter-item {
    flex: 0 0 auto;
    min-width: 0;
}

.agra-filter-item--hidden,
.agra-filter-mobile-item--hidden {
    display: none !important;
}

.agra-filter-item label,
.agra-filter-price label {
    display: block;
    margin-bottom: 8px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.agra-filter-select {
    width: 100%;
    max-width: 200px;
    min-width: 160px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    background: #FFF;
    color: #333;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
}

.agra-filter-select:hover {
    border-color: #1B8216;
}

.agra-filter-select:focus {
    border-color: #1B8216;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 130, 22, 0.1);
}

.agra-filter-price {
    display: flex;
    flex-direction: column;
}

.agra-price-range-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agra-price-min,
.agra-price-max,
.agra-price-min-mobile,
.agra-price-max-mobile {
    width: 85px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    background: #FFF;
    color: #333;
    transition: all 0.25s ease;
    text-align: center;
}

.agra-price-min::placeholder,
.agra-price-max::placeholder,
.agra-price-min-mobile::placeholder,
.agra-price-max-mobile::placeholder {
    color: #999;
}

.agra-price-min:hover,
.agra-price-max:hover,
.agra-price-min-mobile:hover,
.agra-price-max-mobile:hover {
    border-color: #1B8216;
}

.agra-price-min:focus,
.agra-price-max:focus,
.agra-price-min-mobile:focus,
.agra-price-max-mobile:focus {
    border-color: #1B8216;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 130, 22, 0.1);
}

.agra-price-separator {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    color: #999;
    font-weight: 400;
    user-select: none;
}

.agra-filter-sorting {
    display: flex;
    flex-direction: column;
}

.agra-filter-sorting label {
    display: block;
    margin-bottom: 8px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.agra-filter-sorting select,
.agra-sorting-select,
.agra-sorting-select-mobile {
    width: 100%;
    max-width: 200px;
    min-width: 160px;
    height: 40px;
    padding: 0 40px 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    background: #FFF;
    color: #333;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.agra-sorting-select:hover,
.agra-sorting-select-mobile:hover {
    border-color: #1B8216;
}

.agra-sorting-select:focus,
.agra-sorting-select-mobile:focus {
    border-color: #1B8216;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 130, 22, 0.1);
}

.agra-sorting-select-mobile {
    max-width: 100%;
}

.agra-filter-mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

.agra-filter-mobile-sidebar.active {
    pointer-events: all;
}

.agra-filter-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agra-filter-mobile-sidebar.active .agra-filter-sidebar-overlay {
    opacity: 1;
}

.agra-filter-sidebar-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.agra-filter-mobile-sidebar.active .agra-filter-sidebar-panel {
    transform: translateX(0);
}

.agra-filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

.agra-filter-sidebar-header h3 {
    margin: 0;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agra-filter-close {
    background: #f5f5f5;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.25s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.agra-filter-close:hover {
    background: #1B8216;
    color: #fff;
    transform: rotate(90deg);
}

.agra-filter-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

.agra-filter-mobile-item {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.agra-filter-mobile-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.agra-filter-mobile-item h4 {
    margin: 0 0 14px 0;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.agra-filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agra-filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    color: #444;
    transition: all 0.2s ease;
    padding: 6px 0;
    border-radius: 4px;
}

.agra-filter-checkbox:hover {
    color: #1B8216;
}

.agra-filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #1B8216;
    border-radius: 3px;
}

.agra-price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agra-filter-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 12px;
    background: #fff;
    justify-content: center;
}

.agra-filter-sidebar-footer .agra-filter-apply {
    width: 100%;
}

.agra-filter-apply {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #1B8216;
    color: #fff;
    box-shadow: 0 2px 4px rgba(27, 130, 22, 0.2);
}

.agra-filter-apply:hover {
    background: #156a12;
    box-shadow: 0 4px 8px rgba(27, 130, 22, 0.3);
}

.agra-filter-apply:active {
    transform: scale(0.98);
}

body.agra-filter-sidebar-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .agra-filter-desktop {
        display: none;
    }
    
    .agra-filter-mobile-button {
        display: flex;
    }
    
    .agra-filter-mobile-sidebar {
        display: block;
    }
}

@media (min-width: 1025px) {
    .agra-filter-desktop {
        display: flex;
    }
    
    .agra-filter-mobile-button {
        display: none;
    }
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    min-height: 40px;
    height: 40px;
    max-height: none;
    padding: 4px 12px;
    background: #FFF !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected {
    background: #fff !important;
    border-color: #1B8216 !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #1B8216 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 130, 22, 0.1);
}

.select2-container--default .select2-selection--multiple:hover {
    border-color: #1B8216;
}

.select2-container {
    max-width: 200px;
    min-width: 160px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.select2-container--default.agra-select-empty .select2-selection--multiple {
    opacity: 0.7;
    cursor: not-allowed;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    transition: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #f6f6f6;
    border: 1px solid rgba(27, 130, 22, 0.15);
    color: #1B8216;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    margin: 3px 4px 3px 0;
    line-height: 1.4;
    font-weight: 500;
    margin:0 !important;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected .select2-selection__choice {
    background-color: #fff;
    border-color: #ddd;
    color: #1B8216;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1B8216;
    margin-right: 6px;
    font-weight: 700;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected .select2-selection__choice__remove {
    color: #1B8216;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 0.7;
}


.select2-container--default .select2-selection--multiple .select2-search--inline {
    margin-top: 0 !important;
    height: 40px;
    min-width: 0;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-search__field {
    padding: 0;
    height: 20px !important;
    line-height: 40px !important;
    border: none;
    background: transparent;
    box-shadow: none;
    margin-top: -15px !important;
}

.select2-container--default .select2-results__option {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    padding: 10px 14px;
    color: #333;
    transition: all 0.2s ease;
}

.select2-container--default .select2-search--inline .select2-search__field {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    margin-top: 0;
    color: #333;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected .select2-search--inline .select2-search__field {
    color: #333;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected .select2-search--inline .select2-search__field::placeholder {
    color: #999;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1B8216;
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e8f5e7;
    color: #1B8216;
    font-weight: 500;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #1B8216;
    outline: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #999;
    line-height: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.select2-container--default .select2-selection--multiple.select2-selection--has-selected .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.agra-active-filters {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.agra-filter-actions-static {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.agra-filter-actions-static .agra-filter-apply {
    flex: 1 1 240px;
    max-width: 220px;
}

.agra-filter-actions-static .agra-clear-all-filters {
    flex: 0 0 auto;
    align-self: stretch;
}

.agra-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px;
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.agra-filter-tag:hover {
    background: #e8f5e7;
    border-color: #1B8216;
}

.agra-filter-tag-label {
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 11px;
}

.agra-filter-tag-value {
    color: #333;
    font-weight: 500;
}

.agra-filter-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-left: 2px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    transition: all 0.25s ease;
}

.agra-filter-tag-remove:hover {
    background: #1B8216;
    color: #fff;
    transform: rotate(90deg);
}

.agra-filter-tag-remove:active {
    transform: rotate(90deg) scale(0.9);
}

.agra-filter-tag-remove svg {
    width: 10px;
    height: 10px;
}

.agra-clear-all-filters {
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.agra-clear-all-filters:hover {
    background: #f5f5f5;
    border-color: #1B8216;
    color: #1B8216;
}

.agra-clear-all-filters:active {
    transform: scale(0.98);
}

@media (max-width: 1200px) {
    .agra-filter-desktop {
        gap: 10px;
    }
    
    .agra-filter-select,
    .agra-sorting-select {
        max-width: 180px;
        min-width: 140px;
    }
}

@media (max-width: 1024px) {
    .agra-filter-desktop {
        display: none !important; 
    }
    
    .agra-filter-mobile-button {
        display: flex;
        width: 100%;
        max-width: 300px;
    }
    
    .agra-filter-mobile-sidebar {
        display: block;
    }
    
    .agra-active-filters {
        display: none;
    }
    
    .agra-filter-actions-static {
        display: none;
    }
    
    .agra-filter-tag {
        font-size: 11px;
        padding: 5px 6px 5px 10px;
    }
    
    .agra-filter-tag-label {
        font-size: 10px;
    }
    
    .agra-filter-tag-remove {
        width: 18px;
        height: 18px;
    }
    
    .agra-filter-tag-remove svg {
        width: 9px;
        height: 9px;
    }
    
    .agra-clear-all-filters {
        font-size: 11px;
        padding: 5px 12px;
    }
}

@media (max-width: 768px) {
    .agra-filter-mobile-button {
        max-width: 100%;
        font-size: 12px;
        padding: 10px 16px;
    }
    
    .agra-filter-sidebar-panel {
        width: 90%;
        max-width: 360px;
    }
    
    .agra-active-filters {
        gap: 6px;
    }
    
    .agra-filter-tag {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .agra-filter-sidebar-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .agra-filter-sidebar-header,
    .agra-filter-sidebar-content,
    .agra-filter-sidebar-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .agra-price-min-mobile,
    .agra-price-max-mobile {
        flex: 1;
        min-width: 60px;
    }
    
    .agra-price-range-inputs {
        width: 100%;
    }
}
