/* Extracted from student/search.php (search page styles) */

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: pan-y;
}


/* Better touch targets */
button, a, input, select, .form-check-input {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(78, 115, 223, 0.2);
}

.modern-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1001;
    padding: 0.25rem 0 !important;
    min-height: 48px;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1rem;
    color: #4e73df !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem !important;
}

.navbar-brand i {
    font-size: 1.2rem;
}

.nav-link {
    font-weight: 500;
    color: #5a5c69 !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.4rem 0.75rem !important;
    margin: 0 0.15rem;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: #4e73df !important;
    background: rgba(78, 115, 223, 0.1);
    transform: translateY(-2px);
}

.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0 !important;
}

.card-header h6 {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

.modern-form-control {
    border: 2px solid #e3e6f0;
    border-radius: 15px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.modern-form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
    background: white;
}

.modern-btn {
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.modern-btn-primary {
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: white;
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.3);
    background: linear-gradient(135deg, #224abe, #4e73df);
}

.modern-btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.modern-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #1e7e34, #28a745);
}

.modern-btn-outline {
    border: 2px solid #4e73df;
    color: #4e73df;
    background: transparent;
}

.modern-btn-outline:hover {
    background: #4e73df;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.3);
}

.house-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(78, 115, 223, 0.1);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(78, 115, 223, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.house-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4e73df, #764ba2, #4e73df);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.house-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(78, 115, 223, 0.2);
    border-color: rgba(78, 115, 223, 0.3);
}

.house-card:hover::before {
    opacity: 1;
    animation: shimmer 2s infinite;
}

.house-card-image-container {
    flex-shrink: 0;
    width: 140px;
    min-width: 140px;
    height: 140px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.house-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 0;
}

/* Logo fallback when image fails to load */
.house-card .card-img-top[data-fallback="logo"] {
    object-fit: contain;
    opacity: 0.3;
    padding: 20px;
}

.house-card:hover .card-img-top {
    transform: scale(1.05);
}

.house-card-image-container:hover {
    opacity: 0.9;
}

.house-card-image-container::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.5rem;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.house-card-image-container:hover::after {
    opacity: 1;
}

/* Photo Modal Styles */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.photo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.photo-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.photo-modal-nav.prev {
    left: 20px;
}

.photo-modal-nav.next {
    right: 20px;
}

.photo-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10001;
}

.photo-modal-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-carousel img {
    display: none;
}

