/* ========================================
   MOBILE VIEWPORT & ZOOM PREVENTION
======================================== */

/* Prevent double-tap zoom on mobile */
* {
    touch-action: manipulation;
}

/* Allow map to be interactive */
#property-map,
.gm-style,
.gm-style > div {
    touch-action: pan-x pan-y pinch-zoom !important;
}

/* ========================================
   HEADER & NAVIGATION STYLES
   (From main.css for navbar consistency)
======================================== */

.carlton-header {
    background: var(--carlton-primary);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.carlton-navbar {
    padding: 0;
}

.navbar-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.navbar-brand .logo {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.navbar-brand .logo:hover {
    transform: scale(1.05);
}

/* Hamburger Menu Button */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: var(--transition);
}

.navbar-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: var(--transition);
}

.navbar-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-item {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-item.active {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-lg);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-btn {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}


/* ========================================
   PROPERTY SEARCH SPECIFIC STYLES
======================================== */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    padding-top: 80px;
}

.property-search-container {
    display: flex;
    min-height: calc(100vh - 80px);
    position: relative;
}

/* Sidebar Styles */
.search-sidebar {
    width: 600px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    overflow: hidden;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: transform 0.3s ease;
}

.search-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
    left: 0;
}

.search-sidebar.collapsed ~ .map-container {
    margin-left: 0;
    width: 100%;
}

/* Header */
.sidebar-header {
    padding: 1.5rem;
    background: var(--carlton-primary);
    color: var(--white);
    flex-shrink: 0;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.sidebar-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Search Filters - Scrolls with results */
.search-filters {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.filter-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--carlton-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--carlton-accent);
    box-shadow: 0 0 0 3px rgba(255, 224, 0, 0.1);
}

/* Price Range */
.price-range-container {
    display: flex;
    gap: 1rem;
}

.price-range-container .filter-input {
    flex: 1;
}

/* Custom Autocomplete Dropdown */
.filter-group:has(.custom-autocomplete-dropdown) {
    z-index: 10001;
}

.custom-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--carlton-accent);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: -1px;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
    color: var(--dark-text);
    border-bottom: 1px solid var(--gray-200);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--carlton-accent);
    color: var(--carlton-primary);
    font-weight: 500;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    background: var(--gray-200);
}

.filter-chip.active {
    background: var(--carlton-accent);
    border-color: var(--carlton-accent);
    color: var(--carlton-primary);
    font-weight: 600;
}

/* Amenities */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.amenity-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.amenity-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.amenity-checkbox label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Action Buttons */
.filter-actions {
    padding: 1rem 0;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 2px solid var(--gray-200);
    border-bottom: 2px solid var(--gray-200);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex !important;
    gap: 1rem;
    background: transparent;
}

.btn-search,
.btn-reset {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search {
    background: var(--carlton-accent);
    color: var(--carlton-primary);
}

.btn-search:hover {
    background: var(--carlton-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 224, 0, 0.3);
}

.btn-reset {
    background: var(--gray-200);
    color: var(--carlton-primary);
}

.btn-reset:hover {
    background: var(--gray-300);
}

/* Results List - Scrolls together with filters */
.results-container {
    max-height: none;
    overflow-y: visible;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 0.5rem 1.5rem 0.5rem;
}

.result-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-card.highlighted {
    border: 2px solid #1A73E8;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.3);
    transform: translateY(-2px);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(-2px) scale(1.02); }
}

.result-card-image-wrapper {
    position: relative;
}

.result-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.listing-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.listing-badge-sale {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.listing-badge-rent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.result-card-content {
    padding: 1rem;
}

.result-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--carlton-primary);
    margin-bottom: 0.5rem;
}

.result-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--carlton-secondary);
    margin-bottom: 0.5rem;
}

.result-card-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-bottom: 0.5rem;
}

.result-card-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-bottom: 0.75rem;
}

.result-card-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--carlton-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.result-card-btn:hover {
    background: var(--carlton-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 26, 46, 0.3);
}

