@media (max-width: 999px) {
    html {
        font-size: 16px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-columns: 1fr;
    }

    .search-bar-bottom {
        flex-wrap: nowrap;
        padding: 10px 15px 0px;
        border-bottom: 1px solid var(--border-color, #e5e5e5);
        background: var(--white, #ffffff);
        flex-direction: column;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, visibility 0s linear 0.3s;
    }

    .search-bar-bottom-left,
    .search-bar-bottom-right {
        flex-basis: auto;
    }

    .search-bar-bottom-left {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 0; /* Reset mobile padding */
    }

    .search-bar-bottom-right {
        width: 100%;
        justify-content: flex-end;
    }

    .search-bar-bottom:not(.expanded) {
        border-top-width: 0; /* Collapse border */
        max-height: 0;
        opacity: 0;
        padding-bottom: 0; /* Collapse padding */
        padding-top: 0; /* Collapse padding */
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, border-top-width 0.3s ease-in-out, visibility 0s linear 0.3s; /* Delay visibility on collapse */
        visibility: hidden;
    }

    .search-bar-bottom.has-filters {
        padding-bottom: 0;
    }


    #places-bar {
        bottom: -50px;
        flex-direction: row;
        gap: 6px;
        left: 50%;
        padding: 6px;
        top: auto;
        transform: translateX(-50%);
    }

        #places-bar button {
            height: 38px;
            padding: 8px;
            width: 38px;
        }

            #places-bar button[title]:hover::after {
                bottom: 100%;
                left: 50%;
                margin-bottom: 8px;
                margin-left: 0;
                top: auto;
                transform: translateX(-50%);
            }

    .search-bar-top {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        padding: 0 15px;
        margin: 0;
        background: var(--white, #ffffff);
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out, visibility 0s linear 0.3s;
    }

    .date-range-wrapper,
    .guest-dropdown-wrapper,
    .essentials-bar,
    .more-btn-wrapper {
        min-width: 100%;
        width: 100%;
    }

    .rns-dateRange {
        width: 100%;
        min-width: 100%;
        width: 300px;
    }

    .spacer {
        display: none;
    }

    .more-filters-spacer {
        width: 20px;
    }

    .view-mode-options {
        display: flex;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    .modal-content {
        background: white;
        border-radius: var(--radius-lg);
        left: 50%;
        max-height: 90vh;
        max-width: 600px;
        overflow-y: auto;
        padding: 20px;
        position: fixed;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
    }

    .essentials-dropdown {
        margin-left: 0;
        min-width: auto;
        padding: 10px;
        width: 100%;
        position: fixed;
        min-width: 300px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        margin: 0;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .ss-main {
        padding: 6px 10px;
    }

        .ss-main .ss-content .ss-list .ss-option {
            font-size: 14px;
            padding: 6px 10px;
        }

    /* Layout and Container Styles */
    .tiles {
        padding-right: 0;
        /* flex-basis/auto sizing handled by grid; avoid flex:1 which collapses inside grid layout */
    }

    .tile-content {
        padding: 1rem;
    }   

    .checkout-container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 15px 0;
    }
    
    /* Removed .checkout-form-section padding - was breaking mobile layout */
    
    .checkout-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Mobile section header improvements */
    .section-header {
        padding: 12px;
    }
    
    .header-content {
        gap: 8px;
    }
    
    .step-title {
        min-width: 100px;
        max-width: 100px;
        font-size: 0.9rem;
    }
    
    .step-summary {
        font-size: 0.8rem;
        margin-left: 8px;
    }

    .rns-property-container {
        width: 100%;
    }

    .property-page {
        padding: 0px;
    }

    /* Checkout Sidebar Styles - Modal-like behavior */
    .checkout-sidebar {
        position: sticky;
        top: 0;
        background: var(--white);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        border-radius: 0;
        padding: 0;
        margin: 0;
        z-index: 1000;
        order: -1;
        transition: none;
    }

    /* When expanded, sidebar becomes a modal overlay */
    .checkout-sidebar.expanded {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        display: flex;
        flex-direction: column;
    }

    .checkout-sidebar-tab {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: var(--white);
        border-bottom: 1px solid var(--border-color);
        cursor: pointer;
        position: relative;
        z-index: 1;
    }

    /* When expanded, tab stays at top */
    .checkout-sidebar.expanded .checkout-sidebar-tab {
        position: sticky;
        top: 0;
        flex-shrink: 0;
    }

    .checkout-sidebar-summary {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .checkout-sidebar-total {
        font-weight: 600;
        font-size: 1.1rem;
    }

    .checkout-sidebar-dates {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    .checkout-sidebar-content {
        display: none;
        padding: 20px 15px;
        border-bottom: 1px solid var(--border-color);
    }

    /* When expanded, content becomes scrollable */
    .checkout-sidebar.expanded .checkout-sidebar-content {
        display: flex;
        flex-direction: column;
        background: var(--white);
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }

    /* Mobile continue button - fixed at bottom when sidebar expanded */
    .checkout-sidebar.expanded .mobile-continue-button {
        position: sticky;
        bottom: 0;
        margin-top: 0;
        padding: 1rem;
        background: var(--white);
        border-top: 1px solid var(--border-color);
        flex-shrink: 0;
        z-index: 2;
    }

    .checkout-sidebar-toggle {
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 5px;
    }

        .checkout-sidebar-toggle iconify-icon {
            transition: transform 0.3s ease;
        }

    .checkout-sidebar.expanded .checkout-sidebar-toggle iconify-icon {
        transform: rotate(180deg);
    }

    /* Lock body scroll when sidebar is expanded */
    body.sidebar-expanded {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Form Styles */
    .input-row,
    .rns-form-row {
        flex-direction: column;
        margin-right: 0;
        margin-left: 0;
        gap: 0;
    }

    .checkout-form {
        margin-top: 20px;
        padding: 0px;
    }

    /* Search Bar Styles */

    .flex-container {
        flex-direction: column;
        gap: 10px;
    }

    /* Booking Form Styles */
    .booking-form {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        border-radius: 10px 10px 0 0;
        padding: 0;
        max-height: 90vh;
        min-height: 45px;
        overflow-y: auto;
        transform: translateY(0);
        transition: transform 0.3s ease-in-out;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Show mobile header on mobile */
    .mobile-header {
        display: block;
        position: relative;
        padding: 20px 20px 0px;
        background: white;
        border-radius: 10px 10px 0 0;
        cursor: pointer;
        z-index: 2;
        transition: background-color 0.2s ease;
    }

        .mobile-header:active {
            background-color: rgba(0, 0, 0, 0.05);
        }

    .mobile-header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }

    /* Price Info Styles */
    .price-info {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }

    .total-price-box {
        display: flex;
        flex: 1;
        flex-direction: column;
    }

    .total-price {
        font-size: 20px;
        font-weight: 600;
        color: #333;
        line-height: 1.2;
    }

    .price-subtext {
        font-size: 12px;
        color: #666;
        margin-top: 2px;
    }

    .dates-info {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .dates-container {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

        .dates-container iconify-icon {
            color: #666;
            margin-top: 2px;
        }

    .dates-stack {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .date-item {
        font-size: 14px;
        color: #333;
        line-height: 1.2;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .date-item.placeholder {
            color: #666;
        }

    .date-divider {
        font-size: 12px;
        color: #666;
        line-height: 1;
    }

    .view-details-btn {
        display: flex;
        align-items: center;
        gap: 4px;
        color: #0d6efd;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        padding-left: 15px;
    }

        .view-details-btn iconify-icon {
            transition: transform 0.2s ease;
        }

    .mobile-header:active .view-details-btn iconify-icon {
        transform: translateX(2px);
    }

    /* Handle Bar Styles */
    .handle-bar {
        display: block;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: #e0e0e0;
        border-radius: 2px;
    }

    .booking-form.collapsed {
        height: 136px;
        overflow: hidden;
        transform: translateY(calc(100% - 85px));
    }

    .booking-form-content {
        padding: 0px 20px;
        overflow-y: auto;
    }

        .booking-form-content h2 {
            display: none;
        }

    .book-now-btn {
        position: sticky;
        bottom: 0;
        margin-top: 15px;
        width: 100%;
        padding: 12px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Mobile Header Styles */

    /* Mobile Backdrop */
    .mobile-backdrop.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Title Styles */
    .collapsed-title {
        font-size: 16px;
        margin: 0;
        padding: 12px 0;
        text-align: center;
        color: #666;
    }

    .booking-form:not(.collapsed) .collapsed-title {
        display: none;
    }

    /* Accordion Section */
    .accordion-section {
        border: 1px solid #e9ecef;
        border-radius: var(--radius-lg);
        margin-bottom: 1rem;
        scroll-margin-top: 50px;
    }

    /* Filter and More Filters Styles */
    .search-bar-wrap .filter-button {
        margin: 0px;
    }

    .more-filters-wrap {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        z-index: 9998 !important;
        display: flex !important;
        justify-content: center;
        align-items: flex-start;
        overflow-y: auto;
        margin: 0;
        transform: none !important;
    }

    .more-filters-content,
    .criteria-container {
        background: white;
        border-radius: var(--radius-lg);
        width: 90%;
        max-width: 950px;
        max-height: 95vh;
        overflow-y: auto;
        padding: 20px;
        position: relative;
        margin: 20px auto;
        z-index: 10000; /* Ensure content is above overlay */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    /* ========================================
       MOBILE CLOSE BUTTON ADJUSTMENTS
       Base styles are in rns-layout.css
       ======================================== */
    
    /* Mobile adjustments for modal close buttons - slightly smaller and closer to edge */
    .property-details-modal .close-button,
    .rental-terms-modal .close-button {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        background-size: 18px 18px;
    }
    
    /* Base close buttons on mobile */
    .close-button {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        background-size: 18px 18px;
    }

    .criteria-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    /* Reset any desktop-specific positioning */
    .rns-results-container .more-filters-wrap {
        position: fixed !important;
        top: 0 !important;
    }

    /* Grid and Criteria Styles */
    .criteria-grid {
        gap: 8px;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

        .criteria-grid .checkbox-container {
            flex: 0 0 calc(50% - 4px);
            min-width: 0;
            max-width: none;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

            /*update grid so checkbox taxes up only space needed in flex*/

            .criteria-grid .checkbox-container input[type="checkbox"] {
                margin-right: 8px;
                width: auto;
            }

        .criteria-grid .rns-form-check-label {
            flex: 1;
        }

    /* Search Button Container - Mobile */
    .search-button-container {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

        .search-button-container .rns-btn {
            width: 100%;
            min-width: auto;
        }

    /* Essentials Dropdown Styles */

    .essentials-container {
        background: white;
        border-radius: var(--radius-lg);
        width: 90%;
        max-width: 950px;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
        position: relative;
        z-index: 10000; /* Ensure content is above overlay */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .essentials-dropdown .row {
        margin: 0;
        gap: 15px;
    }

        .essentials-dropdown .row > [class*="col-"] {
            width: 100%;
            padding: 0;
        }

    /* close-button hover styles centralized in rns-layout.css */

    .essentials-dropdown .slider-wrapper {
        width: 100%;
        padding: 0 10px;
    }

    /* Ensure select filters use a 2-column grid on mobile */
    .essentials-dropdown .select-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
        gap: 15px; /* Consistent gap */
        margin-top: 15px; /* Keep existing margin */
    }

    /* Ensure filter items within the grid behave as expected */
    .essentials-dropdown .select-filters .filter-item {
        width: auto; /* Override any potential width: 100% from other rules */
        flex: initial; /* Reset flex property if set elsewhere */
    }

    /* Card and Input Styles */
    .card-type-icons {
        max-width: calc(32px * var(--cc-type-count, 4));
        top: 47%;
    }

        .card-type-icons .cc-logo {
            font-size: 1.5rem;
            width: 32px;
            right: calc(32px * (var(--cc-type-count, 4) - var(--cc-index, 1)));
        }

    /* Card icons in payment method review context */
    .payment-method .card-type-icons {
        max-width: calc(32px * var(--cc-type-count, 4));
        height: 32px;
        margin-left: 0.5rem; /* Smaller margin on mobile */
    }

        .payment-method .card-type-icons .cc-logo {
            font-size: 1.25rem;
            width: 32px;
        }

    .rns-input-group-text i {
        font-size: 1.25rem;
    }

    .rns-input-group-text {
        padding: 0.4rem 0.5rem;
    }

    /* View Options and Wrapper Styles */
    .view-options-wrapper {
        display: none;
    }

    .date-range-wrapper,
    .guest-dropdown-wrapper,
    .essentials-bar,
    .more-btn-wrapper,
    .flex-item,
    .search-btn-wrapper,
    .essentials-dropdown-wrapper {
        width: 100%;
        min-width: 100%;
        flex: 1;
    }

    /* Button and Input Global Styles */
    .btn,
    .rns-form-control,
    select,
    input {
        /*min-height: 44px;*/
        font-size: 16px;
        width: 100%;
    }

    .search-button {
        width: 100%;
    }

    /* Hide Elements */

    .filter-section {
        width: 100%;
    }
    
    .rns-form-actions {
        text-align: center;
    }

    .rns-btn-primary {
        width: 100%;
    }

    .button-group .rns-btn-primary {
        flex: auto;
    }

    .top-bar-links {
        top: 4px;
        right: 10px;
        gap: 15px;
    }

    .contact-number {
        font-size: 14px;
    }

    #resultsApp .date-range-wrapper {
        padding-left: 0rem;
    }

    /* Search bar wrapper styles */
    .search-bar-wrap {
        position: sticky;
        top: 0;
        background: #ffffff;
        background: var(--white, #ffffff);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;
    }

        /* Sticky state */
        .search-bar-wrap.sticky {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            transform: translateY(0);
        }

            /* Hide when scrolling down */
            .search-bar-wrap.sticky.scrolling-down {
                transform: translateY(-100%);
            }

            /* Show when scrolling up */
            .search-bar-wrap.sticky.scrolling-up {
                transform: translateY(0);
            }

            /* Ensure content doesn't jump */
            .search-bar-wrap.sticky + .rns-content-area {
                margin-top: var(--search-bar-height, 60px);
            }

    .search-bar-content {
        display: flex;
        flex-direction: column;
    }

        /* Search bar top section */

        .search-bar-content.expanded .search-bar-top {
            padding: 15px;
            max-height: 1000px;
            opacity: 1;
            visibility: visible;
            transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out, visibility 0s linear 0s;
            flex-direction: column;
            gap: 10px;
            overflow: visible;
        }

    /* Toggle bar transitions */
    .search-bar-toggle {
        width: 100%;
        padding: 15px 15px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        background: #ffffff;
        background: var(--white, #ffffff);
        border-bottom: 1px solid #e5e5e5;
        border-bottom: 1px solid var(--border-color, #e5e5e5);
        transition: background-color 0.3s ease;
    }

        .search-bar-toggle:hover {
            background-color: #f8f9fa;
        }

    /* Toggle text and arrow transitions */
    .toggle-text {
        min-height: 24px;
        font-weight: 600;
        font-size: 14px;
        color: #6c757d;
        color: var(--text-muted, #6c757d);
        transition: color 0.3s ease;
        vertical-align: super;
        display: flex;
    }

    .toggle-arrow {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .toggle-arrow.rotate-180 {
            transform: rotate(180deg);
        }

    /* Bottom section transitions */

    .search-bar-bottom.expanded,
    .search-bar-bottom.has-filters {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, visibility 0s linear 0s;
    }



    /* Active filters section layout */
    .search-bar-bottom .active-filters-count {
        display: flex;
        width: 100%;
        gap: 15px;
        flex-wrap: nowrap;
        margin-left: 0;
        margin-bottom: 10px; /* Add space BELOW the filter buttons */
    }

    /* Button container styles */
    .search-bar-bottom .show-filters-btn,
    .search-bar-bottom .clear-filters-btn {
        flex: 1; /* Make buttons grow equally */
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        padding: 5px 8px;
        text-align: center;
        min-width: 0; /* Allow buttons to shrink below content size */
    }

    .search-bar-bottom .clear-filters-btn {
        flex: 1;
    }

        /* Handle text overflow in buttons */
        .search-bar-bottom .show-filters-btn span,
        .search-bar-bottom .clear-filters-btn span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Ensure icons maintain their size */
        .search-bar-bottom .show-filters-btn iconify-icon,
        .search-bar-bottom .clear-filters-btn iconify-icon {
            flex-shrink: 0;
            margin-right: 8px;
        }

    /* For very small screens, allow wrapping */
    @media (max-width: 360px) {
        .search-bar-bottom .active-filters-count {
            flex-wrap: wrap;
        }

        .search-bar-bottom .show-filters-btn,
        .search-bar-bottom .clear-filters-btn {
            flex: 1 1 100%; /* Full width on very small screens */
        }
    }

    /* Hide elements in collapsed state */
    .search-bar-bottom:not(.expanded) .search-bar-bottom-right,
    .search-bar-bottom:not(.expanded) .active-filters-count {
        display: none;
    }

    /* Hide active filters section specifically when the parent content is not expanded */
    .search-bar-content:not(.expanded) .search-bar-active {
        display: none;
    }

    /* Expanded state additional styles */
    .search-bar-bottom.expanded {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 8px 16px;
        background: var(--white, #ffffff);
    }

    /* Right side elements in expanded state */
    .search-bar-bottom.expanded .col-md-6:last-child {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
    }

    /* Favorites and Sort layout in expanded state */
    .search-bar-bottom.expanded .fav-toggle-wrapper,
    .search-bar-bottom.expanded .sort-dropdown {
        flex: 1;
        width: 50%;
        display: flex;
    }

    /* Favorites Toggle Styles */
    .search-bar-bottom.expanded .rns-form-check.rns-form-switch {
        display: flex;
        align-items: center;
        min-height: 24px;
        margin: 0;
        padding-left: 0;
        width: 100%;
    }

    .search-bar-bottom.expanded .rns-form-check-input[type="checkbox"] {
        width: 40px !important;
        margin-left: 0;
        margin-right: 8px;
    }

    .search-bar-bottom.expanded .rns-form-check-label {
        font-size: 14px;
        white-space: nowrap;
    }

    /* Sort Dropdown Styles */
    .sort-dropdown {
        position: relative;
        flex: 1;
    }

    .sort-btn-content {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        justify-content: space-between;
    }

    .sort-dropdown-list {
        margin-left: 0;
        min-width: auto;
        padding: 10px;
        width: 100%;
        position: fixed;
        min-width: 300px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        margin: 0;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1060;
    }
    
    /* Container for the actual dropdown content */
    .sort-dropdown-container {
        background: white;
        border-radius: var(--radius-lg);
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
        position: relative;
        margin: auto;
    }
    
    /* Remove pseudo elements that are no longer needed */
    .sort-dropdown-list::before,
    .sort-dropdown-list::after {
        display: none;
    }
    
    .sort-dropdown-list .dropdown-item {
        position: relative;
        z-index: 5;
        margin: 0;
        padding: 15px;
        border-bottom: 1px solid var(--border-color);
        background: white;
    }

    .sort-dropdown-list .dropdown-item:last-child {
        border-bottom: none;
    }

    .active-filters-count {
        margin-left: 0;
        padding-left: 0;
    }

        .active-filters-count::before {
            display: none;
        }

    .rns-dateRange .input {
        text-align: center;
        padding-right: 20px;
    }

    .search-bar-bottom .col-md-6 {
        width: 100%;
    }

        .search-bar-bottom .col-md-6:last-child {
            margin-top: 10px;
        }

    .search-bar-bottom .fav-toggle-wrapper,
    .search-bar-bottom .sort-dropdown {
        flex: 1;
        width: 50%;
    }

    .results-count {
        display: none;
    }

    
    .property-content {
        padding: 10px;
    }

    .property-info {
        padding-right: 0px;
    }

    .booking-section {
        padding-bottom: 0px !important;
        margin-bottom: 0px !important;
    }

    .images-right {
        display: none;
    }

    .main-image {
        display: none;
    }

    .thumbnail-grid {
        display: none;
    }

    .rns-slider-container {
        display: block;
        width: 100%;
        height: 300px;
        border-radius: 0;
    }

    .rns-slider {
        height: 100%;
    }

    .rns-slide {
        height: 100%;
    }

        .rns-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    .confirmation-container {
        padding: 0px;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .confirmation-content {
        padding: 0px;
        padding: 10px;
        width: 100%;
    }

    .confirmation-section {
        padding: 15px;
        width: 100%;
        min-width: 0;
    }

    /* Base container fixes */

    /* Flex container fixes */

    /* Date range and details fixes */
    .dates {
        display: flex;
        flex-direction: column; /* Stack on mobile */
        gap: 1rem;
        width: 100%;
        min-width: 0;
    }

    /* Property specs fixes */
    .property-specs {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

        .property-specs span {
            flex: 1 1 auto;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    /* Guest and payment details fixes */
    .guest-details,
    .payment-details {
        display: grid;
        gap: 1rem;
        width: 100%;
        min-width: 0;
    }

    /* Table fixes */
    .review-table {
        width: 100%;
        table-layout: fixed; /* Important for controlling column widths */
    }

        .review-table th {
            width: 30%;
            min-width: 0;
            word-wrap: break-word;
        }

        .review-table td {
            width: 70%;
            min-width: 0;
            word-wrap: break-word;
        }

        /* Prevent text overflow */
        .review-table th,
        .review-table td {
            overflow-wrap: break-word;
            word-wrap: break-word;
            -ms-word-break: break-all;
            word-break: break-word;
            -ms-hyphens: auto;
            -moz-hyphens: auto;
            -webkit-hyphens: auto;
            hyphens: auto;
        }

    /* Action buttons fixes */
    .confirmation-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

        .confirmation-actions .btn {
            width: 100%;
        }

    .property-header {
        gap: 0px;
    }

    .search-content {
        flex-direction: column;
        gap: 3rem;
    }

    .search-right-column {
        min-width: 100%;
    }

    .search-container {
        padding: 1rem;
    }

    .search-top-row {
        flex-direction: column;
    }

    .search-dropdowns {
        grid-template-columns: 1fr;
    }

    .property-image {
        flex: 0 0 180px;
        margin: 10px 30px 0 0;
        height: 115px;
    }

    .price-display {
        margin-top: 6px;
        padding-top: 6px;
    }

    .nightly-rate {
        font-size: 1rem;
    }

    .price-disclaimer {
        font-size: 0.75rem;
    }

    .desktop-guest-selector {
        display: none;
    }

    .guest-selector {
        margin: 0;
        width: 100%;
    }

    .mobile-guest-selector {
        display: block;
    }

    .guest-input-wrapper {
        flex: 1;
        margin: 0 0.5rem;
        font-size: 16px;
        padding: 5px 16px;
    }

    .rates-table table {
        font-size: 13px;
    }

        .rates-table th,
        .rates-table td {
            padding: 10px;
        }


    .fav-toggle-wrapper .rns-form-check-input::before {
        left: -1px;
        bottom: -1px;
    }

    body.modal-open {
        padding-right: 0px; /* Prevents layout shift when scrollbar disappears */
    }

    .more-btn-wrapper {
        width: 100%;
        min-width: 100%;
        flex: 1;
    }

    .mobile-view-toggle-wrapper {
        width: 100%;
        background-color: var(--white);
        border: 1px solid #f5f5f5;
        border-radius: var(--radius-lg);
        box-shadow: 0px 0px 0px 1px rgba(10, 13, 18, 0.18) inset, 0px -2px 0px 0px rgba(10, 13, 18, 0.05) inset, 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
        padding: 0;
        overflow: hidden; /* Ensure no content spills out */
    }

    .mobile-view-buttons {
        display: flex;
        width: 100%;
        height: 100%;
    }

    .mobile-view-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 15px;
        background: transparent;
        color: var(--text-muted);
        border: none;
        transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
        outline: none;
        position: relative;
    }

    .mobile-view-btn:first-child {
        border-right: 1px solid var(--border-color);
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    }

    .mobile-view-btn:last-child {
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    }

    .mobile-view-btn iconify-icon {
        margin-right: 5px;
    }

    /* Active state */
    .mobile-view-btn.active {
        color: var(--primary-color);
        font-weight: 500;
        background-color: #fafafa;
        box-shadow: 0 0 2px var(--primary-color, #0056b3) inset, 0 0 2px var(--primary-color, #0056b3) inset, 0 0 2px var(--primary-color, #0056b3) inset;
        border-color: var(--primary-color, #0056b3) !important;
    }

    .property-summary {
        padding: 0.75rem;
    }

    .checkout-property-header {
        flex-direction: column;
        gap: 1rem;
    }

    .checkout-property-header .property-image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
        margin: 0;
    }

    .checkout-property-header .property-details {
        gap: 0.5rem;
    }

    .checkout-property-header .property-details p {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .checkout-property-header .property-details span {
        flex: 0 0 auto;
    }

    .stay-row {
        gap: 1rem;
    }

    .stay-label {
        flex: 1;
    }

    .stay-label span {
        flex: 1;
    }

    .promo-input-group .checkout-input-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .promo-input-group .rns-btn {
        width: 100%;
    }

    .property-details-modal .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
    }

    .property-details-modal .modal-body {
        padding: 1rem;
    }

    /* Duplicate removed - modal close button mobile styles are now at line ~610 */

    .property-details-modal .row {
        flex-direction: column;
    }

    .property-details-modal .col-lg-8,
    .property-details-modal .col-lg-4 {
        width: 100%;
        padding: 0;
    }

    .property-details-modal .main-image {
        margin-bottom: 1rem;
    }

    .property-details-modal .thumbnail {
        margin-bottom: 1rem;
    }

    .modal-image-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .checkout-content .main-image-container {
        max-width: 100%;
        aspect-ratio: 4/3;
    }

    /* Property Page - Hide desktop gallery on mobile */
    .property-page .image-gallery-section {
        display: none !important;
    }

    /* Property Page - Show mobile slider on mobile */
    .property-page .rns-slider-container.mobile-only {
        display: block !important;
    }

    .thumbnail-stack {
        flex-direction: row;
        width: 100%;
    }

    .thumbnail-container {
        flex: 1;
        aspect-ratio: 4/3;
    }

    .modal-property-specs {
        gap: 1rem;
        padding: 0.75rem;
    }

    .spec-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }

    .modal-section {
        gap: 0.75rem;
    }

    .modal-amenities-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-amenity-item {
        padding: 0.75rem;
    }

    .modal-property-title {
        font-size: 1.5rem;
    }

    .modal-section-title {
        font-size: 1.125rem;
    }
    
}



@media (max-width: 991.98px) {
    .mobile-view-toggle-wrapper {
        display: flex !important;
    }
    .view-options-wrapper {
        display: none !important;
    }
}



/* Mobile-specific loading states for FP price filtering hydration */
@media (max-width: 999px) {
    .results-loading-indicator,
    .toggle-loading {
        font-size: 0.9rem;
        gap: 6px;
    }

    .inline-spinner {
        height: 14px;
        width: 14px;
    }

    /* Mobile toggle group improvements */
    .toggle-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .toggle {
        flex: none;
        width: 100%;
    }
    
    .toggle span {
        padding: 12px 16px;
        font-size: 0.9rem;
        text-align: left;
    }

    .pricing-status {
        font-size: 0.8em;
        margin-left: 6px;
    }

    /* Review section mobile styles */
    .review-section {
        margin-bottom: 1rem;
    }
    
    .review-title {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .review-item {
        padding: 0.875rem 1.25rem;
        gap: 0.375rem;
    }
    
    .review-label {
        font-size: 0.75rem;
    }
    
    .review-value {
        font-size: 0.9rem;
    }
    
    .review-empty {
        padding: 2rem 1.25rem;
    }
    
    .card-type-icons {
        gap: 0.375rem;
        flex-wrap: wrap;
    }
   
}

