﻿
.package-item {
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    /* REMOVED SHADOW - Issue #3 */
    box-shadow: none !important;
}

    .package-item:hover {
        transform: translateY(-6px);
        /* REMOVED SHADOW - Issue #3 */
        box-shadow: none !important;
    }

    .package-item .bg-white {
        display: flex;
        flex-direction: column;
        height: 100%;
        /* ADD subtle border instead of shadow - Issue #3 */
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

.filters-section {
    max-width: 1200px; /* Will be overridden in media queries */
    width: 100%;
    background-color: #f8f9fa;
    padding: 20px; /* Will be overridden in media queries */
    border-radius: 15px;
    margin: 0 auto 30px auto; /* Center the section */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

    .filters-section .row {
        display: grid;
        grid-template-columns: repeat(4, minmax(280px, 1fr)); /* Increased from 200px to 280px */
        gap: 20px; /* Increased gap for better spacing */
        margin: 0;
    }

    .filters-section .container,
    .filters-section .container-fluid {
        max-width: none;
        width: 100%;
    }

    .filters-section .row > div {
        padding: 0;
    }

.container-fluid {
    padding-left: 30px;
    padding-right: 30px;
}

.filters-section .form-control,
.filters-section .select2-container--default .select2-selection--single {
    height: 42px !important; /* Reduced from 52px */
    font-size: 14px !important; /* Reduced from 16px */
    padding: 8px 12px !important;
}

.filters-section #priceSlider {
    margin-top: 8px !important; /* Align with other inputs */
    margin-bottom: 15px;
}

/* Fix alignment of all filter sections */
.filters-section .row > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

/* Ensure all labels are at the same height */
.filters-section label {
    display: block;
    margin-bottom: 6px !important; /* Consistent spacing */
    min-height: 18px !important;
    line-height: 18px !important;
    font-weight: 600;
    font-size: 14px !important; /* Reduced from 16px */
}

/* Price range container alignment */
.filters-section .price-range-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.filters-section .price-range-values {
    margin-top: auto; /* Push to bottom to align with other inputs */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.filters-section .btn {
    white-space: nowrap;
    min-width: 120px;
    padding: 8px 20px;
    font-size: 14px;
    height: auto;
    display: inline-block;
}

.filters-section .text-center {
    margin-top: 20px; /* Reduced from mt-4 */
}

.filters-section label {
    display: block;
    margin-bottom: 6px; /* Reduced margin */
    min-height: 18px;
    line-height: 18px;
    font-weight: 600;
    font-size: 14px; /* Reduced from 16px */
}

.sort-section {
    width: 200px;
    margin: 0 auto 20px auto;
}

.pagination {
    margin-top: 30px;
    justify-content: center;
}

    .pagination .page-item .page-link {
        text-align: center;
        border-radius: 50%;
        margin: 0 5px;
        width: 36px;
        color: #00a856;
    }

    .pagination .active .page-link {
        color: white;
        background-color: #00a856;
        border-color: #00a856;
    }

/* FIXED: Image carousel container */
.listing-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    /* FIXED: Remove any padding that creates white space */
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

/* FIXED: Description section - make it take remaining space */
.description-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* FIXED: Navigation arrows with higher z-index */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20; /* Higher z-index */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

    .image-nav:hover {
        background-color: rgba(255, 255, 255, 0.9);
    }

    .image-nav.prev {
        left: 10px;
    }

    .image-nav.next {
        right: 10px;
    }

/* FIXED: Image indicators with higher z-index */
.image-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 20; /* Higher z-index */
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

    .indicator.active {
        background-color: #ffffff;
    }

.listing-title {
    cursor: pointer;
}

    .listing-title:hover {
        color: #007bff;
        text-decoration: underline;
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.desktop-map-container {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    width: 50%;
    z-index: 1;
    display: none;
}

.map-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s ease;
}

    .map-toggle-btn:hover {
        background-color: #218838;
        transform: scale(1.05);
    }

    .map-toggle-btn i {
        font-size: 24px;
    }

.mobile-map-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 1001;
    overflow: hidden;
}

.mobile-map-container {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 80%;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
}

.map-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1002;
    font-size: 20px;
    color: #333;
}

