/* Marker bounce animation for AdvancedMarkerElement */
@keyframes bounce {
    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    40%,
    43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.footer-section {
    display: none;
}
/* 3-Column Layout Styles */
.search-results-container {
    height: calc(100vh - 105px);
    overflow: hidden;
}

.search-results-container .row {
    height: calc(100vh - 80px);
}

/* Custom Column Widths */
.map-column {
    width: 37.5%; /* 25% narrower than original 50% */
    float: left;
    display: block; /* Always visible on desktop */
}

.listings-column {
    width: 45%; /* Wider than original 25% */
    float: left;
    display: block; /* Always visible on desktop */
}

.chat-column {
    width: 17.5%; /* 10% narrower than original 25% */
    float: left;
    display: block; /* Always visible on desktop */
}

/* Map Container */
.map-container {
    height: calc(100vh - 80px);
    position: relative;
}

.property-map {
    width: 100%;
    height: 100%;
}

/* Listings Container */
.listings-container {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.listings-header {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.listings-header-left {
    flex: 1;
}

.listings-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.favorites-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.favorites-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.favorites-btn.active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.favorites-btn.active:hover {
    background: #c82333;
    border-color: #bd2130;
}

.favorites-btn i {
    font-size: 1rem;
}

.favorites-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.25rem;
    text-align: center;
}

.favorites-btn.active .favorites-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Enquiry Button */
.enquiry-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.enquiry-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #000;
}

.enquiry-btn i {
    font-size: 1rem;
}

/* Modal Close Button */
.btn-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.2s;
    z-index: 10;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close-modal:hover {
    background: #f8f9fa;
    color: #495057;
}

.btn-close-modal:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Sort Selector */
.sort-selector-wrapper {
    position: relative;
}

.sort-selector-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.sort-selector-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.sort-selector-btn.active {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.sort-selector-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.sort-selector-btn.active i {
    transform: rotate(180deg);
}

.sort-selector-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sort-selector-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.sort-selector-dropdown.show {
    display: block;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: left;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option:hover {
    background: #f8f9fa;
    color: #000;
}

.sort-option.active {
    background: #f0f7ff;
    color: #0066cc;
    font-weight: 500;
}

.sort-option i:first-child {
    width: 1rem;
    text-align: center;
    color: #6c757d;
}

.sort-option.active i:first-child {
    color: #0066cc;
}

.sort-option span {
    flex: 1;
}

.sort-check {
    display: none;
    color: #0066cc;
    font-size: 0.875rem;
}

.sort-option.active .sort-check {
    display: block;
}

.listings-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.listings-count {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover {
    background: #000;
    color: white;
    border-color: #000;
}

.listings-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 1rem;
    align-content: start; /* Prevent rows from stretching to fill height */
}

/* List View Styles */
.listings-content.list-view {
    grid-template-columns: 1fr; /* 1 column for list view */
}

.listings-content.list-view .property-card {
    height: auto;
    min-height: 200px;
}

.listings-content.list-view .property-card-link {
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 200px;
}

.listings-content.list-view .property-image {
    width: 300px;
    min-width: 300px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
}

.listings-content.list-view .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}

.listings-content.list-view .property-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 1rem;
}

/* Pagination Controls */
.pagination-controls {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.pagination-mode {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.infinite-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 500;
}

.infinite-scroll-indicator i {
    color: #28a745;
}

/* Infinite Scroll Loading */
.infinite-scroll-loading {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6c757d;
}

.loading-spinner i {
    font-size: 1.2rem;
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.property-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.property-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-badges {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.property-badges-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.sale-badge {
    background: #dc3545;
    color: white;
}

.rent-badge {
    background: #28a745;
    color: white;
}

.type-badge {
    background: #6c757d;
    color: white;
}

.premium-badge {
    background: #0d6efd;
    color: white;
}

/* List View Badges */
.list-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.list-badge.sale-badge {
    background: #dc3545;
    color: white;
}

.list-badge.rent-badge {
    background: #28a745;
    color: white;
}

.list-badge.type-badge {
    background: #6c757d;
    color: white;
}

/* List View Badge Layout */
.list-property-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.list-property-badges-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-property-badges-right {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.property-details {
    padding: 1rem;
    padding-bottom: 0.5rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.property-location {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.property-price {
    margin-bottom: 0.5rem;
}

.sale-price {
    font-weight: 600;
    color: #dc3545;
    font-size: 1.1rem;
}

.rent-price {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1rem;
}

.property-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.property-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Property Actions (Favorite Button) */
.property-actions {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 20;
}

.favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn.active {
    color: #dc3545;
}

.favorite-btn.active i.fa-heart {
    color: #dc3545;
}

/* View Button */
.property-view-btn {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-view-property {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view-property:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-view-property i {
    font-size: 1rem;
}

/* List View Favorite Button */
.list-property-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.list-property-actions .favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.list-property-actions .favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.list-property-actions .favorite-btn.active {
    color: #dc3545;
}

.list-property-actions .favorite-btn.active i.fa-heart {
    color: #dc3545;
}

/* List Property Card Layout */
.list-property-item {
    margin-bottom: 1rem;
}

.list-property-card {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    min-height: 200px;
}

.list-property-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.list-property-image {
    width: 400px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.list-property-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}

.list-property-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-property-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.list-property-header {
    margin-bottom: 1rem;
}

.list-property-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.list-property-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.list-property-title a:hover {
    color: #3498db;
}

.list-property-location {
    color: #7f8c8d;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-property-features {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.list-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.list-property-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.list-property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.list-property-prices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-price-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.list-price-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.list-price-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.list-view-details-btn {
    padding: 0.75rem 1.5rem;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.list-view-details-btn:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Search Interface */
.search-interface {
    height: calc(100vh - 80px);
    background: white;
    border-left: 1px solid #dee2e6;
}

.search-tabs {
    border-bottom: 1px solid #dee2e6;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
}

.search-tabs .nav-item {
    flex: 1 1 auto;
    min-width: 0;
}

.search-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 0.75rem 0.5rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
}

.search-tabs .nav-link.active {
    background: white;
    color: #000;
    border-bottom: 2px solid #000;
}

.tab-content {
    height: calc(100vh - 140px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-pane {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* AI Chat Styles */
.ai-chat-container {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* AI Avatar removed - no longer needed */

.ai-greeting h5 {
    margin: 0;
    font-size: 1.1rem;
}

.ai-greeting p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.ai-chat-input {
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.input-group .form-control {
    border: none;
    flex: 1;
    padding: 0.75rem;
}

.input-group .form-control:focus {
    box-shadow: none;
}

.voice-btn,
.image-btn,
.search-btn {
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-btn:hover,
.image-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.search-btn {
    background: #000;
    color: white;
}

.search-btn:hover {
    background: #333;
}

.ai-suggestions {
    margin-bottom: 1.5rem;
}

.ai-suggestions h6 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.suggestion-tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-tag {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.suggestion-tag:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.recent-searches h6 {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.recent-search-list {
    margin-bottom: 1rem;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.clear-all-btn:hover {
    color: #495057;
}

/* Chat Messages Styling - Use existing AI chat styling */
.chat-messages {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

/* Use existing AI chat message styling */
.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 13px;
}

.message.ai .message-content {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 18px 18px 18px 4px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.message-avatar {
    display: none; /* Hide all avatars for professional look */
}

/* Search Options Styling */
.search-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-option-tag {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: #495057;
}

/* Typing Indicator */
.typing-indicator {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    max-width: 85%;
    margin-right: auto;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}
.typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typing {
    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Classic Search Styles */
.classic-search-container {
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.status-buttons {
    display: flex;
    gap: 0.5rem;
}

.status-buttons .btn {
    flex: 1;
}

/* Pagination */
.listings-pagination {
    padding: 1rem;
    background: white;
    border-top: 1px solid #dee2e6;
}

.listings-pagination .pagination .page-link {
    color: #000;
    border-color: #dee2e6;
}

.listings-pagination .pagination .page-link:hover {
    color: #000;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.listings-pagination .pagination .page-item.active .page-link {
    background-color: #000;
    border-color: #000;
    color: white;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6c757d;
}

.loading-spinner-large i {
    font-size: 2rem;
}

/* Property Card Enhancements */
.property-card.highlighted {
    border: 2px solid #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Map Enhancements */
.property-map {
    transition: all 0.3s ease;
}

/* Marker Preview Styling */
.marker-preview {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
}

.marker-preview img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Google Maps InfoWindow Custom Styling */
.gm-style-iw {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    padding: 0 !important;
    outline: none !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
    border-radius: 12px !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

.gm-style-iw-t {
    border-radius: 12px !important;
    border: none !important;
    outline: none !important;
}

.gm-style-iw-t::after {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Hide default close button completely */
.gm-style-iw-tc {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.gm-style-iw-tc::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.gm-style-iw-tc::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide close button completely */
.gm-style-iw-tc .gm-style-iw-tc-icon {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.gm-style-iw-tc .gm-style-iw-tc-icon::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.gm-style-iw-tc .gm-style-iw-tc-icon::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Additional selectors for close button */
.gm-style-iw-tc .gm-style-iw-tc-icon img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide any close button elements */
.gm-style-iw-tc * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Custom InfoWindow styling */
.property-detail-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif !important;
}

/* Additional close button hiding */
.gm-style-iw-tc,
.gm-style-iw-tc *,
.gm-style-iw-tc::before,
.gm-style-iw-tc::after,
.gm-style-iw-tc .gm-style-iw-tc-icon,
.gm-style-iw-tc .gm-style-iw-tc-icon::before,
.gm-style-iw-tc .gm-style-iw-tc-icon::after,
.gm-style-iw-tc .gm-style-iw-tc-icon img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* Property InfoWindow specific styling */
.property-detail-card {
    z-index: 1000 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
}

.gm-style-iw-c {
    z-index: 1000 !important;
    position: relative !important;
}

.gm-style-iw {
    z-index: 1000 !important;
    position: relative !important;
    margin-top: 10px !important;
}

.gm-style-iw-t {
    /* Keep default positioning */
}

.gm-style-iw-t::after {
    /* Keep default positioning */
}

/* Property Detail Card (InfoWindow) */
.property-detail-card {
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    display: flex;
    border: none;
    outline: none;
}

.property-detail-image-container {
    position: relative;
    width: 150px;
    height: auto;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
}

.property-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail-content {
    flex: 1;
    padding: 3px 6px; /* Reduced vertical padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0 8px 8px 0;
}

.property-detail-title {
    font-weight: 600;
    font-size: 12px;
    color: #1a1a1a;
    margin-bottom: 1px; /* Reduced margin */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-detail-prices {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 1px; /* Reduced margin */
}

.property-detail-price-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.property-detail-price-value {
    font-weight: 700;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
}

.property-detail-price-value.sale {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.property-detail-price-value.rent {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.property-detail-price-label {
    font-size: 8px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-detail-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin-bottom: 2px; /* Reduced margin */
}

.property-detail-spec-item {
    text-align: center;
}

.property-detail-spec-label {
    color: #666;
    font-size: 8px;
    font-weight: 500;
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.property-detail-spec-value {
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 600;
}

.property-detail-location {
    color: #666;
    font-size: 9px;
    margin-bottom: 0; /* Removed margin */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Property Status Badges for InfoWindow */
.property-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.property-status-badge.sale-rent {
    background: #6c757d;
}

.property-status-badge.sale-only {
    background: #dc3545;
}

.property-status-badge.rent-only {
    background: #28a745;
}

/* Custom Marker Animation */
@keyframes markerPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Marker Clustering Styles */
.marker-cluster {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.marker-cluster:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.marker-cluster-large {
    background: rgba(220, 53, 69, 0.9);
    font-size: 14px;
}

.marker-cluster-medium {
    background: rgba(253, 126, 20, 0.9);
    font-size: 13px;
}

.marker-cluster-small {
    background: rgba(40, 167, 69, 0.9);
    font-size: 12px;
}

.property-card.highlighted .property-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    animation: markerPulse 2s infinite;
}

/* View Mode Transitions */
.listings-content {
    transition: all 0.3s ease;
}

/* Pagination removed - using infinite scroll only */

/* Mobile/Tablet Navigation Bar */
.mobile-column-nav {
    display: none; /* Hidden by default, shown on mobile/tablet via media query */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    justify-content: space-around;
    align-items: center;
}

.nav-column-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    flex: 1;
    max-width: 120px;
}

.nav-column-btn i {
    font-size: 1.25rem;
}

.nav-column-btn span {
    font-weight: 500;
}

.nav-column-btn:hover {
    color: #000;
    background: #f8f9fa;
}

.nav-column-btn.active {
    color: #000;
    background: #f8f9fa;
    border: 2px solid #000;
    border-radius: 0.5rem;
    font-weight: 600;
}

.nav-column-btn.active i {
    color: #000;
}

/* Flash animation for listings button */
.nav-column-btn.flash {
    animation: flashButton 0.6s ease-in-out 3;
    background: #fff3cd;
    border: 2px solid #ffc107;
}

@keyframes flashButton {
    0%,
    100% {
        background: #fff3cd;
        border-color: #ffc107;
        transform: scale(1);
    }
    50% {
        background: #ffc107;
        border-color: #ff9800;
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .map-column {
        width: 35%;
    }

    .listings-column {
        width: 50%;
    }

    .chat-column {
        width: 15%;
    }
}

@media (max-width: 992px) {
    /* Show mobile navigation */
    .mobile-column-nav {
        display: flex !important;
    }

    /* Adjust container to account for bottom nav */
    .search-results-container {
        padding-bottom: 70px;
    }

    /* Stack columns vertically but show only active one */
    .search-results-container .row {
        flex-direction: column;
    }

    /* Hide all columns by default on mobile/tablet */
    .map-column,
    .listings-column,
    .chat-column {
        width: 100%;
        height: calc(100vh - 155px);
        display: none !important;
        position: relative;
        float: none;
    }

    /* Show active column */
    .map-column.active-column,
    .listings-column.active-column,
    .chat-column.active-column {
        display: block !important;
    }

    .listings-container,
    .search-interface {
        height: calc(100vh - 155px);
        overflow: hidden;
    }

    .map-container {
        height: calc(100vh - 155px);
    }

    /* Ensure search interface content is visible */
    .search-interface {
        display: flex;
        flex-direction: column;
    }

    .search-interface .tab-content {
        height: calc(100vh - 200px);
        overflow-y: auto;
        flex: 1;
    }

    .search-interface .ai-chat-container,
    .search-interface .classic-search-container {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .search-interface .search-tabs {
        flex-shrink: 0;
    }

    .listings-content {
        grid-template-columns: 1fr;
    }

    .listings-content.list-view .property-card {
        flex-direction: column;
        height: auto;
    }

    .listings-content.list-view .property-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 992px) {
    .listings-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .listings-header-left {
        width: 100%;
    }

    .listings-header-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .listings-header {
        padding: 0.75rem;
    }

    .listings-header-right {
        gap: 0.5rem;
    }

    .enquiry-btn,
    .favorites-btn,
    .sort-selector-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
    }

    .enquiry-btn span,
    .favorites-btn span {
        display: none; /* Hide text on very small screens, show only icons */
    }

    .sort-selector-label {
        font-size: 0.8rem;
    }

    .view-controls {
        gap: 0.25rem;
    }

    .view-btn {
        padding: 0.4rem;
        min-width: 40px;
    }

    .pagination-mode {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .infinite-scroll-indicator {
        font-size: 0.8rem;
    }

    /* List view responsive on mobile */
    .list-property-card {
        flex-direction: column;
    }

    .list-property-image {
        width: 100%;
        height: 250px;
    }

    .list-property-content {
        padding: 1rem;
    }

    .list-property-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .list-view-details-btn {
        width: 100%;
        text-align: center;
    }
}

/* ลบ padding/margin ที่ Google ใส่มา */
.gm-style-iw,
.gm-style-iw-d {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* ล็อก content ให้ไม่ยืดเกิน */
.gm-style-iw-d > div {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
}

/* ถ้ามี div custom ของคุณเอง */
.custom-info-window {
    width: 250px;
    max-width: 250px;
    box-sizing: border-box;
}
