﻿    /* ========================================
       Advanced Filter â€” Carsales-style
       All classes prefixed with af-
       ======================================== */

    .af-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    .af-topbar-actions {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
    }
    .af-view-toggle {
        display: inline-flex;
        background: #f3f4f6;
        border-radius: 10px;
        padding: 4px;
        gap: 4px;
    }
    .af-view-btn {
        border: none;
        background: transparent;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        color: #4b5563;
        cursor: pointer;
    }
    .af-view-btn.active {
        background: #fff;
        color: #16a34a;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }
    .af-vertical-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: 10px;
        padding: 4px 10px;
        border-radius: 999px;
        background: #ecfdf5;
        color: #166534;
        font-size: 12px;
        font-weight: 600;
    }
    .af-filter-group-label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #6b7280;
        margin: 18px 0 8px;
        padding-top: 8px;
        border-top: 1px solid #f3f4f6;
    }
    .af-filter-group-label:first-child {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }
    .af-map-wrap {
        margin-bottom: 20px;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
    }
    .af-map-split .af-map-canvas { height: 360px; }
    .af-map-full .af-map-canvas { height: 70vh; min-height: 420px; }
    .af-map-empty {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6b7280;
        font-weight: 500;
        background: rgba(255,255,255,0.85);
        z-index: 2;
        pointer-events: none;
    }
    #marketplace-map-panel { position: relative; }
    .jr-map-price-pin {
        position: absolute;
        transform: translate(-50%, -100%);
        cursor: pointer;
        z-index: 3;
        pointer-events: auto;
    }
    .jr-map-price-pin__label {
        display: inline-block;
        background: #fff;
        color: #0f172a;
        border: 2px solid #f8991b;
        border-radius: 999px;
        padding: 5px 10px;
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
        white-space: nowrap;
        transition: transform .15s ease, background .15s ease, color .15s ease;
    }
    .jr-map-price-pin:hover .jr-map-price-pin__label,
    .jr-map-price-pin.is-selected .jr-map-price-pin__label {
        background: #39763a;
        border-color: #39763a;
        color: #fff;
        transform: scale(1.05);
    }
    .jr-map-price-pin::after {
        content: '';
        display: block;
        width: 10px;
        height: 10px;
        background: #fff;
        border-right: 2px solid #f8991b;
        border-bottom: 2px solid #f8991b;
        transform: rotate(45deg);
        margin: -5px auto 0;
    }
    .jr-map-price-pin.is-selected::after,
    .jr-map-price-pin:hover::after {
        background: #39763a;
        border-color: #39763a;
    }
    .af-results-split {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
        align-items: start;
        margin-bottom: 20px;
    }
    .af-results-split .af-map-wrap { margin-bottom: 0; }
    .af-results-split .af-map-split .af-map-canvas { height: calc(100vh - 280px); min-height: 420px; }
    .af-grid-split {
        max-height: calc(100vh - 280px);
        overflow-y: auto;
        padding-right: 4px;
    }
    .af-toggle-row {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
        color: #374151;
    }

    /* Search Section */
    .af-search-section {
        background: #fff;
        padding: 2.5rem 1.5rem;
        margin: 20px auto;
        max-width: 1200px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        border: 1px solid #e5e7eb;
        position: relative;
        overflow: hidden;
    }
    .af-search-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(248,153,27,0.04), rgba(57,118,58,0.04));
        z-index: 0;
    }
    .af-search-content { position: relative; z-index: 1; }

    .af-geo-notice {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 14px;
        max-width: 1200px;
        margin: 0 auto 16px;
        padding: 14px 18px;
        background: #fffbeb;
        border: 1px solid #fcd34d;
        border-radius: 10px;
        color: #92400e;
        font-size: 14px;
        line-height: 1.45;
    }
    .af-geo-notice i { color: #d97706; flex-shrink: 0; }
    .af-geo-notice-clear {
        margin-left: auto;
        background: #fff;
        border: 1px solid #fcd34d;
        color: #92400e;
        font-size: 13px;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 8px;
        cursor: pointer;
    }
    .af-geo-notice-clear:hover { background: #fef3c7; }

    .af-search-title {
        text-align: center;
        font-size: 2rem;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0 0 0.3rem;
    }
    .af-search-subtitle {
        text-align: center;
        font-size: 1rem;
        color: #6b7280;
        margin: 0 0 1.5rem;
    }
    .af-hero-card {
        background: #fff;
        border-radius: 14px;
        padding: 20px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
        border: 1px solid #e5e7eb;
    }
    .af-listing-tabs {
        display: inline-flex;
        gap: 0;
        margin-bottom: 16px;
        border-bottom: 2px solid #e5e7eb;
        width: 100%;
    }
    .af-listing-tab {
        border: none;
        background: transparent;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 600;
        color: #6b7280;
        cursor: pointer;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
    }
    .af-listing-tab.active {
        color: #16a34a;
        border-bottom-color: #16a34a;
    }
    .af-type-picker {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 16px 0 4px;
    }
    .af-type-pick {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
        color: #374151;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }
    .af-type-pick.active {
        background: #16a34a;
        border-color: #16a34a;
        color: #fff;
    }
    .af-type-pick.active i { color: #fff; }
    .af-quick-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 20px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #f3f4f6;
    }
    .af-quick-label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
    }
    .af-quick-select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        background: #fff;
    }
    .af-quick-select:disabled { background: #f3f4f6; color: #9ca3af; }
    .af-hero-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid #f3f4f6;
        flex-wrap: wrap;
    }
    .af-more-filters {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: none;
        background: transparent;
        color: #16a34a;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }
    .af-result-cta {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background: #16a34a;
        color: #fff;
        padding: 12px 22px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        min-width: 160px;
        justify-content: center;
    }
    .af-search-form {
        display: flex;
        gap: 10px;
        background: #f9fafb;
        padding: 8px;
        border-radius: 10px;
        border: 2px solid var(--primary);
    }
    .af-search-form:focus-within {
        box-shadow: 0 0 0 3px rgba(248,153,27,0.15);
    }
    .af-search-form-primary { margin-bottom: 10px; }
    .af-search-form-secondary {
        border-color: #e5e7eb;
        background: #fff;
    }
    .af-search-form-secondary:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(248,153,27,0.1);
    }
    .af-search-group-wide { flex: 2; }
    .af-step-label {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #6b7280;
        margin: 14px 0 8px;
    }
    .af-filter-count-badge {
        background: #fff;
        color: var(--primary);
        font-size: 11px;
        font-weight: 800;
        min-width: 20px;
        height: 20px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        margin-left: 6px;
    }
    .af-search-group {
        display: flex;
        align-items: center;
        flex: 1;
        background: #fff;
        padding: 10px 15px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }
    .af-search-group i {
        color: #9ca3af;
        margin-right: 10px;
        font-size: 14px;
    }
    .af-search-input {
        width: 100%;
        border: none;
        outline: none;
        font-size: 15px;
        background: transparent;
        color: #1a1a2e;
    }
    .af-search-input::placeholder { color: #9ca3af; }
    .af-search-cat { border-left: 1px solid #e5e7eb; }
    .af-search-loc { border-left: 1px solid #e5e7eb; position: relative; }
    .af-cat-select {
        border: none;
        outline: none;
        background: transparent;
        font-size: 15px;
        color: #1a1a2e;
        cursor: pointer;
        flex: 1;
        padding-left: 6px;
    }
    .af-loc-input {
        border: none;
        outline: none;
        background: transparent;
        font-size: 15px;
        color: #1a1a2e;
        flex: 1;
        padding-left: 6px;
        min-width: 0;
    }
    .af-loc-input::placeholder { color: #9ca3af; }
    .af-loc-clear {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #9ca3af;
        cursor: pointer;
        padding: 0 4px;
        font-size: 14px;
    }
    .af-loc-clear:hover { color: #ef4444; }

    /* Drill-down navigation */
    .af-drilldown { width: 100%; }
    .af-drill-level { animation: af-slide-in 0.2s ease; }
    @keyframes af-slide-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
    .af-drill-back {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 16px;
        cursor: pointer;
        color: var(--primary, #f8991b);
        font-weight: 600;
        font-size: 14px;
        border-bottom: 1px solid #f0f0f0;
        transition: background 0.15s;
    }
    .af-drill-back:hover { background: #fef9f3; }
    .af-drill-back i { font-size: 13px; }
    .af-drill-item {
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 10px 16px;
        gap: 12px;
        transition: background 0.15s;
    }
    .af-drill-item:hover { background: #f9fafb; }
    .af-drill-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        object-fit: cover;
    }
    .af-drill-icon-placeholder {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: #f3f4f6;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #9ca3af;
        font-size: 14px;
    }
    .af-drill-badge {
        background: var(--primary, #f8991b);
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        margin-left: auto;
        margin-right: 8px;
    }

    /* Container */
    .af-container {
        display: flex;
        gap: 24px;
        padding: 0 24px 24px;
        max-width: 1200px;
        margin: 0 auto;
    }

    /* ===== SIDEBAR ===== */
    .af-sidebar {
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 80px;
        height: fit-content;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #e5e7eb transparent;
    }
    .af-sidebar::-webkit-scrollbar { width: 3px; }
    .af-sidebar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
    .af-sidebar-close {
        display: none;
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        font-size: 20px;
        color: #6b7280;
        cursor: pointer;
        z-index: 10;
    }
    .af-sidebar-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0 16px;
    }
    .af-sidebar-title {
        font-size: 22px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0;
    }
    .af-clear-all {
        background: none;
        border: none;
        color: var(--primary);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
        transition: opacity 0.2s;
    }
    .af-clear-all:hover { opacity: 0.7; }

    .af-sidebar-context {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 12px;
        font-size: 13px;
        color: #374151;
        line-height: 1.5;
    }
    .af-sidebar-context-label {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
        margin-bottom: 4px;
    }
    .af-sidebar-context-sep { color: #9ca3af; margin: 0 4px; }

    .af-filter-accordion { border-bottom: 1px solid #f0f0f0; }
    .af-filter-accordion summary { list-style: none; }
    .af-filter-accordion summary::-webkit-details-marker { display: none; }
    .af-filter-summary { cursor: pointer; }
    .af-filter-inline-body { padding: 0 4px 14px; }
    .af-options-compact { max-height: 220px; overflow-y: auto; }
    .af-filter-pill {
        background: var(--primary);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        min-width: 20px;
        height: 20px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        margin-left: auto;
        margin-right: 8px;
    }

    .af-sidebar-footer {
        position: sticky;
        bottom: 0;
        background: linear-gradient(to top, #fff 80%, rgba(255,255,255,0));
        padding: 16px 0 4px;
        margin-top: 8px;
    }
    .af-show-results-btn {
        width: 100%;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 10px;
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }
    .af-show-results-btn:hover { background: var(--primary-dark); }

    /* Filter Items */
    .af-filter-list {
        border-top: 1px solid #e5e7eb;
    }
    .af-filter-item {
        border-bottom: 1px solid #f0f0f0;
    }
    .af-filter-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 4px;
        cursor: pointer;
        transition: background 0.15s ease;
        border-radius: 4px;
    }
    .af-filter-row:hover { background: #f9fafb; }
    .af-filter-name {
        font-size: 15px;
        font-weight: 500;
        color: #374151;
    }
    .af-filter-chevron {
        color: #d1d5db;
        font-size: 12px;
        transition: color 0.2s;
    }
    .af-filter-row:hover .af-filter-chevron { color: #9ca3af; }

    /* Active value under filter name */
    .af-filter-active-value {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 4px 12px 16px;
        flex-wrap: wrap;
    }
    .af-active-text {
        font-size: 14px;
        font-weight: 500;
        color: var(--primary);
    }
    .af-remove-val {
        background: none;
        border: none;
        color: var(--primary);
        cursor: pointer;
        font-size: 14px;
        padding: 0;
        opacity: 0.7;
        transition: opacity 0.2s;
    }
    .af-remove-val:hover { opacity: 1; }

    /* ===== POPUP MODAL ===== */
    .af-modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(3px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .af-modal {
        background: #fff;
        border-radius: 14px;
        width: 100%;
        max-width: 520px;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 20px 60px rgba(0,0,0,0.18);
        overflow: hidden;
    }
    .af-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 24px;
        border-bottom: 1px solid #f0f0f0;
    }
    .af-modal-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0;
    }
    .af-modal-close {
        background: none;
        border: none;
        font-size: 18px;
        color: #9ca3af;
        cursor: pointer;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .af-modal-close:hover { background: #fee2e2; color: #dc2626; }

    .af-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px 24px;
        scrollbar-width: thin;
        scrollbar-color: #e5e7eb transparent;
    }
    .af-modal-body::-webkit-scrollbar { width: 4px; }
    .af-modal-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

    /* Modal Search */
    .af-modal-search { margin-bottom: 16px; }
    .af-modal-search-label {
        display: block;
        font-size: 13px;
        color: #6b7280;
        margin-bottom: 6px;
    }
    .af-modal-search-wrap {
        position: relative;
    }
    .af-modal-search-wrap i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #d1d5db;
        font-size: 13px;
    }
    .af-modal-search-input {
        width: 100%;
        padding: 10px 12px 10px 36px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        outline: none;
        background: #fff;
        transition: border-color 0.2s;
    }
    .af-modal-search-input:focus { border-color: var(--primary); }

    /* Options List */
    .af-options-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .af-options-list li {
        border-bottom: 1px solid #f5f5f5;
    }
    .af-options-list li:last-child { border-bottom: none; }
    .af-option-label {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 4px;
        cursor: pointer;
        transition: background 0.15s;
        border-radius: 4px;
    }
    .af-option-label:hover { background: #f9fafb; }

    /* Custom Checkbox (Carsales-style) */
    .af-checkbox-input { display: none; }
    .af-checkbox-mark {
        width: 20px;
        height: 20px;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s ease;
        color: transparent;
        font-size: 12px;
    }
    .af-checkbox-mark::after {
        content: '\f00c';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
    }
    .af-checkbox-input:checked + .af-checkbox-mark {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
    }
    .af-option-text {
        flex: 1;
        font-size: 15px;
        color: #374151;
        font-weight: 400;
    }
    .af-option-count {
        font-size: 11px;
        color: #d1d5db;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* Modal Footer */
    .af-modal-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 24px;
        border-top: 1px solid #f0f0f0;
        background: #fafbfc;
    }
    .af-modal-clear {
        background: none;
        border: none;
        color: var(--primary);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        padding: 0;
        transition: opacity 0.2s;
    }
    .af-modal-clear:hover { opacity: 0.7; }
    .af-modal-search-btn {
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 10px 28px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    .af-modal-search-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(248,153,27,0.3);
    }
    .af-modal-next-btn {
        background: var(--secondary, #39763a);
        color: #fff;
        border: none;
        padding: 10px 24px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .af-modal-next-btn:hover {
        background: #2d5f2e;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(57,118,58,0.3);
    }

    /* Modal overlay uses display:none/flex toggled by JS */
    .af-modal-overlay[style*="display: none"],
    .af-modal-overlay:not([style*="display: flex"]) {
        pointer-events: none !important;
    }

    /* ===== PRICE Section inside modal ===== */
    .af-price-section { padding: 4px 0; }
    .af-price-row {
        display: flex;
        align-items: flex-end;
        gap: 12px;
        margin-bottom: 16px;
    }
    .af-price-field { flex: 1; }
    .af-price-field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }
    .af-price-field input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 15px;
        outline: none;
        text-align: center;
        transition: border-color 0.2s;
    }
    .af-price-field input:focus { border-color: var(--primary); }
    .af-price-dash {
        font-size: 20px;
        color: #d1d5db;
        padding-bottom: 10px;
    }
    .af-price-slider {
        position: relative;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        margin: 0 0 8px;
    }
    .af-price-slider input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 6px;
        position: absolute;
        top: 0;
        background: transparent;
        pointer-events: none;
        z-index: 2;
    }
    .af-price-slider input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        height: 20px;
        width: 20px;
        background: var(--primary);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: all;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .af-price-slider input[type="range"]::-moz-range-thumb {
        height: 20px;
        width: 20px;
        background: var(--primary);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: all;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .af-price-labels {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
        font-weight: 600;
        color: var(--primary);
    }

    /* ===== DISTANCE Section inside modal ===== */
    .af-distance-section { padding: 4px 0; }
    .af-distance-slider {
        -webkit-appearance: none;
        width: 100%;
        height: 6px;
        background: linear-gradient(to right, var(--primary), var(--secondary));
        border-radius: 3px;
        outline: none;
        margin: 10px 0 10px;
    }
    .af-distance-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 22px;
        height: 22px;
        background: var(--secondary);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .af-distance-slider::-moz-range-thumb {
        width: 22px;
        height: 22px;
        background: var(--secondary);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .af-distance-labels {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #6b7280;
    }
    .af-distance-current {
        font-weight: 700;
        color: var(--secondary);
        font-size: 14px;
    }

    /* ===== MAIN CONTENT ===== */
    .af-main { flex: 1; min-width: 0; }
    .af-topbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding: 14px 20px;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }
    .af-results-count {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
    }
    .af-sort {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .af-sort label {
        font-size: 14px;
        color: #374151;
        font-weight: 500;
    }
    .af-sort select {
        padding: 7px 12px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        font-size: 13px;
        background: #fff;
        cursor: pointer;
        outline: none;
        transition: border-color 0.2s;
    }
    .af-sort select:focus { border-color: var(--primary); }

    /* Active Filters Chips */
    .af-active-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }
    .af-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #f3f4f6;
        color: #374151;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 500;
        border: 1px solid #e5e7eb;
        transition: all 0.2s;
    }
    .af-chip:hover { background: #e5e7eb; }
    .af-chip button {
        background: none;
        border: none;
        color: #9ca3af;
        cursor: pointer;
        padding: 0;
        font-size: 11px;
        transition: color 0.2s;
    }
    .af-chip button:hover { color: #dc2626; }
    .af-chip-price { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

    /* Card Grid */
    .af-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .af-grid > div:empty { display: none; }

    /* Loading */
    .af-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 20px;
        gap: 12px;
    }
    .af-spinner {
        border: 4px solid #f3f3f3;
        border-top: 4px solid var(--primary);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        animation: af-spin 0.8s linear infinite;
    }
    @keyframes af-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    .af-loading span { font-size: 14px; color: #6b7280; }

    /* Empty State */
    .af-empty {
        grid-column: 1 / -1;
        text-align: center;
        padding: 60px 20px;
        color: #6b7280;
    }
    .af-empty i { font-size: 48px; color: #e5e7eb; margin-bottom: 16px; display: block; }
    .af-empty h3 { font-size: 20px; font-weight: 600; color: #374151; margin: 0 0 8px; }
    .af-empty p { font-size: 14px; margin: 0 0 20px; }
    .af-empty-btn {
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 10px 24px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }
    .af-empty-btn:hover { opacity: 0.9; }

    /* Load More */
    .af-loadmore-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 24px;
        padding-bottom: 32px;
    }
    .af-infinite-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: #64748b;
        font-size: 14px;
        margin-bottom: 12px;
    }
    .af-loadmore-btn {
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 12px 28px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.2s;
    }
    .af-loadmore-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(248,153,27,0.3);
    }

    /* Mobile Filter Toggle */
    .af-mobile-toggle {
        display: none;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 998;
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 14px 28px;
        border-radius: 30px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 6px 20px rgba(248,153,27,0.4);
        align-items: center;
        gap: 8px;
    }
    .af-mobile-badge {
        background: #dc2626;
        color: #fff;
        font-size: 10px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 4px;
    }

    /* Mobile sidebar overlay */
    .af-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0,0,0,0.4);
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 992px) {
        .af-mobile-toggle { display: flex; }
        .af-results-split {
            grid-template-columns: 1fr;
        }
        .af-results-split .af-map-split .af-map-canvas { height: 320px; min-height: 280px; }
        .af-grid-split { max-height: none; overflow: visible; }
        .af-sidebar {
            position: fixed;
            top: 0;
            left: -320px;
            width: 300px !important;
            height: 100vh;
            z-index: 1001;
            background: #fff;
            padding: 24px 20px;
            border-radius: 0;
            box-shadow: none;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow-y: auto;
            max-height: 100vh;
        }
        .af-sidebar.af-sidebar-open {
            left: 0;
            box-shadow: 10px 0 30px rgba(0,0,0,0.15);
        }
        .af-sidebar-close { display: block; }
        .af-container { padding: 0 16px 16px; }
        .af-search-section { margin: 12px 16px; padding: 1.5rem 1rem; }
    }
    @media (max-width: 768px) {
        .af-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
        .af-topbar { flex-direction: column; gap: 10px; align-items: flex-start; }
        .af-quick-grid { grid-template-columns: 1fr; }
        .af-hero-footer { flex-direction: column; align-items: stretch; }
        .af-result-cta { width: 100%; }
        .af-search-cat { border-left: none; border-top: 1px solid #e5e7eb; }
        .af-search-loc { border-left: none; border-top: 1px solid #e5e7eb; }
        .af-modal-overlay { align-items: flex-end; padding: 0; }
        .af-modal {
            max-width: 100%;
            max-height: 90vh;
            border-radius: 14px 14px 0 0;
        }
    }
    @media (max-width: 480px) {
        .af-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    }

    /* Multi-level category type picker */
    .af-category-trail {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        margin: 10px 0 4px;
        font-size: 13px;
    }
    .af-category-trail-sep { color: #9ca3af; }
    .af-category-trail-link {
        border: none;
        background: #fff7ed;
        color: #c2410c;
        padding: 4px 10px;
        border-radius: 999px;
        font-weight: 600;
        cursor: pointer;
    }
    .af-category-trail-link:hover { background: #ffedd5; }
    .af-type-picker-secondary,
    .af-type-picker-tertiary { margin-top: 4px; }
    .af-type-pick-chevron { font-size: 10px; opacity: 0.6; margin-left: 2px; }