.result-card-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.result-card-btn:hover i {
    transform: translateX(3px);
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
    min-width: 0; /* Fix flexbox issue */
}

#property-map {
    width: 100%;
    height: 100%;
    background-color: #e5e3df; /* Google Maps default background */
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.map-control-btn {
    background: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.map-control-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.map-control-btn i {
    font-size: 1.2rem;
    color: var(--carlton-primary);
}

/* Toggle Sidebar Button */
.toggle-sidebar-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 150;
    background: var(--carlton-primary);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-sidebar-btn:hover {
    background: var(--carlton-primary-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Property Counter */
.property-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: var(--carlton-primary);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-counter .count {
    color: var(--carlton-accent);
    font-weight: 700;
}

/* Custom Map Marker Styles */
.property-marker {
    background: var(--carlton-accent);
    color: var(--carlton-primary);
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.property-marker .marker-currency {
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.85;
}

.property-marker:hover {
    background: var(--carlton-accent-light);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.property-marker.selected {
    background: var(--carlton-primary);
    color: var(--carlton-accent);
    transform: scale(1.15);
}

/* Cluster Marker Styles */
.cluster-marker {
    background: linear-gradient(135deg, var(--carlton-primary) 0%, var(--carlton-primary-light) 100%);
    color: var(--carlton-accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid var(--carlton-accent);
}

.cluster-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

/* Info Window Styles */
.property-info-window {
    max-width: 280px;
}

.info-window-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.info-window-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--carlton-primary);
    margin-bottom: 0.5rem;
}

.info-window-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--carlton-secondary);
}

.info-window-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-bottom: 0.75rem;
}

.info-window-btn {
    width: 100%;
    padding: 0.625rem;
    background: var(--carlton-accent);
    color: var(--carlton-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-window-btn:hover {
    background: var(--carlton-accent-light);
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--carlton-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   PROPERTY MODAL STYLES
======================================== */

.property-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.property-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.property-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.property-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.property-modal-close:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

.property-modal-close i {
    font-size: 1.2rem;
    color: var(--carlton-primary);
}

.property-modal-left {
    width: 45%;
    background: var(--carlton-primary);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.property-modal-image {
    border-radius: 12px;
    overflow: hidden;
}

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

.property-modal-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
}

.property-modal-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.property-modal-info-item:last-child {
    border-bottom: none;
}

.property-modal-info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--carlton-accent);
    letter-spacing: 0.5px;
}

.property-modal-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    text-align: right;
}

.property-modal-share {
    width: 100%;
    padding: 0.875rem;
    background: var(--carlton-accent);
    color: var(--carlton-primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.property-modal-share:hover {
    background: var(--carlton-accent-light);
    transform: translateY(-2px);
}

.property-modal-agent {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-modal-agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--carlton-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.property-modal-agent-avatar i {
    font-size: 1.5rem;
    color: var(--carlton-primary);
}

.property-modal-agent-info {
    text-align: center;
}

.property-modal-agent-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.property-modal-agent-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--carlton-accent);
    letter-spacing: 0.5px;
}

.property-modal-agent-actions {
    display: flex;
    gap: 0.75rem;
}

.property-modal-agent-btn {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.property-modal-agent-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.property-modal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
}

.property-modal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.property-modal-stat i {
    font-size: 1.5rem;
    color: var(--carlton-accent);
}

.property-modal-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.property-modal-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}

.property-modal-right {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.property-modal-section {
    margin-bottom: 2rem;
}

.property-modal-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--carlton-primary);
    margin-bottom: 1rem;
}

.property-modal-description {
    color: var(--carlton-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.property-modal-amenities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.property-modal-amenity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.property-modal-amenity-icon {
    font-size: 1.5rem;
}

.property-modal-amenity-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--carlton-primary);
}

.property-modal-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.property-modal-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.property-modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.property-modal-gallery-item img:hover {
    transform: scale(1.05);
}


/* ========================================
   MOBILE RESPONSIVE STYLES
======================================== */

