        /* Reset and Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f9fa;
            color: #1a1a1a;
        }

        /* Main Search Container */
        .search-container {
            background: #f8f9fa;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            position: relative; /* Changed from sticky to relative for mobile */
            z-index: 100;
            border-bottom: 1px solid #e9ecef;
        }
        
        @media (min-width: 769px) {
            .search-container {
                position: sticky;
                top: 0;
            }
        }

        .search-wrapper {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px 24px;
        }

        /* Search Box */
        .search-box-wrapper {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            align-items: stretch;
        }

        .search-group {
            display: flex;
            flex: 1;
            gap: 0;
            max-width: 600px;
        }

        .search-input-group {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
            background: white;
            border-radius: 8px;
            border: 2px solid #e0e0e0;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .search-input-group:focus-within {
            border-color: #5e7ac5;
            background: white;
            box-shadow: 0 4px 12px rgba(94, 122, 197, 0.15);
        }

        @media (max-width: 768px) {
            .search-input-group:focus-within {
                box-shadow: none;
            }
        }

        .search-input {
            flex: 1;
            border: none;
            background: transparent;
            padding: 12px 16px;
            font-size: 16px;
            outline: none;
        }

        .search-input::placeholder {
            color: #666;
        }

        .clear-button {
            background: none;
            border: none;
            padding: 8px;
            cursor: pointer;
            color: #666;
            display: none;
            transition: color 0.2s;
        }

        .clear-button:hover {
            color: #333;
        }

        .search-input:not(:placeholder-shown) ~ .clear-button {
            display: block;
        }

        .search-button {
            background: #5e7ac5;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .search-button:hover {
            background: #4a66b0;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(94, 122, 197, 0.3);
        }

        .reset-button {
            background: #e0e0e0;
            color: #666;
            border: none;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.2s ease;
        }

        .reset-button:hover {
            background: #d0d0d0;
            color: #333;
            transform: translateY(-1px);
        }

        .reset-button:active {
            transform: translateY(0);
        }

        /* Mobile Filter Button */
        .mobile-filter-button {
            display: none;
            background: #5e7ac5;
            color: white;
            border: none;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .mobile-filter-button:hover {
            background: #4a66b0;
            box-shadow: 0 4px 8px rgba(94, 122, 197, 0.2);
        }

        .mobile-filter-button .badge {
            background: #fff;
            color: #5e7ac5;
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 600;
            min-width: 20px;
            text-align: center;
        }

        /* Mobile Save Search Button */
        .mobile-save-search-button {
            display: none;
            background: #C5A95E;
            border: none;
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .mobile-save-search-button:hover {
            background: #b59a4e;
        }

        .mobile-save-search-button svg {
            width: 16px;
            height: 16px;
        }
        
        /* Hide save button in main search area on mobile */
        @media (max-width: 768px) {
            .search-box-wrapper .mobile-save-search-button {
                display: none !important;
            }
        }

        /* Mobile Overlay */
        .mobile-filter-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: white;
            z-index: 9999;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .mobile-filter-overlay.show {
            display: block;
        }

        .mobile-filter-header {
            position: sticky;
            top: 0;
            background: white;
            border-bottom: 1px solid #e0e0e0;
            padding: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 10;
        }

        .mobile-header-buttons {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        
        /* Show save button in mobile overlay */
        .mobile-filter-overlay .mobile-save-search-button {
            display: flex !important;
        }

        .mobile-reset-button {
            background: #e0e0e0;
            color: #666;
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .mobile-reset-button:hover {
            background: #d0d0d0;
        }

        .mobile-filter-title {
            font-size: 20px;
            font-weight: 600;
        }

        .mobile-close-button {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            padding: 8px;
            color: #666;
        }

        .mobile-filter-content {
            padding: 16px;
        }

        .mobile-apply-button {
            position: sticky;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            padding: 16px;
            border-top: 1px solid #e0e0e0;
            z-index: 10;
        }

        .mobile-apply-button button {
            width: 100%;
            background: #C5A95E;
            color: white;
            border: none;
            padding: 16px;
            border-radius: 8px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
        }

        .mobile-apply-button button:hover {
            background: #b39852;
        }

        /* Filter Container */
        .filter-container {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }

        /* Filter Buttons */
        .filter-button {
            background: white;
            border: 1px solid #e0e0e0;
            padding: 8px 16px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
            position: relative;
        }

        .filter-button:hover {
            border-color: #C5A95E;
            background: #fafafa;
        }

        .filter-button.active {
            background: #C5A95E;
            color: white;
            border-color: #C5A95E;
        }

        .filter-badge {
            background: #333;
            color: white;
            border-radius: 12px;
            padding: 2px 6px;
            font-size: 11px;
            margin-left: 4px;
        }

        .filter-button.active .filter-badge {
            background: white;
            color: #C5A95E;
        }

        /* Dropdown Icon */
        .dropdown-icon {
            width: 16px;
            height: 16px;
            transition: transform 0.2s;
        }

        .filter-button.open .dropdown-icon {
            transform: rotate(180deg);
        }

        /* Filter Dropdown */
        .filter-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.12);
            min-width: 320px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.2s ease;
            z-index: 1001;
            overflow: hidden;
        }
        
        /* Position dropdowns that would go off right edge */
        .filter-button:last-child .filter-dropdown,
        .filter-button:nth-last-child(2) .filter-dropdown {
            left: auto;
            right: 0;
        }
        
        /* Specific width constraints for dropdowns */
        #bedsBathsDropdown {
            min-width: 500px;
            max-width: 800px;
        }
        
        /* Center the beds/baths dropdown on desktop if there's room */
        @media (min-width: 1201px) {
            #bedsBathsDropdown {
                min-width: 600px;
                max-width: 800px;
            }
            
            .filter-button[data-filter="bedsBaths"] .filter-dropdown {
                left: 50%;
                transform: translateX(-50%) translateY(-10px);
            }
            
            .filter-button[data-filter="bedsBaths"] .filter-dropdown.show {
                transform: translateX(-50%) translateY(0);
            }
        }
        
        /* On medium screens, adjust dropdown widths */
        @media (max-width: 1400px) {
            .filter-dropdown {
                max-width: 400px;
            }
            
            #bedsBathsDropdown {
                min-width: 450px;
                max-width: 800px;
            }
        }
        
        /* At 1200px when we collapse to single column */
        @media (max-width: 1200px) {
            #bedsBathsDropdown {
                min-width: 380px;
                max-width: 450px;
            }
        }
        
        /* Further limit widths at 1150px */
        @media (max-width: 1150px) {
            #propertyTypeDropdown {
                max-width: 350px;
            }
            
            .filter-dropdown {
                max-width: 380px;
            }
        }

        .filter-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-header {
            padding: 16px 20px;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .dropdown-title {
            font-size: 18px;
            font-weight: 600;
        }

        .done-button {
            background: none;
            border: none;
            color: #C5A95E;
            font-weight: 500;
            cursor: pointer;
            font-size: 14px;
        }

        .dropdown-body {
            padding: 20px;
            max-height: 400px;
            overflow-y: auto;
            overflow-x: hidden;
        }
        
        /* Remove dropdown body scrolling in mobile filter overlay */
        .mobile-filter-overlay .dropdown-body,
        #mobileFilterContent .dropdown-body {
            max-height: none !important;
            overflow: visible !important;
        }
        
        @media (max-width: 1260px) {
            .dropdown-body {
                padding: 16px;
            }
        }

        /* Price Range Slider */
        .price-slider-container {
            margin-bottom: 24px;
            overflow: hidden;
        }

        .price-display {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
            font-size: 14px;
            color: #333;
        }

        .price-display span {
            font-weight: 600;
        }

        /* Square Feet Slider */
        .sqft-slider-container {
            margin-bottom: 24px;
            overflow: hidden;
        }

        .sqft-display {
            display: flex;
            justify-content: space-between;
            margin-bottom: 16px;
            font-size: 14px;
            color: #333;
        }

        .sqft-display span {
            font-weight: 600;
        }

        .range-slider {
            position: relative;
            height: 40px;
            margin: 20px 0;
            padding: 0 12px;
            box-sizing: border-box;
        }

        .slider-track {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            left: 12px;
            right: 12px;
            height: 6px;
            background: #e0e0e0;
            border-radius: 3px;
        }

        .slider-range {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            height: 6px;
            background: #C5A95E;
            border-radius: 3px;
        }

        .slider-thumb {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 24px;
            background: white;
            border: 2px solid #C5A95E;
            border-radius: 50%;
            cursor: grab;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            transition: box-shadow 0.2s;
            z-index: 1;
            margin-left: -12px; /* Half of width to center */
        }

        .slider-thumb:active {
            cursor: grabbing;
            box-shadow: 0 2px 12px rgba(197, 169, 94, 0.4);
        }

        .slider-thumb:hover {
            box-shadow: 0 2px 12px rgba(197, 169, 94, 0.3);
        }

        .price-preset-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 16px;
        }

        .price-preset {
            padding: 4px 10px;
            background: #f5f5f5;
            border: 1px solid #e0e0e0;
            border-radius: 16px;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        @media (max-width: 1260px) {
            .price-preset {
                padding: 3px 8px;
                font-size: 10px;
            }
        }

        .price-preset:hover {
            background: #eee;
            border-color: #C5A95E;
        }

        .price-preset.active {
            background: #C5A95E;
            color: white;
            border-color: #C5A95E;
        }

        /* Property Type Grid */
        .property-type-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 20px;
            padding: 4px;
        }
        
        /* Keep 3 columns at all screen sizes */
        @media (max-width: 1200px) {
            .property-type-grid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 10px;
            }
            
            /* Make items more compact */
            .property-type-item {
                min-height: 75px;
                padding: 8px 4px;
            }
            
            .property-type-icon {
                font-size: 24px;
                margin-bottom: 6px;
            }
            
            .property-type-label {
                font-size: 11px;
            }
        }
        
        /* Keep 3 columns on mobile too */
        @media (max-width: 768px) {
            .property-type-grid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 8px;
            }
        }

        .property-type-item {
            text-align: center;
            cursor: pointer;
            padding: 10px 6px;
            border-radius: 8px;
            transition: all 0.2s;
            border: 2px solid transparent;
            min-height: 85px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        
        @media (max-width: 1260px) {
            .property-type-item {
                padding: 8px 4px;
                min-height: 75px;
            }
        }

        .property-type-item:hover {
            background: #f5f5f5;
        }

        .property-type-item.selected {
            border-color: #C5A95E;
            background: rgba(197, 169, 94, 0.1);
        }

        .property-type-icon {
            font-size: 28px;
            margin: 0 auto 8px;
            color: #666;
            display: block;
            text-align: center;
        }
        
        @media (max-width: 1260px) {
            .property-type-icon {
                font-size: 24px;
                margin-bottom: 6px;
            }
        }

        .property-type-item.selected .property-type-icon {
            color: #C5A95E;
        }

        .property-type-label {
            font-size: 12px;
            color: #666;
            display: block;
        }
        
        @media (max-width: 1260px) {
            .property-type-label {
                font-size: 11px;
            }
        }

        .property-type-item.selected .property-type-label {
            color: #C5A95E;
            font-weight: 500;
        }

        /* Beds & Baths Grid */
        .beds-baths-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }
        
        /* Collapse beds-baths grid to single column at 1200px */
        @media (max-width: 1200px) {
            #bedsBathsDropdown .beds-baths-grid,
            .filter-dropdown .beds-baths-grid {
                grid-template-columns: 1fr !important;
                gap: 16px;
            }
            
            /* Make option buttons more compact */
            #bedsBathsDropdown .option-button {
                padding: 6px 10px;
                font-size: 13px;
                min-width: 40px;
            }
            
            #bedsBathsDropdown .option-buttons {
                gap: 6px;
            }
        }
        
        @media (max-width: 600px) {
            .beds-baths-grid {
                grid-template-columns: 1fr !important;
                gap: 14px;
            }
        }
        
        @media (max-width: 480px) {
            .beds-baths-grid {
                grid-template-columns: 1fr !important;
                gap: 12px;
            }
            
            /* Stack all option groups vertically on mobile */
            .dropdown-body .option-group {
                margin-bottom: 20px;
            }
        }

        .option-group {
            margin-bottom: 16px;
        }

        .option-label {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 8px;
            color: #333;
        }
        
        @media (max-width: 1260px) {
            .option-label {
                font-size: 13px;
                margin-bottom: 6px;
            }
        }

        .option-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .option-button {
            flex: 1 1 auto;
            padding: 8px 12px;
            background: #f5f5f5;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
            text-align: center;
            min-width: 50px;
            white-space: nowrap;
        }
        
        @media (max-width: 480px) {
            .option-button {
                padding: 10px 12px;
                font-size: 15px;
                min-width: 45px;
            }
            
            .option-buttons {
                gap: 6px;
            }
        }

        .option-button:hover {
            background: #eee;
        }

        .option-button.selected {
            background: #C5A95E;
            color: white;
            border-color: #C5A95E;
        }

        /* Input Styling */
        .price-input {
            width: 48%;
            padding: 12px 16px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            background-color: #fff;
            transition: all 0.3s ease;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        
        /* Make inputs more compact on medium screens */
        @media (max-width: 1260px) {
            .price-input {
                padding: 8px 12px;
                font-size: 14px;
            }
        }

        .price-input:focus {
            outline: none;
            border-color: #C5A95E;
            box-shadow: 0 0 0 3px rgba(197, 169, 94, 0.1);
        }

        .price-input::placeholder {
            color: #999;
        }

        select.price-input {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 16px center;
            padding-right: 40px;
        }

        .price-inputs {
            display: flex;
            gap: 12px;
            margin-bottom: 15px;
            align-items: center;
        }
        
        @media (max-width: 480px) {
            .price-inputs {
                flex-direction: column;
                gap: 8px;
            }
            
            .price-inputs .price-input {
                width: 100% !important;
            }
            
            .price-divider {
                display: none;
            }
        }

        .price-divider {
            color: #999;
            font-size: 14px;
            flex-shrink: 0;
        }

        /* Checkbox Options */
        .checkbox-group {
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid #e0e0e0;
        }

        /* Toggle Switch Styles */
        .toggle-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
            cursor: pointer;
        }

        .toggle-item:last-child {
            margin-bottom: 0;
        }

        .toggle-label {
            font-size: 14px;
            color: #333;
            flex: 1;
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 24px;
            background-color: #ccc;
            border-radius: 24px;
            transition: background-color 0.3s;
            margin-left: 12px;
        }

        .toggle-switch-input {
            display: none;
        }

        .toggle-slider {
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background-color: white;
            border-radius: 50%;
            transition: transform 0.3s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .toggle-switch-input:checked + .toggle-switch {
            background-color: #C5A95E;
        }

        .toggle-switch-input:checked + .toggle-switch .toggle-slider {
            transform: translateX(24px);
        }

        /* Regular Checkbox Styles */
        .checkbox-item {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            cursor: pointer;
        }
        
        @media (max-width: 1260px) {
            .checkbox-item {
                margin-bottom: 10px;
            }
        }

        .checkbox-item input[type="checkbox"] {
            display: none;
        }

        .checkbox-custom {
            width: 20px;
            height: 20px;
            border: 2px solid #ddd;
            border-radius: 4px;
            margin-right: 12px;
            position: relative;
            transition: all 0.2s;
        }

        .checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom {
            background: #C5A95E;
            border-color: #C5A95E;
        }

        .checkbox-custom::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 6px;
            width: 6px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
            opacity: 0;
            transition: opacity 0.2s;
        }

        .checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom::after {
            opacity: 1;
        }

        .checkbox-label {
            font-size: 14px;
            color: #333;
        }

        /* Save Search Button */
        .save-search-button {
            margin-left: auto;
            background: white;
            border: 1px solid #C5A95E;
            color: #C5A95E;
            padding: 8px 20px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .save-search-button:hover {
            background: #C5A95E;
            color: white;
        }

        /* Save Search Modal */
        .save-search-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
        }

        .modal-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            max-width: 500px;
            width: 90%;
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 20px;
            color: #333;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #999;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            color: #333;
        }

        .modal-body {
            padding: 20px;
        }

        .modal-body p {
            margin-bottom: 20px;
            color: #666;
        }

        .modal-body input[type="text"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #e0e0e0;
            display: flex;
            justify-content: flex-end;
        }

        .modal-footer .button {
            background: #C5A95E;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }

        .modal-footer .button:hover {
            background: #b39448;
        }

        /* View Toggle */
        .view-toggle {
            display: none; /* Hidden for now - will implement later */
            background: #f5f5f5;
            padding: 4px;
            border-radius: 8px;
            margin-left: 16px;
        }

        .view-button {
            padding: 6px 16px;
            background: transparent;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            color: #666;
        }

        .view-button.active {
            background: white;
            color: #333;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Autocomplete Dropdown */
        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            max-height: 300px;
            overflow-y: auto;
            z-index: 1002;
            display: none;
            margin-top: 4px;
        }

        .autocomplete-dropdown.show {
            display: block;
        }

        .autocomplete-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: background-color 0.2s;
        }

        .autocomplete-item:last-child {
            border-bottom: none;
        }

        .autocomplete-item:hover,
        .autocomplete-item.selected {
            background-color: #f5f5f5;
        }

        .autocomplete-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            color: #666;
        }

        .autocomplete-text {
            flex: 1;
        }

        .autocomplete-label {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }

        .autocomplete-type {
            font-size: 12px;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Responsive dropdown positioning */
        @media (max-width: 1200px) {
            .filter-dropdown {
                position: fixed !important;
                top: 60px !important;
                left: 50% !important;
                transform: translateX(-50%) !important;
                max-width: calc(100vw - 40px);
                width: auto;
                min-width: 320px;
            }
            
            .filter-dropdown.show {
                transform: translateX(-50%) !important;
            }
        }
        
        /* Only apply dropdown scrolling on desktop/tablet, not mobile */
        @media (min-width: 769px) and (max-width: 1200px) {
            .filter-dropdown .dropdown-body {
                max-height: 70vh !important;
                overflow-y: auto !important;
            }
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .search-wrapper {
                padding: 12px 16px;
                margin: 0 8px;
            }

            .search-box-wrapper {
                flex-direction: row !important; /* Force horizontal layout */
                display: flex !important;
                gap: 8px;
            }

            .search-group {
                display: flex !important;
                flex: 1;
                gap: 0;
            }

            .filter-container {
                display: none; /* Hide on mobile */
            }

            .property-type-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .beds-baths-grid {
                grid-template-columns: 1fr;
            }

            .save-search-button,
            .view-toggle {
                display: none;
            }
        }

        /* Sticky Mobile Search Bar */
        .sticky-mobile-search-container {
            display: none;
            position: fixed;
            bottom: -100px; /* Hidden initially */
            left: 0;
            right: 0;
            background: #f8f9fa;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
            z-index: 999998; /* Just below the phone sticky bar */
            transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border-top: 1px solid #e9ecef;
        }

        .sticky-mobile-search-container.visible {
            bottom: 0;
        }
        
        /* Adjust for mobile contact bar if present */
        body.has-mobile-contact-bar .sticky-mobile-search-container.visible {
            bottom: 72px; /* Height of mobile contact bar */
        }

        /* Autocomplete for sticky search bar */
        .sticky-mobile-search-container .autocomplete-dropdown {
            bottom: 100% !important;
            top: auto !important;
            margin-bottom: 8px;
            position: absolute !important;
        }
        
        .sticky-mobile-search-container .autocomplete-dropdown.show {
            transform: translateY(0) !important;
        }
        
        /* Enhanced Mobile Styles */
        @media (max-width: 768px) {
            .sticky-mobile-search-container {
                display: block;
            }
            
            /* Position autocomplete above sticky search */
            .sticky-mobile-search-container .autocomplete-dropdown {
                position: fixed !important;
                bottom: auto !important;
                top: auto !important;
                left: 50% !important;
                transform: translateX(-50%) !important;
                margin-bottom: 0;
            }
            
            /* Calculate position from sticky container */
            .sticky-mobile-search-container.visible .autocomplete-dropdown.show {
                bottom: 80px !important; /* Height of sticky search + padding */
            }
            
            /* Adjust if mobile contact bar is present */
            body.has-mobile-contact-bar .sticky-mobile-search-container .autocomplete-dropdown.show {
                bottom: 152px !important; /* 80px + 72px contact bar */
            }
            .search-wrapper {
                padding: 12px 16px;
                margin: 0 8px;
            }

            .search-box-wrapper {
                margin-bottom: 0;
                gap: 8px;
                display: flex;
                align-items: center;
                flex-direction: row; /* Ensure horizontal layout */
            }

            .search-group {
                display: flex;
                flex: 1;
                gap: 0;
            }

            .search-input-group {
                flex: 1;
                border-radius: 8px 0 0 8px;
                border-right: none;
            }

            .search-input {
                font-size: 16px; /* Prevent zoom on iOS */
                padding: 10px 12px;
            }

            .search-button {
                padding: 10px 16px;
                border-radius: 0 8px 8px 0;
                min-width: auto;
                border: 2px solid #5e7ac5;
                border-left: none;
            }

            .search-button span {
                display: none;
            }

            .search-button svg {
                width: 18px;
                height: 18px;
            }

            .reset-button {
                display: none;
            }

            .mobile-filter-button {
                display: flex;
                flex-shrink: 0;
            }

            .mobile-save-search-button {
                display: flex;
            }

            .filter-container {
                display: none;
            }

            /* Mobile Filter Sections */
            .mobile-filter-section {
                margin-bottom: 24px;
                border-bottom: 1px solid #e0e0e0;
                padding-bottom: 24px;
            }

            .mobile-filter-section:last-child {
                border-bottom: none;
            }

            .mobile-filter-section h3 {
                font-size: 18px;
                font-weight: 600;
                margin-bottom: 16px;
                color: #333;
            }

            /* Mobile dropdowns expand to full width */
            .mobile-filter-content .filter-dropdown,
            .mobile-filter-content .dropdown-body {
                position: static !important;
                width: 100% !important;
                box-shadow: none !important;
                border: none;
                margin-top: 0;
                display: block !important;
                padding: 0;
            }

            .mobile-filter-content .dropdown-body {
                max-height: none;
                display: block !important;
            }

            .mobile-filter-content .range-slider {
                width: 100% !important;
                display: block !important;
            }

            .mobile-filter-content .price-slider-container,
            .mobile-filter-content .sqft-slider-container {
                width: 100% !important;
                display: block !important;
            }

            .property-type-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .option-buttons {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }

            .price-inputs {
                flex-direction: row;
                gap: 8px;
            }

            .price-inputs .price-input {
                flex: 1;
                min-width: 0;
            }

            .price-preset-buttons {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .price-input {
                width: 100%;
            }

            .price-preset {
                width: 100%;
                padding: 10px;
            }

            .checkbox-group {
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;
            }

            /* Hide view buttons on mobile */
            .view-container {
                display: none;
            }

            /* Autocomplete dropdown on mobile */
            .autocomplete-dropdown {
                border-radius: 8px;
                margin-top: 8px;
                min-width: 300px !important;
                width: calc(100vw - 32px) !important;
                max-width: 400px !important;
            }
            
            .autocomplete-dropdown.show {
                left: 50% !important;
                transform: translateX(-50%) !important;
                position: fixed !important;
            }
            
            .autocomplete-item {
                padding: 10px 12px;
                gap: 8px;
            }
            
            .autocomplete-icon {
                width: 16px !important;
                height: 16px !important;
                flex-shrink: 0;
            }
            
            .autocomplete-icon svg {
                width: 16px;
                height: 16px;
            }
            
            .autocomplete-label {
                font-size: 13px !important;
            }
            
            .autocomplete-type {
                font-size: 10px !important;
                letter-spacing: 0.3px;
            }
        }
        
        /* Even smaller screens */
        @media (max-width: 480px) {
            .autocomplete-dropdown {
                min-width: 280px !important;
                width: calc(100vw - 24px) !important;
            }
            
            .autocomplete-item {
                padding: 8px 10px;
                gap: 6px;
            }
            
            .autocomplete-label {
                font-size: 12px !important;
            }

            /* Prevent body scroll when filter overlay is open */
            body.mobile-filter-open {
                overflow: hidden;
                position: fixed;
                width: 100%;
            }

            /* Remove ALL overflow scrolling in mobile filter overlay - force override everything */
            .mobile-filter-overlay .property-type-grid,
            .mobile-filter-overlay .option-group,
            .mobile-filter-overlay .checkbox-group,
            .mobile-filter-overlay .dropdown-body,
            .mobile-filter-overlay .filter-dropdown .dropdown-body,
            .mobile-filter-overlay .mobile-filter-content .dropdown-body,
            #mobileFilterContent .property-type-grid,
            #mobileFilterContent .option-group,
            #mobileFilterContent .checkbox-group,
            #mobileFilterContent .dropdown-body,
            #mobileFilterContent .filter-dropdown .dropdown-body,
            #mobileFilterContent .mobile-filter-content .dropdown-body {
                max-height: none !important;
                overflow-y: visible !important;
                overflow-x: visible !important;
                overflow: visible !important;
            }
            
            /* Property type grid on mobile - 3 columns */
            .mobile-filter-overlay .property-type-grid,
            #mobileFilterContent .property-type-grid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 8px;
            }

            .property-type-item {
                padding: 8px 4px;
                min-height: 75px;
            }

            .property-type-icon {
                font-size: 24px;
                margin-bottom: 4px;
            }

            .property-type-label {
                font-size: 11px;
            }
        }