.leaflet-right {
    display: none;
}

/* NEW: Desktop Map Toggle - 50/50 Split */
.show-map .listings-container {
    width: 50% !important;
    padding-left: 20px;
}

.show-map .desktop-map-container {
    width: 50% !important;
    min-width: unset !important;
    display: block;
}

/* FIXED: Image carousel styles */
.carousel-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
    justify-content: flex-start;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-image-wrapper {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    vertical-align: top !important;
}

/* Grid layouts for different screen sizes */
#listingsContainer {
    display: grid !important;
    width: 100% !important;
    gap: 1rem !important;
}

    #listingsContainer .package-item {
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 0 !important;
    }

/* Adjust content for smaller cards */
.package-item {
    font-size: 0.9rem;
}

    .package-item .listing-title {
        font-size: 1.1rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .package-item .p-4 {
        padding: 1rem !important;
    }

    .package-item .image-nav {
        width: 32px;
        height: 32px;
    }

        .package-item .image-nav i {
            font-size: 14px;
        }

    .package-item .indicator {
        width: 6px;
        height: 6px;
    }

/* Select2 Styling - Issue #4 - Match native select styling */
.select2-container--default .select2-selection--single {
    height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background-color: #fff !important;
    display: flex !important;
    align-items: center !important;
    font-size: 14px !important;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 24px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 40px !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

        .select2-container--default .select2-selection--single .select2-selection__arrow b {
            border-color: #6c757d transparent transparent transparent !important;
            border-style: solid !important;
            border-width: 5px 4px 0 4px !important;
            height: 0 !important;
            left: 50% !important;
            margin-left: -4px !important;
            margin-top: -2px !important;
            position: absolute !important;
            top: 50% !important;
            width: 0 !important;
        }

/* Ensure Select2 container matches other inputs */
.select2-container {
    width: 100% !important;
    height: 42px !important;
}

/* Style regular selects to match */
.filters-section select.form-control {
    height: 42px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background-color: #fff !important;
}

/* NoUISlider custom styling */
#priceSlider {
    margin: 10px 0 20px 0;
    background: #00a856;
}

.noUi-connect {
    background: #00a856;
}

.noUi-handle {
    border: 1px solid #00a856;
}

/* Price labels */
#minPriceLabel, #maxPriceLabel {
    font-weight: 600;
    color: #00a856;
}

/* Number input styling */
input[type="number"] {
    padding-right: 5px;
}

/* Animation for new listings */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.package-item {
    opacity: 0;
}

    .package-item.visible {
        animation: fadeInUp 0.4s ease forwards;
    }

/* Staggered animation delay classes */
.delay-1 {
    animation-delay: 0.05s;
}

.delay-2 {
    animation-delay: 0.1s;
}

.delay-3 {
    animation-delay: 0.15s;
}

.delay-4 {
    animation-delay: 0.2s;
}

.delay-5 {
    animation-delay: 0.25s;
}

.delay-6 {
    animation-delay: 0.3s;
}

/* FIXED: Better loading indicator positioning and visibility */
#loadingMore {
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 30px auto;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    max-width: 300px;
}

.loading-text {
    margin-top: 15px;
    color: #6c757d;
    font-weight: 500;
    font-size: 16px;
}

.spinner-grow {
    width: 1.5rem;
    height: 1.5rem;
}

/* End of listings indicator */
.end-of-listings {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

/* FIXED: Map location button with proper z-index */
.map-location-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15; /* Lower than navigation arrows but higher than image */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    color: #28a745;
    font-size: 16px;
}

    .map-location-btn:hover {
        background-color: #28a745;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    .map-location-btn:active {
        transform: scale(0.95);
    }

/* Remove any remaining shadows on listing cards - Issue #3 */
.listing-card {
    cursor: pointer;
    transition: transform 0.3s ease !important;
    position: relative;
    box-shadow: none !important;
    transform: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .listing-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
        transform: translateY(-4px) !important;
        border-color: rgba(0, 0, 0, 0.12);
    }