@media (max-width: 768px) {
    /* Navbar Mobile Styles */
    .navbar-container {
        height: 70px;
        padding: 0 1rem;
        position: relative;
    }
    
    /* Show hamburger button on mobile */
    .navbar-hamburger {
        display: flex;
    }
    
    /* Mobile dropdown menu */
    .navbar-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--carlton-primary);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: var(--shadow-2xl);
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-item {
        width: 100%;
        padding: 1rem 1.25rem;
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
        justify-content: flex-start;
    }
    
    .nav-item:last-child {
        margin-bottom: 0;
    }
    
    .navbar-actions {
        gap: 0.5rem;
    }
    
    .language-btn span, .login-btn span {
        display: none;
    }

    /* Property Search Mobile Styles */
    body {
        overflow: hidden;
        height: 100vh;
        padding-top: 60px;
    }

    /* Header adjustments for mobile */
    .carlton-header {
        height: 60px;
    }

    .navbar-container {
        height: 60px;
    }

    .property-search-container {
        flex-direction: column;
        height: calc(100vh - 60px);
        overflow: hidden;
    }

    /* Map on top - more space */
    .map-container {
        width: 100%;
        height: 60vh;
        margin-left: 0 !important;
        position: relative;
        flex-shrink: 0;
        order: 1;
    }

    #property-map {
        width: 100%;
        height: 100%;
        min-height: 60vh;
    }

    /* Search sidebar on bottom - less space but enough for cards */
    .search-sidebar {
        width: 100%;
        height: 45vh;
        max-height: 45vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
        transform: none;
        transition: none;
        order: 2;
        overflow: hidden;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .search-sidebar.mobile-open,
    .search-sidebar.collapsed {
        transform: none;
        position: fixed;
        bottom: 0;
        height: 45vh;
        max-height: 45vh;
    }
    
    /* Minimized sidebar state when map is in use */
    .search-sidebar.minimized {
        height: 60px !important;
        max-height: 60px !important;
        transition: height 0.3s ease, max-height 0.3s ease;
    }
    
    .search-sidebar.minimized .search-filters,
    .search-sidebar.minimized .results-container,
    .search-sidebar.minimized .filter-actions {
        display: none;
    }
    
    .search-sidebar.minimized .sidebar-header {
        padding: 1rem 1.25rem;
        cursor: pointer;
    }
    
    .search-sidebar.minimized .sidebar-header h1 {
        font-size: 1rem;
        margin-top: 0;
    }
    
    .search-sidebar.minimized .sidebar-header p {
        display: none;
    }
    
    /* Make drag handle more prominent when minimized */
    .search-sidebar.minimized .sidebar-header::before {
        width: 60px;
        height: 5px;
        background: rgba(255, 255, 255, 0.8);
        top: 10px;
    }
    
    /* Add expand indicator when minimized */
    .search-sidebar.minimized .sidebar-header::after {
        content: 'Tap to expand ▲';
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    /* Add subtle animation to indicate interactivity */
    .search-sidebar.minimized .sidebar-header {
        animation: pulse-hint 2s ease-in-out infinite;
    }
    
    @keyframes pulse-hint {
        0%, 100% {
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
        }
        50% {
            box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.3);
        }
    }

    /* Remove mobile overlay - not needed for split screen */
    body.sidebar-open::before {
        display: none;
    }

    /* Hide toggle button on mobile - not needed */
    .toggle-sidebar-btn {
        display: none !important;
    }
    
    /* Ensure map container takes full height */
    .map-container, .map-container-full {
        height: 100vh !important;
        min-height: 100vh !important;
        width: 100% !important;
        border-radius: 0 !important;
        touch-action: pan-x pan-y pinch-zoom !important;
    }
    
    /* Map element mobile optimization */
    #property-map {
        width: 100% !important;
        height: 100% !important;
        touch-action: pan-x pan-y pinch-zoom !important;
    }
    
    /* Ensure property search container is full screen on mobile */
    .property-search-container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        touch-action: pan-y;
    }
    
    /* Prevent zoom on buttons and inputs */
    button, input, select, textarea {
        touch-action: manipulation;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Sidebar Header */
    .sidebar-header {
        padding: 0.75rem 1rem;
        position: relative;
    }
    
    /* Add drag handle indicator for mobile */
    .sidebar-header::before {
        content: '';
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
    }

    .sidebar-header h1 {
        font-size: 0.85rem;
        margin-bottom: 0;
        margin-top: 0.2rem;
    }

    .sidebar-header p {
        display: none;
    }

    /* Search Filters - All content scrolls together */
    .search-filters {
        padding: 1rem;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(45vh - 80px);
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }

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

    .filter-group label {
        font-size: 0.85rem;
    }

    .filter-input,
    .filter-select {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    /* Custom Autocomplete Mobile */
    .custom-autocomplete-dropdown {
        max-height: 200px;
        font-size: 0.9rem;
    }

    .autocomplete-item {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Filter Chips */
    .filter-chips {
        gap: 0.4rem;
    }

    .filter-chip {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Price Range */
    .price-range-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Amenities Grid */
    .amenities-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .amenity-checkbox {
        font-size: 0.9rem;
    }

    /* Results Container - Two columns on Mobile */
    .results-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        max-height: none;
        overflow-y: visible;
        padding: 0;
        margin-top: 1rem;
    }

    .result-card {
        border-radius: 10px;
        margin-bottom: 0;
    }

    .result-card-image {
        height: 120px;
        border-radius: 10px 10px 0 0;
    }
    
    .result-card-content {
        padding: 0.65rem;
    }
    
    .result-card-title {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }
    
    .result-card-price {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .result-card-details {
        font-size: 0.7rem;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    
    .result-card-location {
        font-size: 0.7rem;
        margin-top: 0.4rem;
    }
    
    .result-card-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .result-card-btn i {
        font-size: 0.7rem;
    }
    
    .listing-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .result-card-content {
        padding: 0.875rem;
    }

    .result-card-price {
        font-size: 1.1rem;
    }

    .result-card-title {
        font-size: 0.95rem;
    }

    .result-card-details {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .result-card-location {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .result-card-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .listing-badge {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    /* Filter Actions */
    .filter-actions {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .btn-search,
    .btn-reset {
        padding: 0.625rem;
        font-size: 0.85rem;
    }

    /* Map Controls */
    .map-controls {
        top: 15px;
        right: 15px;
        gap: 0.75rem;
    }

    .map-control-btn {
        width: 40px;
        height: 40px;
    }

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

    /* Property Counter */
    .property-counter {
        bottom: 10px;
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
        max-width: calc(100% - 30px);
        left: 15px;
        right: 15px;
        transform: none;
    }

    .property-counter .count {
        font-size: 1rem;
    }

    /* Sort Options */
    #sort-options {
        font-size: 0.85rem;
        padding: 0.4rem;
    }

    /* Property Count */
    #property-count {
        font-size: 1rem;
    }

    /* Advanced Toggle Button */
    .section-toggle {
        font-size: 0.9rem !important;
        padding: 0.625rem !important;
    }

    /* Info Window */
    .property-info-window {
        max-width: 240px;
    }

    .info-window-image {
        height: 120px;
    }

    .info-window-price {
        font-size: 1.1rem;
    }

    .info-window-title {
        font-size: 0.9rem;
    }

    .info-window-details {
        font-size: 0.8rem;
        gap: 0.75rem;
    }

    .info-window-btn {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Cluster Markers */
    .cluster-marker {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    /* Property Markers */
    .property-marker {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .toggle-sidebar-btn {
        width: 45px;
        height: 45px;
    }

    .sidebar-header h1 {
        font-size: 1.2rem;
    }

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

    .filter-chip {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    .result-card-image {
        height: 160px;
    }

    .map-control-btn {
        width: 38px;
        height: 38px;
    }

    .map-control-btn i {
        font-size: 0.95rem;
    }

    .property-counter {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

    .cluster-marker {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .property-marker {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .search-sidebar {
        max-height: 100vh;
    }

    .results-container {
        max-height: calc(100vh - 250px);
    }

    .sidebar-header {
        padding: 1rem;
    }

    .sidebar-header h1 {
        font-size: 1.2rem;
    }

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

    /* Property Modal Mobile */
    .property-modal {
        padding: 0;
    }

    .property-modal-content {
        flex-direction: column;
        max-height: 100vh;
        border-radius: 0;
    }

    .property-modal-left {
        width: 100%;
        max-height: 40vh;
        padding: 1rem;
    }

    .property-modal-image img {
        height: 200px;
    }

    .property-modal-info {
        padding: 1rem;
    }

    .property-modal-agent {
        padding: 1rem;
    }

    .property-modal-agent-actions {
        flex-direction: column;
    }

    .property-modal-stats {
        padding: 1rem;
    }

    .property-modal-right {
        padding: 1rem;
    }

    .property-modal-amenities {
        grid-template-columns: 1fr;
    }

    .property-modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .property-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   PROPERTY POPUP
======================================== */

.property-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--carlton-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-close:hover {
    background: white;
    transform: scale(1.1);
}

.popup-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.popup-details {
    padding: 30px;
}

.popup-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--carlton-primary);
    margin: 0 0 12px 0;
}

.popup-location {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-location i {
    color: var(--carlton-accent);
}

.popup-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--carlton-primary);
    margin: 0 0 24px 0;
}

.popup-info {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.popup-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
}

.popup-info i {
    color: var(--carlton-accent);
    font-size: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popup-image {
        height: 250px;
    }

    .popup-details {
        padding: 20px;
    }

    .popup-title {
        font-size: 22px;
    }

    .popup-price {
        font-size: 26px;
    }

    .popup-info {
        flex-direction: column;
        gap: 12px;
    }

    .popup-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* ========================================
   GOOGLE MAPS INFO WINDOW FIXES
======================================== */

/* Fix info window overflow and visibility issues */
.gm-style .gm-style-iw-c {
    max-height: none !important;
    padding: 12px !important;
}

.gm-style .gm-style-iw-d {
    overflow: visible !important;
    max-height: none !important;
}

.gm-style .gm-style-iw {
    overflow: visible !important;
}

/* Ensure close button is always visible */
.gm-style .gm-style-iw-t button {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix info window content */
.property-info-window {
    max-width: 280px;
    overflow: visible !important;
}

/* Hide the default Google Maps arrow - we'll use custom arrows */
.gm-style .gm-style-iw-tc {
    display: none !important;
}

/* Custom downward arrow for normal position (info window above marker) */
.gm-style .gm-style-iw-c:not(.info-window-flipped)::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
    z-index: 1;
}

/* Custom upward arrow for flipped position (info window below marker) */
.gm-style .gm-style-iw-c.info-window-flipped::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid white;
    filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, 0.15));
    z-index: 1;
}

/* Mobile responsive info window adjustments */
@media (max-width: 768px) {
    /* Reduce info window max width on mobile */
    .property-info-window {
        max-width: 260px;
    }
    
    /* Adjust info window padding for mobile */
    .gm-style .gm-style-iw-c {
        padding: 10px !important;
        max-width: 90vw !important;
    }
    
    /* Smaller arrows on mobile */
    .gm-style .gm-style-iw-c:not(.info-window-flipped)::after {
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid white;
        bottom: -9px;
    }
    
    .gm-style .gm-style-iw-c.info-window-flipped::after {
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid white;
        top: -9px;
    }
    
    /* Adjust info window content for mobile */
    .info-window-image {
        max-height: 120px;
        object-fit: cover;
    }
    
    .info-window-title {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .info-window-price {
        font-size: 18px;
    }
    
    .info-window-details {
        font-size: 12px;
        gap: 8px;
    }
    
    .info-window-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
