/* ==========================================================================
   RoomNest Core Stylesheet
   Theme: Indigo (#4f46e5) and Teal/Emerald (#10b981)
   Preserving theme, colors, layout structures, and branding
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --bg-color: #f8fafc; /* Slightly cleaner light background */
    --text-dark: #0f172a; /* Deeper slate dark text for better readability */
    --text-light: #64748b; /* Better slate grey for tertiary text */
    --white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(241, 245, 249, 0.8);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.02);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.95;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    display: inline-block;
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.nav-links a.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: 10px; /* Modern slightly rounded box instead of pill for high-end look */
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-size: 0.95rem;
    gap: 6px;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: var(--white);
    box-shadow: 0 4px 12px 0 rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4f46e5 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid #cbd5e1;
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 12px 0 rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.btn-success:active {
    transform: translateY(0);
}

.btn-block {
    display: flex;
    width: 100%;
    margin-top: 1rem;
}

/* ==========================================================================
   Hero & Search Sections
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    color: var(--white);
    padding: 5rem 2rem 9rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Floating Search Box */
.search-wrapper {
    max-width: 950px;
    margin: -6rem auto 4rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.search-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.search-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.search-tab {
    padding: 1.1rem 2rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
    user-select: none;
}

.search-tab:hover {
    color: var(--text-dark);
    background: rgba(15, 23, 42, 0.01);
}

.search-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--white);
    font-weight: 700;
}

.search-form {
    display: flex;
    padding: 1.5rem;
    gap: 1rem;
    align-items: center;
}

.search-field {
    flex: 1;
    position: relative;
}

.search-field select, .search-field input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    outline: none;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition-smooth);
}

.search-field select:focus, .search-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.search-btn {
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    min-width: 160px;
    height: 100%;
}

/* ==========================================================================
   Grid & Card Layouts
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Modernized Grid Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(79, 70, 229, 0.15);
}

.card-img-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: #e2e8f0;
}

.card-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--text-dark);
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.card-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.card-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.card-info-label {
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-info-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-footer-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.contact-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 8px;
}

/* ==========================================================================
   Details & Sidebar Structure
   ========================================================================== */
.details-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.details-image {
    flex: 1.3;
    min-width: 320px;
}