/* Fix for white space above header */
.container-fluid.py-5 {
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
}

/* NEW: Ensure listings are visible when map is toggled */
.show-map #listingsContainer .package-item {
    min-width: 0 !important; /* Allow items to shrink */
    width: 100% !important;
}

/* ===================================================================
            RESPONSIVE MEDIA QUERIES - CONSOLIDATED AND IMPROVED
            =================================================================== */

/* Mobile Phones - Max 575px */
@media (max-width: 575px) {
    #listingsContainer {
        grid-template-columns: 1fr !important;
    }

    .filters-section {
        padding: 15px;
    }

        .filters-section .row {
            grid-template-columns: 1fr;
            gap: 15px;
        }

        .filters-section .text-center .btn {
            margin: 5px;
            width: 45%;
            min-width: 100px;
        }

    .map-location-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: 8px;
        right: 8px;
    }

    .show-map #listingsContainer {
        grid-template-columns: 1fr !important;
    }
}

/* Small Tablets - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    #listingsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .show-map #listingsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile and Small Tablets - Max 767px */
@media (max-width: 767px) {
    .package-item {
        height: auto;
    }

    .listing-image-container {
        padding-bottom: 100%;
    }

    .filters-section .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters-section {
        padding: 30px;
    }

        .filters-section label {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 8px;
            display: block;
        }

        .filters-section .form-control {
            font-size: 16px !important;
            height: 42px !important; /* Consistent height */
            padding: 8px 15px !important;
        }
        /* Mobile Select2 adjustments */
        .filters-section .select2-container--default .select2-selection--single {
            height: 42px !important;
            font-size: 16px !important;
            padding: 8px 15px !important;
        }

    .sort-section {
        width: 100%;
        margin-bottom: 25px;
    }

    .text-center.mt-3 .btn {
        padding: 10px 20px;
        font-size: 16px;
        margin: 5px;
        min-width: 120px;
    }

    .filter-toggle-btn {
        min-height: 48px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
    }

        .filter-toggle-btn .filter-text {
            display: inline-block !important;
            font-weight: 600 !important;
        }
}

@media (max-width: 767.98px) {
    .show-map .desktop-map-container {
        display: none !important;
    }

    .show-map .listings-container {
        width: 100% !important;
        padding-left: 0 !important;
    }
}

/* NEW: Desktop and Tablet - Better filters width */
@media (min-width: 768px) {
    .filters-section {
        max-width: 1500px !important; /* Increased to accommodate wider filters */
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 25px 35px !important; /* Increased padding */
    }

        .filters-section .row {
            gap: 25px !important; /* Increased gap for wider filters */
            align-items: flex-start !important; /* Ensure top alignment */
        }

        .filters-section .form-control,
        .filters-section .select2-container--default .select2-selection--single {
            height: 42px !important;
            font-size: 14px !important;
        }

        .filters-section label {
            font-size: 13px !important;
            margin-bottom: 6px !important;
            min-height: 18px !important;
        }
        /* Ensure price range aligns with other inputs */
        .filters-section #priceSlider {
            margin-top: 6px !important; /* Same as label margin-bottom */
        }

    #listingsContainer {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablets - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .filters-section {
        max-width: 900px !important; /* Adjusted for wider filters */
    }

        .filters-section .row {
            grid-template-columns: repeat(2, minmax(350px, 1fr)) !important; /* Wider individual filters */
            gap: 20px !important;
        }

    #listingsContainer {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    /* NEW: Desktop Map Toggle for Tablets */
    .show-map #listingsContainer {
        grid-template-columns: 1fr !important; /* Single column for tablet */
    }

    .show-map .desktop-map-container {
        width: 45% !important;
    }

    .show-map .listings-container {
        width: 55% !important;
    }
}

/* Desktop Small - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    #listingsContainer {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    /* NEW: Desktop Map Toggle */
    .show-map #listingsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Desktop Large - 1200px to 1599px */