.photo-modal-carousel img.active {
    display: block;
}

        /* Contact Landlord Modal */
        .contact-modal {
            display: none;
            position: fixed;
            z-index: 10000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            animation: fadeIn 0.3s ease;
        }

        .contact-modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .contact-modal-overlay {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
        }

        .contact-modal-content {
            position: relative;
            background: white;
            border-radius: 16px;
            max-width: 400px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            z-index: 10001;
        }

        .contact-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.25rem;
            border-bottom: 1px solid #e5e7eb;
        }

        .contact-modal-header h5 {
            margin: 0;
            font-size: 1.25rem;
            font-weight: 600;
            color: #1f2937;
        }

        .contact-modal-close {
            font-size: 28px;
            font-weight: bold;
            color: #6b7280;
            cursor: pointer;
            line-height: 1;
            transition: color 0.2s;
        }

        .contact-modal-close:hover {
            color: #1f2937;
        }

        .contact-modal-body {
            padding: 1.5rem;
        }

        .contact-options {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .contact-option-btn {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.25rem;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            background: white;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
        }

        .contact-option-btn:hover {
            border-color: #4e73df;
            background: #f8f9fa;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(78, 115, 223, 0.15);
        }

        .contact-option-btn i {
            font-size: 2rem;
            color: #4e73df;
        }

        .contact-option-btn div {
            flex: 1;
        }

        .contact-option-btn strong {
            display: block;
            font-size: 1.1rem;
            color: #1f2937;
            margin-bottom: 0.25rem;
        }

        .contact-option-btn small {
            display: block;
            font-size: 0.9rem;
            color: #6b7280;
        }

        .contact-option-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* Institution Group Headers */
        .institution-group-header {
            margin-top: 1.5rem;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid #4e73df;
        }
        
        .institution-group-header:first-child {
            margin-top: 0;
        }
        
        .institution-group-header h5 {
            color: #4e73df;
            font-weight: 600;
            margin-bottom: 0;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .institution-group-header h5 i {
            margin-right: 0.5rem;
        }
        
        .institution-group-header h5 small {
            font-size: 0.85rem;
            font-weight: 400;
            color: #6c757d;
            margin-left: 0.5rem;
        }
        
        @media (max-width: 768px) {
            .institution-group-header {
                margin-top: 1rem;
                margin-bottom: 0.75rem;
                padding-bottom: 0.5rem;
            }
            
            .institution-group-header h5 {
                font-size: 1rem;
            }
            
            .institution-group-header h5 small {
                font-size: 0.75rem;
                display: block;
                margin-left: 0;
                margin-top: 0.25rem;
            }
        }

        .house-card .card-body {
            padding: 0.75rem 1rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-width: 0;
        }

        .house-card .card-title {
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 0.25rem;
            font-size: 1rem;
            line-height: 1.3;
        }

        .house-card .card-text {
            color: #6c757d;
            line-height: 1.4;
            font-size: 0.875rem;
            margin-bottom: 0.25rem;
        }
        
        .house-card-info-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 0.25rem;
        }
        
        .house-card-badges {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 0.5rem;
        }

        .modern-badge {
            border-radius: 12px;
            padding: 0.3rem 0.6rem;
            font-weight: 600;
            font-size: 0.75rem;
            transition: all 0.3s ease;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        
        /* Compact badges for house cards */
        .house-card .badge {
            font-size: 0.75rem;
            padding: 0.3rem 0.6rem;
            border-radius: 8px;
        }
        
        .modern-badge.bg-info {
            background: linear-gradient(135deg, #17a2b8, #138496) !important;
            color: white;
        }
        
        .modern-badge.bg-success {
            background: linear-gradient(135deg, #28a745, #20c997) !important;
            color: white;
        }
        
        .modern-badge.bg-danger {
            background: linear-gradient(135deg, #dc3545, #c82333) !important;
            color: white;
        }
        
        .modern-badge:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .modern-select {
            border: 2px solid #e3e6f0;
            border-radius: 15px;
            padding: 0.75rem 1rem;
            background: rgba(255, 255, 255, 0.9);
            transition: all 0.3s ease;
        }

        .modern-select:focus {
            border-color: #4e73df;
            box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
        }

        .list-group-item {
            background: rgba(255, 255, 255, 0.9);
            border: none;
            border-radius: 15px;
            margin-bottom: 0.5rem;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .list-group-item:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateX(5px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .loading-skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 15px;
        }
        
        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .loading-card {
            min-height: 100px;
            border-radius: 20px;
        }

        .loading-text {
            height: 1em;
            margin-bottom: 0.5em;
            border-radius: 10px;
        }

        .loading-text.title {
            width: 70%;
            height: 1.2em;
        }

        .loading-text.address {
            width: 90%;
        }

        .loading-text.short {
            width: 40%;
        }

        .animate-pulse {
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        #searchMap {
            transition: opacity 0.3s ease;
            border-radius: 20px;
            overflow: hidden;
        }

        #searchMap.loading {
            opacity: 0.6;
        }

        .house-card {
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateY(10px);
        }

        .house-card.loaded {
            opacity: 1;
            transform: translateY(0);
        }

        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255,255,255,0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            transition: opacity 0.3s ease;
            border-radius: 20px;
        }

        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #4e73df;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .error-state {
            padding: 2rem;
            text-align: center;
            color: #721c24;
            background: linear-gradient(135deg, #f8d7da, #f5c6cb);
            border: none;
            border-radius: 20px;
            margin: 1rem 0;
            backdrop-filter: blur(10px);
        }

        .retry-button {
            margin-top: 1rem;
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 15px;
            background: linear-gradient(135deg, #dc3545, #c82333);
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .retry-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
        }

        .alert {
            border: none;
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }

        .alert-info {
            background: linear-gradient(135deg, #d1ecf1, #bee5eb);
            color: #0c5460;
        }

        .modern-footer {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            margin-top: 3rem;
        }

        .modern-footer a {
            color: #4e73df;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .modern-footer a:hover {
            color: #224abe;
            text-decoration: underline;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .modern-card {
                margin-bottom: 0.75rem;
            }
            
            .house-card {
                flex-direction: column;
            }
            
            .house-card-image-container {
                width: 100%;
                min-width: 100%;
                height: 180px;
            }
            
            .house-card .card-body {
                padding: 0.75rem;
            }
            
            .modern-btn {
                padding: 0.5rem 1rem;
                font-size: 0.9rem;
            }
        }

        /* Bottom Sheet Styles (Yango-style) */
        body.search-page-with-sheet {
            overflow: hidden;
            height: 100vh;
            height: 100dvh;
            height: -webkit-fill-available; /* iOS Safari */
            /* DON'T use position: fixed - causes layout shifts and glitching */
            width: 100%;
            /* Allow touch actions on scrollable areas */
            touch-action: pan-y pinch-zoom;
            /* Prevent layout shifts without position fixed */
            position: relative;
        }
        
        html.search-page-with-sheet {
            height: 100vh;
            height: 100dvh;
            height: -webkit-fill-available; /* iOS Safari */
            overflow: hidden;
            /* Prevent scroll without position fixed */
            position: relative;
        }

        /* Full-screen Map */
        #searchMap {
            width: 100vw !important;
            width: 100dvw; /* Dynamic viewport width */
            height: 100vh !important;
            height: 100dvh; /* Dynamic viewport height - better for mobile */
            height: -webkit-fill-available; /* iOS Safari fallback */
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            z-index: 1 !important;
            border-radius: 0 !important;
            /* Enable one-finger panning and pinch zoom */
            touch-action: pan-x pan-y pinch-zoom;
            /* Ensure map receives all touch events */
            pointer-events: auto;
            /* Prevent text selection during panning */
            user-select: none;
            -webkit-user-select: none;
            -webkit-touch-callout: none;
            /* Prevent page zoom when pinching map */
            -ms-touch-action: pan-x pan-y pinch-zoom;
        }
        
        /* Ensure map container and all children don't trigger page zoom */
        #searchMap > div,
        #searchMap > div > div,
        #searchMap * {
            touch-action: pan-x pan-y pinch-zoom !important;
            -ms-touch-action: pan-x pan-y pinch-zoom !important;
        }
        
        /* Prevent double-tap zoom on map */
        #searchMap {
            -ms-touch-action: pan-x pan-y pinch-zoom;
        }
        

        /* Top Bar with Enhanced Glassmorphism - Floating & Subtle */
        .search-top-bar {
            position: fixed;
            top: 52px; /* Below compact navbar */
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 24px);
            max-width: 500px;
            background: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            padding: 4px 8px;
            z-index: 1000;
            box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            transition: all 0.3s ease;
            pointer-events: auto;
        }
        
        .search-top-bar:hover {
            background: rgba(255, 255, 255, 0.88);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
        }
        
        /* Remove the shimmer animation for subtlety */
        
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        .search-top-bar-content {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }
        
        .search-top-bar .btn-light {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(78, 115, 223, 0.15);
            border-radius: 8px;
            transition: all 0.2s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            width: 28px;
            height: 28px;
            min-width: 28px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.75rem;
        }
        
        .search-top-bar .btn-light:hover {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(78, 115, 223, 0.25);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
            transform: scale(1.05);
        }

        .search-top-bar .location-search-wrapper {
            flex: 1;
            min-width: 0;
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .search-top-bar .location-search-wrapper input {
            flex: 1;
            min-width: 0;
            border-radius: 10px;
            border: 1px solid rgba(78, 115, 223, 0.15);
            padding: 0.3rem 0.5rem;
            background: rgba(255, 255, 255, 0.9);
            font-size: 0.8rem;
            transition: all 0.2s ease;
            height: 28px;
        }
        
        .search-top-bar .location-search-wrapper input:focus {
            border-color: rgba(78, 115, 223, 0.3);
            background: rgba(255, 255, 255, 1);
            box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.08);
            outline: none;
        }

        .search-top-bar .location-search-wrapper button[type="submit"] {
            height: 28px;
            min-width: 28px;
            padding: 0 0.5rem;
            border-radius: 10px;
            background: linear-gradient(135deg, #4e73df, #224abe);
            border: none;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }

        .search-top-bar .location-search-wrapper button[type="submit"]:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3);
        }

        /* Bottom Sheet with Enhanced Glassmorphism */
        .search-bottom-sheet {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border-radius: 24px 24px 0 0;
            box-shadow: 0 -8px 40px rgba(78, 115, 223, 0.2);
            z-index: 1000;
            transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-radius 0.3s ease;
            height: 100vh;
            height: 100dvh; /* Dynamic viewport height - full screen */
            max-height: 100vh;
            max-height: 100dvh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border-top: 3px solid transparent;
            border-image: linear-gradient(90deg, #4e73df, #764ba2, #4e73df) 1;
            /* Prevent glitching */
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        .search-bottom-sheet.collapsed {
            transform: translate3d(0, calc(100% - 80px), 0);
            border-radius: 20px 20px 0 0;
            /* Allow map touches to pass through when collapsed */
            pointer-events: none;
        }
        
        /* Re-enable pointer events for interactive elements in collapsed sheet */
        .search-bottom-sheet.collapsed .search-bottom-sheet-handle,
        .search-bottom-sheet.collapsed .toggle-sheet-btn {
            pointer-events: auto;
        }

        .search-bottom-sheet.half-expanded {
            transform: translate3d(0, calc(100% - 50vh), 0);
            transform: translate3d(0, calc(100% - 50dvh), 0);
            border-radius: 24px 24px 0 0;
        }

        .search-bottom-sheet.full-expanded {
            transform: translate3d(0, 0, 0);
            /* Rounded top corners to show UI behind */
            border-radius: 24px 24px 0 0;
            /* Enhanced shadow to hint at content behind */
            box-shadow: 0 -8px 50px rgba(78, 115, 223, 0.3), 0 0 0 1px rgba(78, 115, 223, 0.1) inset;
        }

        .search-bottom-sheet-handle {
            width: 40px;
            height: 4px;
            background: linear-gradient(90deg, rgba(78, 115, 223, 0.6), rgba(118, 75, 162, 0.6), rgba(78, 115, 223, 0.6));
            background-size: 200% 100%;
            border-radius: 8px;
            margin: 10px auto 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
            user-select: none;
            -webkit-user-select: none;
            box-shadow: 0 1px 4px rgba(78, 115, 223, 0.2);
            position: relative;
            /* Increase touch target area */
            padding: 10px 0;
            margin-top: 6px;
            margin-bottom: 6px;
        }
        
        /* Invisible larger touch area */
        .search-bottom-sheet-handle::before {
            content: '';
            position: absolute;
            top: -10px;
            left: -15px;
            right: -15px;
            bottom: -10px;
        }

        .search-bottom-sheet-handle:hover {
            transform: scaleX(1.1);
            box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3);
            height: 4px;
            background: linear-gradient(90deg, rgba(78, 115, 223, 0.8), rgba(118, 75, 162, 0.8), rgba(78, 115, 223, 0.8));
        }

        .search-bottom-sheet-handle:active {
            transform: scaleX(1.05);
            height: 4px;
            opacity: 0.9;
        }

        .search-bottom-sheet-header {
            padding: 0 16px 8px;
            border-bottom: 1px solid rgba(78, 115, 223, 0.08);
            flex-shrink: 0;
            touch-action: pan-y;
            background: linear-gradient(135deg, rgba(78, 115, 223, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
        }
        
        .search-bottom-sheet-header h5 {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
            font-size: 0.95rem;
            letter-spacing: -0.3px;
            margin-bottom: 0.25rem;
        }
        
        .search-bottom-sheet-header small {
            font-size: 0.7rem;
            opacity: 0.7;
        }

        .search-bottom-sheet-content {
            flex: 1 1 0%;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            padding: 12px 16px;
            /* CRITICAL: Prevent scroll chaining - this is the key fix */
            overscroll-behavior: contain !important;
            overscroll-behavior-y: contain !important;
            overscroll-behavior-x: none !important;
            -webkit-overscroll-behavior: contain !important;
            -webkit-overscroll-behavior-y: contain !important;
            -webkit-overscroll-behavior-x: none !important;
            touch-action: pan-y;
            scroll-behavior: smooth;
            min-height: 0;
            max-height: 100%;
            -ms-overflow-style: -ms-autohiding-scrollbar;
            position: relative;
            /* Prevent glitching - use will-change only when needed */
            scrollbar-width: thin;
            scrollbar-color: #d1d5db transparent;
            /* Force hardware acceleration for smooth scrolling */
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }
        
        /* Only apply expensive properties when scrolling */
        .search-bottom-sheet-content:active {
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }
        
        /* Prevent body scroll when bottom sheet is active */
        /* Duplicate removed - using consolidated styles above */
        
        body.search-page-with-sheet .search-bottom-sheet-content {
            touch-action: pan-y;
            /* Smooth scrolling */
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }
        
        /* Prevent glitching during transitions */
        .search-bottom-sheet.dragging * {
            pointer-events: none;
        }
        
        .search-bottom-sheet.dragging .search-bottom-sheet-handle {
            pointer-events: auto;
        }

        .search-bottom-sheet-content::-webkit-scrollbar {
            width: 6px;
        }

        .search-bottom-sheet-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .search-bottom-sheet-content::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 3px;
        }

        .search-bottom-sheet-content::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }
        
        /* Enhanced Section Headers - Compact */
        .search-bottom-sheet-content h6 {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
            padding-bottom: 0.25rem;
            border-bottom: 1px solid rgba(78, 115, 223, 0.08);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .search-bottom-sheet-content h6 i {
            color: #4e73df;
            font-size: 1rem;
        }
        
        /* Enhanced List Group Items - Compact */
        .list-group-item {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
            border: 1px solid rgba(78, 115, 223, 0.08);
            border-radius: 10px;
            margin-bottom: 0.5rem;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            padding: 0.75rem;
        }

        .list-group-item:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateX(5px);
            box-shadow: 0 4px 15px rgba(78, 115, 223, 0.15);
            border-color: rgba(78, 115, 223, 0.3);
        }

        /* Hide traditional layout when bottom sheet is active */
        body.search-page-with-sheet .container-fluid > .row:not(.premium-lists-row),
        body.search-page-with-sheet .container-fluid > .row > .col-lg-8,
        body.search-page-with-sheet .container-fluid > .row > .col-lg-4 {
            display: none !important;
        }

        /* Hide fixed premium lists row when bottom sheet is active (they're in bottom sheet header now) */
        body.search-page-with-sheet .premium-lists-row {
            display: none !important;
        }

        /* Show premium lists above map (fallback for non-bottom-sheet mode) */
        .premium-lists-row {
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            z-index: 999;
            padding: 0 16px;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }

        /* Toggle button for bottom sheet */
        .toggle-sheet-btn {
            position: fixed;
            bottom: 140px;
            right: 20px;
            z-index: 1001;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 2px solid rgba(78, 115, 223, 0.2);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            color: #4e73df;
            /* Ensure button always receives touches */
            pointer-events: auto;
            touch-action: manipulation;
        }
        
        .toggle-sheet-btn:hover {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(78, 115, 223, 0.4);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
            transform: translateY(-2px);
        }
        
        .toggle-sheet-btn:active {
            transform: translateY(0);
        }
        
        .toggle-sheet-btn i {
            font-size: 20px;
            transition: transform 0.3s ease;
        }
        
        /* Arrow rotation based on state */
        .toggle-sheet-btn.collapsed i {
            transform: rotate(0deg);
        }
        
        .toggle-sheet-btn.expanded i {
            transform: rotate(180deg);
        }
        
        /* Satellite view toggle button - Modern pill style */
        .satellite-toggle-btn {
            position: fixed;
            top: 88px;
            right: 12px;
            z-index: 1002;
            height: 28px;
            padding: 0 10px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(78, 115, 223, 0.15);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #4e73df;
            pointer-events: auto;
            touch-action: manipulation;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .satellite-toggle-btn:hover {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(78, 115, 223, 0.3);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
            transform: translateY(-1px);
        }
        
        .satellite-toggle-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        
        .satellite-toggle-btn.active {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            color: white;
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 10px rgba(78, 115, 223, 0.3);
        }
        
        .satellite-toggle-btn.active:hover {
            background: linear-gradient(135deg, #764ba2, #4e73df);
            box-shadow: 0 3px 12px rgba(78, 115, 223, 0.4);
        }
        
        .satellite-toggle-btn i {
            font-size: 14px;
            line-height: 1;
        }
        
        .satellite-toggle-btn span {
            font-size: 0.7rem;
            letter-spacing: 0.3px;
        }
        
        /* View List button - Modern pill style (left side) */
        .view-list-btn {
            position: fixed;
            top: 88px;
            left: 12px;
            z-index: 1002;
            height: 28px;
            padding: 0 10px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(78, 115, 223, 0.15);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #4e73df;
            pointer-events: auto;
            touch-action: manipulation;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .view-list-btn:hover {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(78, 115, 223, 0.3);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
            transform: translateY(-1px);
        }
        
        .view-list-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        }
        
        .view-list-btn.active {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            color: white;
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 10px rgba(78, 115, 223, 0.3);
        }
        
        .view-list-btn.active:hover {
            background: linear-gradient(135deg, #764ba2, #4e73df);
            box-shadow: 0 3px 12px rgba(78, 115, 223, 0.4);
        }
        
        .view-list-btn i {
            font-size: 14px;
            line-height: 1;
        }
        
        .view-list-btn span {
            font-size: 0.7rem;
            letter-spacing: 0.3px;
        }

        /* Reduce backdrop-filter on mobile for better performance */
        @media (max-width: 768px) {
            .search-top-bar,
            .search-bottom-sheet {
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
            }
            
            /* Disable expensive effects on low-end devices */
            @media (prefers-reduced-motion: reduce) {
                .search-bottom-sheet,
                .search-bottom-sheet-handle,
                .house-card {
                    transition: none;
                    animation: none;
                }
            }
        }

        /* Floating Filter Panel */
        .floating-filter-panel {
            position: fixed;
            top: 90px; /* Below compact search bar */
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 24px);
            max-width: 500px;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            padding: 8px 10px;
            z-index: 999;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
            border-radius: 10px;
            opacity: 0;
            visibility: hidden;
            transform: translateX(-50%) translateY(-10px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }
        
        .floating-filter-panel.active {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
            pointer-events: auto;
        }
        
        .floating-filter-content {
            display: flex;
            flex-direction: column;
        }
        
        .floating-filter-content .form-label {
            font-size: 0.75rem;
            margin-bottom: 0.25rem;
        }
        
        .floating-filter-panel .form-control-sm {
            font-size: 0.8rem;
            padding: 0.35rem 0.5rem;
            border: 1px solid rgba(78, 115, 223, 0.15);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.95);
            height: 32px;
        }
        
        .floating-filter-panel .form-control-sm:focus {
            border-color: rgba(78, 115, 223, 0.3);
            box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.08);
            outline: none;
        }
        
        .floating-filter-panel .btn-primary {
            height: 32px;
            padding: 0.35rem 0.6rem;
            font-size: 0.8rem;
            border-radius: 6px;
        }
        
        .floating-filter-panel .btn-close {
            opacity: 0.5;
            transition: opacity 0.2s ease;
            font-size: 0.75rem;
            padding: 0.25rem;
        }
        
        .floating-filter-panel .btn-close:hover {
            opacity: 0.8;
        }
        
        .floating-filter-panel .d-flex.justify-content-between {
            margin-bottom: 0.5rem;
        }
        
        .floating-filter-panel .d-flex.gap-2 {
            gap: 0.5rem !important;
        }

        /* Responsive Improvements */
        @media (max-width: 768px) {
            /* Top Bar Mobile */
            .search-top-bar {
                top: 48px;
                width: calc(100% - 16px);
                padding: 4px 8px;
                gap: 4px;
                max-width: none;
            }
            
            .floating-filter-panel {
                top: 88px;
                width: calc(100% - 16px);
                padding: 8px;
                max-width: none;
            }
            
            .search-top-bar .location-search-wrapper input {
                font-size: 16px; /* Prevents iOS zoom */
                height: 28px;
            }
            
            .search-top-bar .btn-light {
                width: 28px;
                height: 28px;
                min-width: 28px;
            }
            
            .modern-navbar {
                min-height: 44px;
                padding: 0.2rem 0 !important;
            }
            
            .navbar-brand {
                font-size: 0.9rem;
                padding: 0.4rem 0.5rem !important;
            }
            
            .search-bottom-sheet.collapsed {
                transform: translate3d(0, calc(100% - 70px), 0);
            }
            
            .search-bottom-sheet-handle {
                width: 35px;
                height: 3px;
                margin: 8px auto 6px;
            }

            .search-top-bar-content {
                width: 100%;
            }
            
            .search-top-bar .location-search-wrapper {
                min-width: 0;
                flex: 1;
                gap: 0.4rem;
            }
            
            .search-top-bar .btn-light {
                width: 28px;
                height: 28px;
                min-width: 28px;
            }
            
            .search-top-bar .location-search-wrapper input {
                font-size: 0.875rem;
                padding: 0.4rem 0.6rem;
            }

            .search-top-bar .location-search-wrapper button[type="submit"] {
                height: 28px;
                min-width: 28px;
                padding: 0 0.4rem;
            }
            
            .floating-filter-panel form {
                flex-direction: column;
                gap: 8px;
            }
            
            .floating-filter-panel .flex-fill {
                width: 100%;
            }

            /* Bottom Sheet Mobile */
            .search-bottom-sheet {
                height: 100vh;
                height: 100dvh; /* Dynamic viewport height - full screen */
                max-height: 100vh;
                max-height: 100dvh;
            }
            
            .search-bottom-sheet.collapsed {
                transform: translate3d(0, calc(100% - 120px), 0);
                border-radius: 24px 24px 0 0;
                /* Allow map touches to pass through when collapsed on mobile */
                pointer-events: none;
            }
            
            /* Re-enable pointer events for interactive elements in collapsed sheet on mobile */
            .search-bottom-sheet.collapsed .search-bottom-sheet-handle,
            .search-bottom-sheet.collapsed .toggle-sheet-btn {
                pointer-events: auto;
            }
            
            .search-bottom-sheet.half-expanded {
                transform: translate3d(0, calc(100% - 50vh), 0);
                transform: translate3d(0, calc(100% - 50dvh), 0);
                border-radius: 24px 24px 0 0;
            }
            
            .search-bottom-sheet.full-expanded {
                border-radius: 24px 24px 0 0;
            }
            
            .search-bottom-sheet-handle {
                width: 70px;
                height: 7px;
                margin: 16px auto 14px;
                cursor: pointer;
            }
            
            .search-bottom-sheet-header {
                padding: 0 12px 6px;
            }
            
            .search-bottom-sheet-content {
                padding: 10px 12px;
            }
            
            .search-bottom-sheet-header h5 {
                font-size: 0.85rem;
            }

            /* Premium Lists Mobile */
            .premium-lists-row {
                top: auto;
                bottom: 140px;
                max-height: 40vh;
                padding: 0 12px;
                position: fixed;
                left: 0;
                right: 0;
            }
            
            .premium-lists-row .card-body {
                padding: 12px !important;
            }
            
            .premium-lists-row .col-md-6 {
                margin-bottom: 8px;
            }

            /* Toggle Button Mobile */
            .toggle-sheet-btn {
                width: 40px;
                height: 40px;
                bottom: 130px;
                right: 16px;
            }
            
            .toggle-sheet-btn i {
                font-size: 18px;
            }
            
            /* Satellite Toggle Button Mobile */
            .satellite-toggle-btn {
                height: 26px;
                padding: 0 8px;
                top: 84px;
                right: 8px;
                border-radius: 13px;
                gap: 4px;
            }
            
            .satellite-toggle-btn i {
                font-size: 12px;
            }
            
            .satellite-toggle-btn span {
                font-size: 0.65rem;
            }
            
            /* View List Button Mobile */
            .view-list-btn {
                height: 26px;
                padding: 0 8px;
                top: 84px;
                left: 8px;
                border-radius: 13px;
                gap: 4px;
            }
            
            .view-list-btn i {
                font-size: 12px;
            }
            
            .view-list-btn span {
                font-size: 0.65rem;
            }

            /* House Cards Mobile */
            .house-card {
                margin-bottom: 0.75rem;
                flex-direction: column;
            }
            
            .house-card-image-container {
                width: 100% !important;
                min-width: 100% !important;
                height: 180px;
            }
            
            .house-card .card-body {
                padding: 0.75rem !important;
            }
            
            .house-card .card-title {
                font-size: 0.95rem;
            }
            
            .house-card-badges {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.25rem;
            }
            
            /* Form Controls Mobile */
            .modern-select,
            .search-bottom-sheet-content select {
                font-size: 16px; /* Prevents zoom on iOS */
                padding: 0.875rem 1rem;
            }
            
            .search-bottom-sheet-content input[type="text"],
            .search-bottom-sheet-content input[type="number"] {
                font-size: 16px; /* Prevents zoom on iOS */
            }
            
            /* Better touch targets */
            .btn,
            .form-check-input,
            .form-switch {
                min-height: 44px;
                min-width: 44px;
            }
            
            .form-check-label {
                padding-left: 12px;
                min-height: 44px;
                display: flex;
                align-items: center;
            }
            
            /* Compact switch styling for smaller switches */
            .compact-switch {
                min-height: auto !important;
                margin-bottom: 0.2rem;
            }
            
            .compact-switch .form-check-input {
                width: 1.25rem !important;
                height: 0.7rem !important;
                margin-top: 0.1rem;
                font-size: 0.65rem;
            }
            
            .compact-switch .form-check-label {
                padding-left: 0.4rem !important;
                min-height: auto !important;
                font-size: 0.7rem !important;
                line-height: 1.1;
                padding-top: 0 !important;
            }
            
            .compact-switch .form-check-label i {
                font-size: 0.7rem !important;
                margin-right: 0.2rem;
            }
            
            /* Premium List Cards Mobile */
            .premium-list-card-enhanced {
                margin-bottom: 12px;
            }
            
            .premium-list-card-enhanced .card-body {
                padding: 12px !important;
            }
            
            .premium-subscribe-btn-enhanced {
                width: 100%;
                justify-content: center;
                margin-top: 8px;
                padding: 10px 20px;
            }
        }
        
        /* Extra Small Devices */
        @media (max-width: 576px) {
            .search-top-bar {
                top: 44px;
                padding: 3px 6px;
            }
            
            .floating-filter-panel {
                top: 84px;
                padding: 6px;
            }
            
            .search-bottom-sheet.collapsed {
                transform: translate3d(0, calc(100% - 60px), 0);
            }
            
            .search-bottom-sheet {
                height: 100vh;
                height: 100dvh; /* Full screen */
                max-height: 100vh;
                max-height: 100dvh;
            }
            
            .search-bottom-sheet.full-expanded {
                border-radius: 24px 24px 0 0;
            }
            
            .search-bottom-sheet-content {
                padding: 12px;
            }
            
            .house-card .card-body {
                padding: 0.75rem !important;
            }
            
            .premium-lists-row {
                bottom: 130px;
                max-height: 35vh;
                max-height: 35dvh;
            }
        }
        
        /* Landscape Mobile */
        @media (max-width: 768px) and (orientation: landscape) {
            .search-bottom-sheet {
                height: 100vh;
                height: 100dvh; /* Full screen */
                max-height: 100vh;
                max-height: 100dvh;
            }
            
            .search-bottom-sheet.full-expanded {
                border-radius: 24px 24px 0 0;
            }
            
            .premium-lists-row {
                max-height: 30vh;
                max-height: 30dvh;
            }
        }
        
        /* iOS Safari specific fixes */
        @supports (-webkit-touch-callout: none) {
            body.search-page-with-sheet {
                height: -webkit-fill-available;
            }
            
            #searchMap {
                height: -webkit-fill-available;
            }
            
            .search-bottom-sheet {
                height: 100vh;
                height: 100dvh;
                height: -webkit-fill-available; /* iOS Safari fallback */
                max-height: 100vh;
                max-height: 100dvh;
                max-height: -webkit-fill-available;
            }
            
            .search-bottom-sheet.full-expanded {
                border-radius: 24px 24px 0 0;
            }
        }
        
        /* Prevent layout shift on mobile */
        @media (max-width: 768px) {
            * {
                -webkit-tap-highlight-color: transparent;
            }
            
            /* Reduce animations on mobile for better performance */
            .house-card:hover {
                transform: translateY(-4px) scale(1.01);
            }
            
            /* Simplify transitions */
            .search-bottom-sheet {
                transition: transform 0.25s ease-out;
            }
        }
        
        /* Enhanced Premium List Cards */
        .premium-list-card-enhanced {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(78, 115, 223, 0.2);
            border-radius: 16px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(78, 115, 223, 0.1);
        }
        
        /* Premium House Cards */
        .premium-house-card {
            border: 2px solid rgba(255, 193, 7, 0.3) !important;
            background: linear-gradient(135deg, rgba(255, 248, 220, 0.3) 0%, rgba(255, 255, 255, 0.98) 100%);
        }
        
        .premium-house-card:hover {
            border-color: rgba(255, 193, 7, 0.6) !important;
            box-shadow: 0 15px 40px rgba(255, 193, 7, 0.2);
        }
        
        .premium-house-card::before {
            background: linear-gradient(90deg, #ffc107, #ff9800, #ffc107) !important;
        }
        
        .premium-list-card-enhanced::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(180deg, #4e73df, #764ba2);
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .premium-list-card-enhanced:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 25px rgba(78, 115, 223, 0.25);
            border-color: rgba(78, 115, 223, 0.4);
        }
        
        .premium-list-card-enhanced:hover::before {
            opacity: 1;
        }
        
        .premium-list-card-enhanced.subscribed {
            background: linear-gradient(135deg, rgba(40, 167, 69, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
            border-color: rgba(40, 167, 69, 0.3);
        }
        
        .premium-list-card-enhanced.subscribed::before {
            background: linear-gradient(180deg, #28a745, #20c997);
        }
        
        .premium-list-card-enhanced .card-title {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
        }
        
        .premium-subscribe-btn-enhanced {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            border: none;
            color: white;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.875rem;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        
        .premium-subscribe-btn-enhanced:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(78, 115, 223, 0.4);
            background: linear-gradient(135deg, #764ba2, #4e73df);
            color: white;
        }
        
        /* Enhanced Badge */
        .badge-enhanced {
            background: linear-gradient(135deg, #28a745, #20c997);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.75rem;
            box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
            animation: badgePulse 2s infinite;
        }
        
        @keyframes badgePulse {
            0%, 100% { box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3); }
            50% { box-shadow: 0 2px 12px rgba(40, 167, 69, 0.5); }
        }
        
        /* Enhanced Form Controls */
        .search-top-bar input,
        .search-top-bar select {
            border: 2px solid rgba(78, 115, 223, 0.2);
            border-radius: 12px;
            padding: 0.5rem 1rem;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.9);
        }
        
        .search-top-bar input:focus,
        .search-top-bar select:focus {
            border-color: #4e73df;
            box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
            background: white;
            outline: none;
        }
        
        .search-top-bar .btn-primary {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            border: none;
            border-radius: 12px;
            padding: 0.5rem 1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
        }
        
        .search-top-bar .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(78, 115, 223, 0.4);
            background: linear-gradient(135deg, #764ba2, #4e73df);
        }
        
        /* Enhanced Filter Controls */
        .modern-select {
            border: 2px solid rgba(78, 115, 223, 0.2);
            border-radius: 12px;
            padding: 0.75rem 1rem;
            background: rgba(255, 255, 255, 0.9);
            transition: all 0.3s ease;
        }

        .modern-select:focus {
            border-color: #4e73df;
            box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
            background: white;
            outline: none;
        }
        
        /* Enhanced Form Switches */
        .form-check-input:checked {
            background-color: #4e73df;
            border-color: #4e73df;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
        }
        
        .form-check-input:focus {
            border-color: #4e73df;
            outline: 0;
            box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
        }
        
        /* Accordion/Dropdown Styles */
        .list-accordion {
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid rgba(78, 115, 223, 0.1);
            border-radius: 15px;
            margin-bottom: 1rem;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .list-accordion:hover {
            border-color: rgba(78, 115, 223, 0.3);
            box-shadow: 0 4px 15px rgba(78, 115, 223, 0.1);
        }
        
        .list-accordion-header {
            padding: 0.6rem 0.875rem;
            background: linear-gradient(135deg, rgba(78, 115, 223, 0.04) 0%, rgba(118, 75, 162, 0.04) 100%);
            cursor: pointer;
            user-select: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s ease;
            border-bottom: 1px solid transparent;
        }
        
        .list-accordion-header:hover {
            background: linear-gradient(135deg, rgba(78, 115, 223, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
        }
        
        .list-accordion-header.active {
            border-bottom-color: rgba(78, 115, 223, 0.15);
        }
        
        .list-accordion-header h6 {
            margin: 0;
            font-weight: 600;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            background: linear-gradient(135deg, #4e73df, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .list-accordion-header .accordion-icon {
            transition: transform 0.3s ease;
            color: #4e73df;
            font-size: 1rem;
        }
        
        .list-accordion-header.active .accordion-icon {
            transform: rotate(180deg);
        }
        
        .list-accordion-header .badge-count {
            background: linear-gradient(135deg, #4e73df, #764ba2);
            color: white;
            padding: 0.2rem 0.5rem;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
            margin-left: auto;
            margin-right: 0.4rem;
        }
        
        .list-accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
            padding: 0 0.875rem;
        }
        
        .list-accordion-content.active {
            max-height: 500px;
            padding: 0.6rem 0.875rem;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        
        .list-accordion-content::-webkit-scrollbar {
            width: 6px;
        }
        
        .list-accordion-content::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .list-accordion-content::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 3px;
        }
        
        .list-accordion-content::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }
        
        /* Premium Lists Accordion Specific */
        .premium-lists-accordion .list-accordion-header {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
        }
        
        .premium-lists-accordion .list-accordion-header:hover {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
        }
        
        .premium-lists-accordion .list-accordion-header h6 {
            background: linear-gradient(135deg, #ffc107, #ff9800);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .premium-lists-accordion .list-accordion-header .badge-count {
            background: linear-gradient(135deg, #ffc107, #ff9800);
        }
        
        /* Mobile adjustments */
        @media (max-width: 768px) {
            .list-accordion-content.active {
                max-height: 400px;
            }
            
            .list-accordion-header {
                padding: 0.875rem 1rem;
            }
            
            .list-accordion-content.active {
                padding: 0.875rem 1rem;
            }
        }

        /* Prevent page zoom (allow map pinch-zoom only) */
        html, body {
            touch-action: pan-y; /* Allow vertical scroll on page, but prevent pinch zoom */
            -ms-touch-action: pan-y;
            -webkit-tap-highlight-color: transparent;
        }
        
        /* Allow map gestures (pan and pinch-zoom) */
        #searchMap, #searchMap * {
            touch-action: pan-x pan-y pinch-zoom !important;
        }
        
        /* Allow text selection in inputs and content areas */
        input, textarea, select, .search-bottom-sheet-content, .gm-style-iw {
            -webkit-user-select: text;
            user-select: text;
            touch-action: auto;
        }
        
        /* Prevent text selection zoom on inputs (iOS) */
        input, select, textarea {
            font-size: 16px; /* Prevents iOS zoom on focus */
        }
        
        /* Info window responsive styling */
        .gm-style-iw-c {
            max-width: 85vw !important;
            transition: max-width 0.3s ease, width 0.3s ease;
            padding: 0 !important;
            border-radius: 10px !important;
            overflow: hidden !important;
            box-shadow: 0 2px 12px rgba(0,0,0,0.1) !important;
        }
        
        .gm-style-iw-d {
            overflow: hidden !important;
            max-width: 100% !important;
        }
        
        /* Map info window – hierarchy & minimal space (Map UI Patterns) */
        .mbh-iw-root {
            font-family: 'Nunito', sans-serif;
            background: #fff;
            min-width: 0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        
        .mbh-iw-media {
            border-radius: 8px 8px 0 0;
            overflow: hidden;
            max-height: 100px;
        }
        
        .mbh-iw-media .carousel-inner,
        .mbh-iw-media .carousel-item,
        .mbh-iw-media .carousel-item img {
            max-height: 100px;
            object-fit: cover;
        }
        
        .mbh-iw-media .carousel-control-prev,
        .mbh-iw-media .carousel-control-next {
            width: 22px;
            height: 22px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.8;
            border-radius: 50%;
            background: rgba(0,0,0,0.4);
        }
        
        .mbh-iw-media .carousel-control-prev { left: 4px; }
        .mbh-iw-media .carousel-control-next { right: 4px; }
        
        .mbh-iw-body {
            padding: 6px 8px 8px;
        }
        
        .mbh-iw-header {
            margin-bottom: 3px;
        }
        
        .mbh-iw-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: #374151;
            margin: 0;
            line-height: 1.25;
        }
        
        .mbh-iw-badge-premium {
            display: inline-block;
            font-size: 0.6rem;
            font-weight: 500;
            color: #92400e;
            background: #fef3c7;
            padding: 1px 4px;
            border-radius: 3px;
            margin-bottom: 3px;
        }
        
        .mbh-iw-meta {
            font-size: 0.7rem;
            color: #6b7280;
            margin-bottom: 4px;
        }
        
        .mbh-iw-line {
            display: flex;
            align-items: flex-start;
            gap: 4px;
            margin-bottom: 1px;
            line-height: 1.25;
        }
        
        .mbh-iw-line i {
            margin-top: 1px;
            width: 10px;
            color: #9ca3af;
            flex-shrink: 0;
            font-size: 0.65rem;
        }
        
        .mbh-iw-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: 4px;
        }
        
        .mbh-iw-badge-price,
        .mbh-iw-badge-availability {
            font-size: 0.65rem;
            font-weight: 500;
            padding: 1px 5px;
            border-radius: 3px;
            background: #f3f4f6;
            color: #4b5563;
        }
        
        .mbh-iw-badge-availability.available {
            color: #047857;
            background: #ecfdf5;
        }
        
        .mbh-iw-badge-availability.full {
            color: #b91c1c;
            background: #fef2f2;
        }
        
        .mbh-iw-description {
            font-size: 0.68rem;
            color: #6b7280;
            margin: 0 0 4px 0;
            line-height: 1.3;
        }
        
        .mbh-iw-alert {
            font-size: 0.68rem;
            color: #92400e;
            background: #fffbeb;
            padding: 3px 5px;
            border-radius: 3px;
            margin-bottom: 4px;
        }
        
        .mbh-iw-actions {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .mbh-iw-action-row {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            align-items: center;
        }
        
        /* Buttons: smaller, clear hierarchy (primary stands out, secondary calm) */
        .mbh-iw-actions .btn {
            font-size: 0.68rem !important;
            font-weight: 500 !important;
            padding: 3px 6px !important;
            min-height: 22px;
            border-radius: 5px;
            border-width: 1px;
            transition: opacity 0.15s ease, box-shadow 0.15s ease;
        }
        
        .mbh-iw-actions .btn:hover {
            opacity: 0.92;
        }
        
        /* Primary CTA: first button in first row (View Rooms / Subscribe / Contact) – stands out */
        .mbh-iw-actions .mbh-iw-action-row:first-child .btn:first-child {
            font-size: 0.72rem !important;
            padding: 4px 8px !important;
            min-height: 24px;
        }
        
        .mbh-iw-actions .btn.btn-primary {
            background: #4e73df;
            border-color: #4e73df;
            color: #fff;
        }
        
        .mbh-iw-actions .btn.btn-success {
            background: #059669;
            border-color: #059669;
            color: #fff;
        }
        
        /* Secondary: outline buttons – calm, not loud */
        .mbh-iw-actions .btn.btn-outline-primary,
        .mbh-iw-actions .btn.btn-outline-info {
            background: #f9fafb;
            border-color: #d1d5db;
            color: #4b5563;
        }
        
        .mbh-iw-actions .btn.btn-outline-primary:hover,
        .mbh-iw-actions .btn.btn-outline-info:hover {
            background: #f3f4f6;
            border-color: #9ca3af;
            color: #374151;
        }
        
        .mbh-iw-actions .btn.btn-outline-danger {
            background: #fef2f2;
            border-color: #fecaca;
            color: #b91c1c;
            min-width: auto;
            padding: 2px 5px !important;
        }
        
        .mbh-iw-actions .btn.btn-warning {
            background: #d97706;
            border-color: #d97706;
            color: #fff;
            font-size: 0.68rem !important;
        }
        
        .mbh-iw-actions .btn i,
        .mbh-iw-actions .btn .bx {
            font-size: 0.6rem;
            margin-right: 2px;
        }
        
        @media (max-width: 768px) {
            .gm-style-iw-c {
                max-width: 90vw !important;
            }
            
            .mbh-iw-body {
                padding: 5px 6px 6px;
            }
            
            .mbh-iw-actions .btn {
                font-size: 0.65rem !important;
                padding: 2px 5px !important;
                min-height: 20px;
            }
            
            .mbh-iw-actions .mbh-iw-action-row:first-child .btn:first-child {
                font-size: 0.7rem !important;
                padding: 3px 6px !important;
                min-height: 22px;
            }
        }

        /* Bootstrap/global image rules can distort Google Maps tiles/markers */
        .gm-style img {
            max-width: none !important;
            max-height: none !important;
        }

