:root {
    --wf-accent: #3182ce;
    --wf-accent-hover: #2b6cb0;
    --wf-bg-dark: #0b0f19;
    --wf-card-bg: #151b28;
    --wf-text-muted: #94a3b8;
    --wf-border: rgba(255, 255, 255, 0.1);
}

/* Marketplace Controls Wrapper */
.wf-marketplace-controls {
    margin-bottom: 24px;
    font-family: 'Wix Madefor Text', sans-serif;
}

/* Top Horizontal Bar */
.wf-marketplace-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(225, 228, 235, 0.1);
    gap: 16px;
    flex-wrap: wrap;
}

.wf-top-bar-left,
.wf-top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Filter Button */
.wf-filter-drawer-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #336ecc!important;
    color: #fff;
    padding: 14px 18px!important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wf-filter-drawer-toggle:hover {
    background: #1a202c;
    border-color: #99C0FF;
}

.wf-filter-count-badge {
    background: #99C0FF;
    color: #0B0F19;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
    margin-left: 4px;
}

/* Quick Chips */
.wf-quick-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.wf-quick-chips::-webkit-scrollbar {
    display: none;
}

.wf-quick-chip {
    background: transparent!important;
    border: 1px solid #525f7a!important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wf-quick-chip:hover {
    border: 1px solid #99c0ff!important;
    color: #99C0FF;
}

.wf-quick-chip.active {
    background: #0B0F19;
    color: #fff;
    border-color: #0B0F19;
}

/* Sorting and Count Styles */
.wf-results-count {
    font-size: 14px;
    font-weight: 500;
    color: #E1E4EB;
    margin-right: 12px;
}

.wf-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.wf-sort-label {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
}

.wf-sort-select {
    background: #1E293B;
    border: 1px solid #334155;
    color: #F8FAFC !important;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 32px 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: all 0.2s;
    outline: none;
}

/* Active Tags */
.wf-active-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 0;
}

.wf-active-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1D2330;
    color: #e6e6e6;
    padding: 8px 17px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #336ECC;
}

.wf-active-tag .wf-remove-tag {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.9;
}

.wf-active-tag .wf-remove-tag:hover {
    opacity: 1;
    color: #ef4444;
}

/* (Consolidated into Sort Styles section) */

/* Off-canvas Drawer */
.wf-filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(2px);
}

.wf-filter-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
}

.wf-filter-drawer #wf-marketplace-filter-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.wf-filter-drawer.open {
    left: 0;
}

.wf-drawer-header {
    padding: 24px;
    border-bottom: 1px solid #E1E4EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wf-drawer-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0B0F19;
}

.wf-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
}

.wf-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.wf-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #E1E4EB;
    display: flex;
    gap: 12px;
    background: #f8fafc;
}

.wf-apply-btn {
    flex: 2;
    background: #0B0F19;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wf-apply-btn:hover {
    background: #1a202c;
}

.wf-reset-btn {
    flex: 1;
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Reuse shared section styles */
.wf-filter-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
}

.wf-filter-section h2 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 700;
    color: #0B0F19;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wf-checkbox-group.scrollable {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 8px;
}

.wf-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.wf-range-inputs {
    display: flex;
    gap: 12px;
}

.wf-range-inputs input {
    width: 50%;
    padding: 10px;
    border: 1px solid #E1E4EB;
    border-radius: 6px;
    font-size: 14px;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    border: 1px solid #E1E4EB !important;
    height: 44px !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .wf-filter-drawer {
        width: 100%;
        left: -100%;
    }

    .wf-marketplace-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .wf-top-bar-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
    }
}

@media (max-width: 468px) {
    .wf-quick-chips{
        display: none;
    }
}

.wf-checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    /* Darker border for visibility on white */
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wf-checkbox-group label:hover input[type="checkbox"] {
    border-color: var(--wf-accent);
}

.wf-checkbox-group input[type="checkbox"]:checked {
    background: var(--wf-accent);
    border-color: var(--wf-accent);
}

.wf-checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Toggle Switch */
.wf-toggle-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}

.wf-toggle-filter .slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: var(--wf-bg-dark);
    transition: .4s;
    border-radius: 20px;
    border: 1px solid var(--wf-border);
}

.wf-toggle-filter input {
    display: none;
}

.wf-toggle-filter .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.wf-toggle-filter input:checked+.slider {
    background-color: var(--wf-accent);
    border-color: var(--wf-accent);
}

.wf-toggle-filter input:checked+.slider:before {
    transform: translateX(20px);
}

.wf-toggle-filter .label-text {
    font-size: 14px;
}

/* Advanced Filter Toggle */
.wf-advanced-toggle-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    margin: 24px 0;
    transition: background 0.2s;
}

.wf-advanced-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wf-advanced-toggle-btn.active .dashicons {
    transform: rotate(180deg);
}

.wf-reset-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--wf-border);
    color: var(--wf-text-muted);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.wf-reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Select2 Custom Dark Styling */
.select2-container--default .select2-selection--single {
    background-color: var(--wf-bg-dark) !important;
    border: 1px solid var(--wf-border) !important;
    height: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff !important;
    line-height: 40px !important;
    padding-left:12px;
}

.select2-container--default .select2-selection--single .select2-selection__clear { 
cursor: pointer; 
float: none !important;  
font-weight: bold;   
height: 100% !important;
margin-right: 0 !important; 
margin-top: 0 !important;
padding: 0 8px 0 12px !important; 
display: flex !important;
align-items: center; 
justify-content: center; 
color: #ef4444 !important;
order: -1; 
font-size: 18px !important; 
line-height: 1 !important; 
background: transparent !important;
border: none !important;  
position: relative !important;
top: auto !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear span {  
display: flex !important;
align-items: center;
justify-content: center;  
height: 100%;  
line-height: 1 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

.select2-dropdown {
    background-color: var(--wf-card-bg) !important;
    border: 1px solid var(--wf-border) !important;
    color: #fff !important;
}

/* No Results */
.wf-no-results {
    color: #fff;
    font-size: 18px;
    padding: 80px 20px;
    text-align: center;
    width: 100%;
    font-weight: 500;
    grid-column: 1 / -1;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--wf-accent) !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--wf-bg-dark) !important;
    color: #fff !important;
    border: 1px solid var(--wf-border) !important;
}