@media (min-width: 1200px) {
    #listingsContainer {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    /* NEW: Desktop Map Toggle */
    .show-map #listingsContainer {
        grid-template-columns: repeat(2, 1fr) !important; /* Reduced from 3 */
    }
}

/* NEW: Ultra-wide screens - 1600px+ */
@media (min-width: 1600px) {
    .filters-section {
        max-width: 1800px !important; /* Increased for ultra-wide with wider filters */
    }

    #listingsContainer {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .show-map #listingsContainer {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
/* Mobile map tile visibility fix */
.mobile-map-overlay .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.mobile-map-overlay .leaflet-tile-pane {
    z-index: 1 !important;
}

.mobile-map-overlay .leaflet-map-pane {
    z-index: 1 !important;
}

.mobile-map-overlay .leaflet-tile {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure the mobile map container is properly sized */
#mobileMap {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    background-color: #f0f0f0; /* Temporary background to see if container is visible */
}

.mobile-map-container {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 80%;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 1002; /* Higher than overlay */
}


/* Force mobile map visibility - override any conflicts */
.mobile-map-overlay.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

    .mobile-map-overlay.show #mobileMap {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }

    /* Ensure Leaflet elements are visible */
    .mobile-map-overlay.show .leaflet-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-map-overlay.show .leaflet-tile-pane,
    .mobile-map-overlay.show .leaflet-map-pane,
    .mobile-map-overlay.show .leaflet-tile {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
/* ===================================================================
       MOBILE LISTING ASPECT RATIO FIXES
       Overall card: 3:5 ratio (taller for better text space), Image: 1:1 ratio
       =================================================================== */

/* Mobile Phones - Max 767px */
@media (max-width: 767px) {
    /* Fix the overall card to maintain 3:5 aspect ratio (taller for more text space) */
    .package-item {
        height: auto !important;
        /* Use aspect-ratio for modern browsers, fallback for older ones */
        aspect-ratio: 3/5;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
    }
    /* For browsers that don't support aspect-ratio, use padding-bottom method */
    @@supports not (aspect-ratio: 3/5) {
        .package-item {
            position: relative;
            padding-bottom: 166.67% !important; /* 5/3 = 1.667 = 166.67% for 3:5 ratio */
            height: 0 !important;
        }

            .package-item .listing-card {
                position: absolute !important;
                top: 0 !important;
                left: 0 !important;
                width: 100% !important;
                height: 100% !important;
            }
    }
    /* Ensure the listing card fills the container and maintains flex layout */
    .package-item .listing-card {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        border-radius: 15px !important;
        box-sizing: border-box !important;
    }
    /* Image container: 1:1 aspect ratio (square) */
    .listing-image-container {
        width: 100% !important;
        aspect-ratio: 1/1 !important; /* Modern way */
        overflow: hidden !important;
        border-top-left-radius: 15px !important;
        border-top-right-radius: 15px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        position: relative !important;
        flex-shrink: 0 !important; /* Prevent shrinking */
    }
    /* Fallback for browsers without aspect-ratio support */
    @@supports not (aspect-ratio: 1/1) {
        .listing-image-container {
            padding-bottom: 100% !important; /* 1:1 ratio */
            height: 0 !important;
            position: relative !important;
        }

            .listing-image-container .carousel-images,
            .listing-image-container .image-nav,
            .listing-image-container .image-indicators,
            .listing-image-container .map-location-btn {
                position: absolute !important;
            }
    }
    /* Ensure images fill the container properly */
    .carousel-images {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .carousel-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        flex-shrink: 0 !important;
        flex: 0 0 100% !important;
    }
    /* Description section takes remaining space */
    .description-section {
        flex: 1 !important; /* Take remaining space */
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
        justify-content: space-between !important;
        min-height: 0 !important; /* Allow shrinking if needed */
        overflow: hidden !important;
        min-height: 120px !important; /* Ensure minimum height for text */
    }
        /* Ensure the bottom section stays at bottom */
        .description-section .border-top {
            margin-top: auto !important;
            padding-top: 0.75rem !important;
            margin-bottom: 0 !important;
        }
        /* Adjust text sizes for better fit with more space */
        .description-section .listing-title {
            font-size: 1rem !important;
            line-height: 1.3 !important;
            margin-bottom: 0.75rem !important;
            display: -webkit-box !important;
            -webkit-line-clamp: 3 !important; /* Allow 3 lines instead of 2 */
            -webkit-box-orient: vertical !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            flex-shrink: 0 !important; /* Don't shrink the title */
        }

        .description-section .mb-3 {
            margin-bottom: 0.5rem !important;
        }

        .description-section small {
            font-size: 0.8rem !important;
        }
    /* Navigation elements positioning */
    .image-nav {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 20 !important;
    }

    .image-indicators {
        position: absolute !important;
        bottom: 8px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 20 !important;
    }

    .map-location-btn {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 32px !important;
        height: 32px !important;
        z-index: 15 !important;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 575px) {
    .package-item {
        /* Maintain 3:5 ratio on very small screens */
        aspect-ratio: 3/4.3;
        max-width: 100% !important;
        margin: 0 auto 1rem auto !important;
    }

    @@supports not (aspect-ratio: 3/5) {
        .package-item {
            padding-bottom: 166.67% !important;
        }
    }
    /* Slightly smaller image on very small screens if needed */
    .listing-image-container {
        aspect-ratio: 1/1 !important;
    }

    @@supports not (aspect-ratio: 1/1) {
        .listing-image-container {
            padding-bottom: 100% !important;
        }
    }
    /* Adjust description padding for smaller screens */
    .description-section {
        padding: 0.75rem !important;
        min-height: 100px !important; /* Ensure enough space for text even on small screens */
    }

        .description-section .listing-title {
            font-size: 0.95rem !important;
            line-height: 1.3 !important;
            -webkit-line-clamp: 3 !important; /* Allow 3 lines on small screens too */
            margin-bottom: 0.75rem !important;
        }
}

/* Fix for listings container on mobile */
@media (max-width: 767px) {
    #listingsContainer {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
        width: 100% !important;
        max-width: 400px !important; /* Limit max width for better aspect ratio */
        margin: 0 auto !important; /* Center the container */
    }
        /* Ensure each listing item maintains its aspect ratio */
        #listingsContainer .package-item {
            width: 100% !important;
            height: auto !important;
            margin-bottom: 0 !important; /* Grid gap handles spacing */
        }
}

/* Small tablets - 576px to 767px */
@media (min-width: 576px) and (max-width: 767px) {
    #listingsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 600px !important;
        gap: 1rem !important;
    }

    .package-item {
        aspect-ratio: 3/5 !important;
    }

    @@supports not (aspect-ratio: 3/5) {
        .package-item {
            padding-bottom: 166.67% !important;
        }
    }
}
/* ===================================================================
       PRICE SLIDER CUSTOM STYLING - GREEN THEME
       =================================================================== */