.details-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.details-info {
    flex: 1;
    min-width: 320px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.details-price {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
    margin: 1rem 0;
}

.details-badge {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.facilities {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.facility-tag {
    background: #f1f5f9;
    padding: 0.45rem 1.1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
    border: 1px solid rgba(15, 23, 42, 0.02);
}

.contact-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    margin-top: 2rem;
    border: 1px solid #bbf7d0;
    text-align: left;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Forms & Container
   ========================================================================== */
.form-container {
    max-width: 550px;
    margin: 4rem auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.form-container h2 {
    margin-bottom: 1.8rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
    background: #f8fafc;
    color: var(--text-dark);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   Alerts & Feedback
   ========================================================================== */
.alert {
    padding: 1rem 1.5rem;
    margin: 1.5rem auto;
    max-width: 800px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { transform: translateY(-16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.error { background: #fff1f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 4rem 2rem 2rem 2rem;
    background: var(--white);
    color: var(--text-light);
    margin-top: auto;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    font-weight: 500;
}

/* ==========================================================================
   Drawer Overlays & Filters (Airbnb style)
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.floating-filter-btn {
    display: none;
}

/* Search Results Layout & Sidebar */
.search-page-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.search-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--border-radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.search-results-area {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ==========================================================================
   Vertical Property Cards (Search Page Grid view)
   ========================================================================== */
.hc-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-smooth);
    height: 100%;
}

.hc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.15);
}

.hc-img-wrapper {
    position: relative;
    width: 100%;
    height: 185px;
    flex-shrink: 0;
    overflow: hidden;
    background: #e2e8f0;
}

.hc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.hc-card:hover .hc-img {
    transform: scale(1.05);
}

.hc-content {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.hc-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.25rem;
}

.hc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.hc-location {
    color: var(--text-light);
    font-size: 0.82rem;
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    white-space: nowrap;
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.hc-price span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
}

.hc-info-grid {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.6rem 0;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.hc-info-grid .card-info-item {
    flex: 1;
    min-width: 80px;
}

.hc-info-grid .card-info-label {
    font-size: 0.68rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 0.1rem;
}

.hc-info-grid .card-info-value {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.82rem;
}

.hc-content p {
    display: none !important; /* Clean layout matching reference image (no clutter description) */
}

.hc-footer {
    display: flex;
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.hc-footer .btn {
    flex: 1;
    padding: 0.55rem;
    font-size: 0.82rem !important;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

/* ==========================================================================
   Details Page Layout (Magicbricks Style)
   ========================================================================== */
.mb-details-layout {
    display: flex;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.mb-details-main {
    flex: 1.8;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--shadow-sm);
}

.mb-details-sidebar {
    flex: 1;
    min-width: 320px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 90px;
}

/* Sticky Mobile Bottom Bar on Details Page */
.details-mobile-sticky-bar {
    display: none;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 1024px) {
    .mb-details-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .mb-details-sidebar {
        max-width: 100%;
        min-width: 100%;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    /* Sticky Bottom Mobile Contact Actions for Details page */
    .details-mobile-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        padding: 0.8rem 1.5rem;
        z-index: 1001; /* High enough to stay above standard bottom nav */
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
        gap: 1.5rem;
    }

    .details-mobile-sticky-bar .mobile-sticky-price {
        display: flex;
        flex-direction: column;
    }

    .details-mobile-sticky-bar .mobile-sticky-price .price-amt {
        font-size: 1.45rem;
        font-weight: 850;
        color: var(--text-dark);
        line-height: 1.1;
    }

    .details-mobile-sticky-bar .mobile-sticky-price .price-lbl {
        font-size: 0.72rem;
        color: var(--text-light);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    /* Shift standard body padding up to avoid cover up by mobile bars */
    body.has-sticky-details-bar {
        padding-bottom: 135px !important;
    }

    /* Navbar styling on mobile */
    .nav-container {
        padding: 0.75rem 1rem;
    }
    .nav-links {
        display: none !important;
    }
    .username {
        display: none !important;
    }
    .nav-auth .btn {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* Bottom Floating Action Bar */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        background: var(--white) !important;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        justify-content: space-around;
        align-items: center;
        z-index: 1000 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -4px 15px rgba(15, 23, 42, 0.04);
        transform: translate3d(0, 0, 0);
        will-change: transform;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-light);
        font-size: 0.72rem;
        font-weight: 600;
        gap: 3px;
        flex: 1;
        height: 100%;
        transition: var(--transition-smooth);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item:hover, .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-icon {
        width: 20px;
        height: 20px;
        transition: transform 0.2s;
    }

    .bottom-nav-item:active .bottom-nav-icon {
        transform: scale(0.9);
    }

    body {
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Hero & Floating Search Grid */
    .hero {
        padding: 4rem 1rem 7rem 1rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }

    .search-wrapper {
        margin-top: -5rem;
        padding: 0 1rem;
    }
    .search-tab {
        padding: 0.9rem 1.2rem;
        font-size: 0.88rem;
    }
    .search-form {
        flex-direction: column;
        padding: 1.2rem;
        gap: 0.8rem;
    }
    .search-btn {
        width: 100%;
        padding: 0.85rem;
    }

    /* Primary Grid Layout */
    .container {
        margin: 2.5rem auto;
        padding: 0 1.2rem;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Standardized Mobile Card heights */
    .card-img-wrapper {
        height: 200px;
    }
    .card-content {
        padding: 1.2rem;
    }

    /* Search results page sidebar drawer style */
    .search-page-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .search-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
        border: none !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.15) !important;
        padding: 2rem 1.5rem !important;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        display: block !important;
    }
    
    .search-sidebar.open {
        transform: translateY(0) !important;
    }
    
    .desktop-filter-title {
        display: none !important;
    }
    
    .floating-filter-btn {
        display: flex !important;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: calc(75px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
        color: white;
        border: none;
        padding: 0.75rem 1.6rem;
        border-radius: 999px;
        font-weight: 700;
        font-size: 0.9rem;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        z-index: 999;
        cursor: pointer;
        white-space: nowrap;
        transition: var(--transition-smooth);
    }
    
    .floating-filter-btn:active {
        transform: translateX(-50%) scale(0.95);
    }
    
    .search-results-area {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .hc-card {
        flex-direction: column;
    }
    
    .hc-img-wrapper {
        width: 100%;
        height: 120px !important;
    }

    .hc-content {
        padding: 0.75rem !important;
    }

    .hc-title {
        font-size: 0.88rem !important;
        margin-bottom: 0.15rem !important;
    }

    .hc-location {
        font-size: 0.7rem !important;
        margin-bottom: 0.35rem !important;
    }

    .hc-price {
        font-size: 0.95rem !important;
        margin-top: auto !important;
        margin-bottom: 0.4rem !important;
    }
    
    .hc-info-grid {
        display: none !important;
    }

    .hc-footer {
        flex-direction: column !important;
        gap: 4px !important;
    }

    .hc-footer .btn {
        width: 100% !important;
        padding: 0.4rem !important;
        font-size: 0.72rem !important;
    }
    
    .mb-details-main {
        padding: 1.5rem;
        border-radius: var(--border-radius-md);
    }

    /* Modal dialog overrides on mobile */
    .form-container {
        padding: 1.8rem;
        margin: 2rem 1rem;
        border-radius: var(--border-radius-md);
    }
    .form-container h2 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }

    footer {
        padding: 3rem 1.2rem 1.5rem 1.2rem;
        margin-bottom: 60px;
    }

    .drawer-header {
        display: flex !important;
    }
}