/* Main slider container */
#priceSlider {
    margin: 10px 0 20px 0;
    height: 8px; /* Slider track height */
}

/* The base/background track of the slider */
.noUi-target {
    background: #e9ecef !important; /* Light gray background */
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px !important;
}

/* The filled/active part of the slider (between handles) */
.noUi-connect {
    background: #00a856 !important; /* Your green color */
    border-radius: 6px !important;
}

/* The slider handles (draggable circles) */
.noUi-handle {
    background: #00a856 !important; /* Your green color */
    border: 2px solid #ffffff !important; /* White border */
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(0, 168, 86, 0.3) !important; /* Green shadow */
    cursor: pointer !important;
    width: 20px !important;
    height: 20px !important;
}

    .noUi-handle:before,
    .noUi-handle:after {
        display: none !important; /* Remove default handle styling */
    }

    /* Handle hover effect */
    .noUi-handle:hover {
        background: #008a47 !important; /* Darker green on hover */
        box-shadow: 0 3px 8px rgba(0, 168, 86, 0.4) !important;
        transform: scale(1.1) !important;
        transition: all 0.2s ease !important;
    }

    /* Handle active/focus state */
    .noUi-handle:focus,
    .noUi-active {
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(0, 168, 86, 0.2) !important;
    }

/* Remove default focus outline */
.noUi-target * {
    outline: none !important;
}

/* Tooltip styling (if you have tooltips enabled) */
.noUi-tooltip {
    background: #00a856 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
}

/* Price range labels styling */
#minPriceLabel,
#maxPriceLabel {
    font-weight: 600 !important;
    color: #00a856 !important;
    font-size: 14px !important;
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    #priceSlider {
        margin: 15px 5px 20px 5px !important;
        height: 10px !important; /* Slightly taller on mobile for easier touch */
    }

    .noUi-handle {
        width: 24px !important;
        height: 24px !important; /* Bigger handles on mobile */
    }

    #minPriceLabel,
    #maxPriceLabel {
        font-size: 15px !important; /* Slightly bigger text on mobile */
        font-weight: 700 !important;
    }
}

/* Desktop hover improvements */
@media (min-width: 768px) {
    .noUi-target:hover .noUi-connect {
        background: #008a47 !important; /* Darker green on track hover */
    }
}


/* Main slider container */
#guestSlider {
    margin: 10px 0 20px 0;
    height: 8px; /* Slider track height */
}

/* Guest range labels styling */
#minGuestLabel,
#maxGuestLabel {
    font-weight: 600 !important;
    color: #00a856 !important;
    font-size: 14px !important;
}

/* Mobile-specific adjustments for guest slider */
@media (max-width: 767px) {
    #guestSlider {
        margin: 15px 5px 20px 5px !important;
        height: 10px !important; /* Slightly taller on mobile for easier touch */
    }

    #minGuestLabel,
    #maxGuestLabel {
        font-size: 15px !important; /* Slightly bigger text on mobile */
        font-weight: 700 !important;
    }
}

/* Desktop hover improvements for guest slider */
@media (min-width: 768px) {
    #guestSlider:hover .noUi-connect {
        background: #008a47 !important; /* Darker green on track hover */
    }
}

/* Fix 1: Override Bootstrap row negative margins for listings container */
#listingsContainer.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Fix 2: Ensure equal padding on the main listings container */
.listings-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Fix 3: Fix the map toggle padding issue */
.show-map .listings-container {
    width: 50% !important;
    padding-left: 1rem !important; /* Changed from 20px */
    padding-right: 1rem !important; /* Added missing right padding */
}

/* Fix 4: Ensure container-fluid has consistent padding */
.container-fluid {
    padding-left: 2rem !important; /* Increased from 30px for better spacing */
    padding-right: 2rem !important; /* Increased from 30px for better spacing */
}

/* Fix 5: Mobile responsive padding fixes */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #listingsContainer {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .listings-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .show-map .listings-container {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Fix 6: Tablet responsive padding */
@media (min-width: 768px) and (max-width: 991px) {
    .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .show-map .listings-container {
        width: 55% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Fix 7: Desktop padding consistency */
@media (min-width: 992px) {
    .container-fluid {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .show-map .listings-container {
        width: 50% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Fix 8: Ensure filters section has consistent padding too */
.filters-section {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

@media (max-width: 767px) {
    .filters-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .filters-section {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}
/* Alternative: If you want the ENTIRE slider background to be green */
/*
    .noUi-target {
        background: #00a856 !important;
    }

    .noUi-connect {
        background: #008a47 !important; // Darker green for the filled part
    }
    */

.pricing-info {
    max-width: 200px;
}

.pricing-breakdown {
    line-height: 1.3;
}

    .pricing-breakdown div {
        margin-bottom: 2px;
    }

@media (max-width: 768px) {
    .pricing-info {
        min-width: 100px;
    }

    .pricing-breakdown {
        font-size: 0.75rem;
    }
}
/* Match "Starting from" font size with listing title */
.pricing-info .h5 {
    font-size: 1rem !important;
    line-height: 1.3 !important;
}

/* Responsive matching for smaller screens */
@media (max-width: 767px) {
    .pricing-info .h5 {
        font-size: 1rem !important;
    }
}
