/* ===================================
   HOMESCOUT JA - MODERN DESIGN SYSTEM
   =================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors - Modern, sophisticated palette */
    --primary-50: #f0f7ff;
    --primary-100: #e0efff;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-900: #1e3a8a;
    
    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;
    
    --success-500: #10b981;
    --success-600: #059669;
    
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --error-500: #ef4444;
    --error-600: #dc2626;
    
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--neutral-900);
    background: var(--neutral-50);
    height: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Utility Classes */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===================================
   APP LAYOUT
   =================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--neutral-50);
}

/* ===================================
   HEADER - PROFESSIONAL DESIGN
   =================================== */

.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
}

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

/* Brand Section */
.header-brand {
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.brand-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral-600);
    line-height: 1;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 var(--space-8);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--neutral-100);
    padding: var(--space-1);
    border-radius: var(--radius-xl);
    box-shadow: inset 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: none;
    background: transparent;
    color: var(--neutral-600);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--neutral-900);
    background: rgba(255, 255, 255, 0.7);
}

.nav-item.active {
    background: white;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.nav-item i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.nav-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--error-500);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    opacity: 0;
    transition: all var(--transition-fast);
}

.nav-badge:not(:empty) {
    opacity: 1;
    transform: scale(1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--neutral-100);
    color: var(--neutral-600);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
}

.header-btn:hover {
    background: var(--neutral-200);
    color: var(--neutral-900);
    transform: translateY(-1px);
}

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

.header-analytics-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--primary-300);
    background: var(--primary-50);
    color: var(--primary-700);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.header-analytics-btn:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
    color: var(--primary-800);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.header-analytics-btn i {
    font-size: 1rem;
    color: var(--primary-600);
}



/* ===================================
   ZILLOW-STYLE TOP FILTERS BAR
   =================================== */

.top-filters-bar {
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) 0;
    position: sticky;
    top: 72px;
    z-index: var(--z-sticky);
}

.filters-row {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
}

.filter-input,
.filter-select {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    color: var(--neutral-900);
    transition: all var(--transition-fast);
    min-width: 140px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.filter-input:hover,
.filter-select:hover {
    border-color: var(--neutral-400);
}

.tab-buttons {
    display: flex;
    background: var(--neutral-100);
    border-radius: var(--radius-lg);
    padding: 2px;
    gap: 2px;
}

.tab-btn {
    padding: var(--space-3) var(--space-5);
    border: none;
    background: transparent;
    color: var(--neutral-600);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn.active {
    background: white;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    color: var(--neutral-900);
    background: rgba(255, 255, 255, 0.5);
}

.more-filters-btn,
.save-search-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--neutral-700);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.more-filters-btn:hover,
.save-search-btn:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
}

.save-search-btn {
    border-color: var(--primary-300);
    color: var(--primary-600);
}

.save-search-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
}

/* ===================================
   ZILLOW-STYLE MAIN LAYOUT
   =================================== */

.zillow-main-content {
    display: flex;
    height: calc(100vh - 140px); /* Account for header + filters */
    min-height: 600px;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
}

.map-section {
    flex: 0 0 60%;
    background: white;
    position: relative;
    border-right: 1px solid var(--neutral-200);
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.results-section {
    flex: 0 0 40%;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===================================
   RESULTS SECTION STYLES
   =================================== */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
    background: white;
    flex-shrink: 0;
}

.results-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sort-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    background: white;
    color: var(--neutral-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 140px;
}

.sort-select:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.properties-container {
    flex: 1;
    overflow-y: auto;
    background: var(--neutral-50);
}

.properties-list {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* ===================================
   ZILLOW-STYLE PROPERTY CARDS
   =================================== */

.property-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--neutral-200);
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-300);
}

.property-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--neutral-100);
    transition: transform var(--transition-slow);
}

.property-card:hover .property-image {
    transform: scale(1.03);
}

.property-content {
    padding: var(--space-4);
}

.property-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
    line-height: 1.2;
}

.property-address {
    color: var(--neutral-600);
    font-size: 0.875rem;
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.property-details {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
    font-size: 0.875rem;
    color: var(--neutral-600);
}

.property-detail {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.property-detail i {
    color: var(--primary-500);
    font-size: 0.8rem;
}

.property-days-ago {
    color: var(--neutral-500);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===================================
   MAP STYLES (UPDATED FOR ZILLOW LAYOUT)
   =================================== */

#map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);
    min-width: 140px;
}

/* Old filter styles removed - now using Zillow-style layout */

/* Old content area styles removed - now using Zillow-style layout */

/* Map View */
#map {
    height: 100%;
    min-height: 0;
    border-radius: var(--radius-2xl);
    position: relative;
}

/* Enhanced water color for deeper blue */
#map .leaflet-tile-pane {
    filter: saturate(1.5) contrast(1);
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    z-index: var(--z-dropdown);
    min-width: 160px;
}

.map-legend h4 {
    margin: 0 0 var(--space-3) 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-2);
    font-size: 0.75rem;
    color: var(--neutral-700);
    font-weight: 500;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-md);
    margin-right: var(--space-2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
}

.legend-low { background: var(--success-500); }
.legend-medium { background: var(--primary-500); }
.legend-high { background: var(--error-500); }
.legend-rent { background: var(--secondary-500); }
.legend-sale { background: var(--warning-500); }

.legend-note {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--neutral-200);
}

.legend-note small {
    color: var(--neutral-500);
    font-size: 0.625rem;
    font-style: italic;
    line-height: 1.4;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.map-load-more-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--primary-600);
    border: 1px solid var(--primary-200);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.map-load-more-btn:hover:not(:disabled) {
    background: var(--primary-500);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.map-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.map-extra-controls {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.map-control-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.map-control-btn:hover {
    background: var(--primary-500);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Old properties grid styles removed - now using Zillow-style layout */

/* ===================================
   FLOATING ACTION BUTTONS
   =================================== */

.floating-filters-btn {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-fixed);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-4) var(--space-6);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    display: none;
    gap: var(--space-2);
    align-items: center;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.floating-filters-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.floating-filters-btn:active {
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   MORE FILTERS MODAL STYLES
   =================================== */

.more-filters-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

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

.more-filters-modal .modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-2xl);
}

.more-filters-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.more-filters-modal .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
}

.more-filters-modal .modal-close {
    background: none;
    border: none;
    color: var(--neutral-500);
    cursor: pointer;
    font-size: 1.25rem;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.more-filters-modal .modal-close:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.more-filters-modal .modal-body {
    padding: var(--space-6);
}

.filter-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.filter-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--neutral-900);
    font-size: 0.875rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.price-inputs span {
    color: var(--neutral-500);
    font-weight: 500;
}

.price-input {
    flex: 1;
    padding: var(--space-3);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-top: 1px solid var(--neutral-200);
    background: var(--neutral-50);
}

.clear-filters-btn {
    background: none;
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-filters-btn:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
}

.apply-filters-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.apply-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================== */

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .header-actions {
        display: flex;
        gap: var(--space-2);
    }
    
    .header-analytics-btn span {
        display: none;
    }
    
    .header-analytics-btn {
        width: 44px;
        height: 44px;
        padding: var(--space-3);
        justify-content: center;
    }
    
    /* Mobile Zillow Layout */
    .top-filters-bar {
        position: static;
        padding: var(--space-3) 0;
    }
    
    .filters-row {
        padding: 0 var(--space-4);
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
        min-width: unset;
    }
    
    .tab-buttons {
        justify-content: center;
    }
    
    .zillow-main-content {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 200px);
    }
    
    .map-section {
        flex: none;
        height: 50vh;
        min-height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--neutral-200);
    }
    
    .results-section {
        flex: none;
        min-height: 50vh;
    }
    
    .floating-filters-btn {
        display: none; /* Hide on mobile since filters are accessible in top bar */
    }
    
    .header-container {
        padding: 0 var(--space-4);
        height: 64px;
    }
    
    .brand-title {
        font-size: 1.25rem;
    }
    
    .brand-tagline {
        font-size: 0.625rem;
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
    }
    
    .map-legend {
        bottom: var(--space-3);
        left: var(--space-3);
        padding: var(--space-3);
        border-radius: var(--radius-lg);
    }
    
    .map-controls {
        top: var(--space-3);
        right: var(--space-3);
    }
    
    .map-control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 var(--space-3);
    }
    
    .filters-row {
        padding: 0 var(--space-3);
    }
    
    .filter-input,
    .filter-select {
        font-size: 1rem;
        padding: var(--space-4);
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .more-filters-modal .modal-content {
        margin: var(--space-3);
        max-height: calc(100vh - 2rem);
    }
}

/* Large screens optimization */
@media (min-width: 1200px) {
    .header-container {
        padding: 0 var(--space-8);
        height: 80px;
    }
    
    .filters-row {
        padding: 0 var(--space-8);
    }
    
    .map-section {
        flex: 0 0 65%;
    }
    
    .results-section {
        flex: 0 0 35%;
    }
    
    .properties-list {
        padding: var(--space-6);
        gap: var(--space-5);
    }
    
    .property-card {
        padding: var(--space-6);
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .zillow-main-content {
        height: calc(100vh - 130px);
    }
    
    .property-image-container {
        height: 220px;
    }
}

/* ===================================
   LOADING STATES & ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.property-card {
    animation: fadeIn var(--transition-base) ease-out;
}

.view-container {
    animation: scaleIn var(--transition-base) ease-out;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    animation: fadeIn var(--transition-fast) ease-out;
}

.loading-spinner {
    text-align: center;
    color: var(--primary-600);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neutral-700);
}

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

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .property-card {
        border: 2px solid var(--neutral-900);
    }
    
    .view-btn.active {
        border: 2px solid var(--primary-600);
    }
}

/* Focus styles for keyboard navigation */
.property-card:focus {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}

.nav-item:focus,
.view-btn:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ===================================
   MODAL STYLES (Basic structure)
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    padding: var(--space-4);
    animation: fadeIn var(--transition-base) ease-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp var(--transition-base) ease-out;
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--neutral-200);
    background: var(--neutral-50);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
}

.modal-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--neutral-600);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--error-100);
    color: var(--error-600);
    transform: scale(1.05);
}

.modal-body {
    padding: var(--space-6);
}

/* ===================================
   PROPERTY DETAILS MODAL - NEW LAYOUT
   =================================== */

.property-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    min-height: 600px;
}

.property-detail-images {
    position: relative;
}

.property-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3);
    height: 100%;
}

.property-images-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--neutral-100);
    border-radius: var(--radius-2xl);
    color: var(--neutral-400);
    min-height: 400px;
}

.property-images-placeholder i {
    font-size: 4rem;
    margin-bottom: var(--space-4);
}

.property-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.property-price-section {
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--neutral-100);
}

/* Override existing styles for new layout */

.property-detail-header {
    margin-bottom: var(--space-6);
}

.property-detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.property-detail-title-content {
    flex: 1;
    min-width: 0;
}

.property-detail-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: var(--space-2);
    color: var(--neutral-900);
    line-height: 1.2;
}

.property-detail-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-600);
    margin-bottom: var(--space-3);
    line-height: 1;
}

.property-detail-address {
    color: var(--neutral-600);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.property-detail-address i {
    margin-right: var(--space-2);
    color: var(--primary-500);
    font-size: 1.25rem;
}

.property-detail-actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--neutral-50);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--neutral-200);
}

.property-detail-actions .bookmark-btn-modal,
.property-detail-actions .keez-listing-btn,
.property-detail-actions .share-btn-modal {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none;
    border: 2px solid transparent;
}

.bookmark-btn-modal {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-600);
    border: 2px solid var(--primary-300);
}

.bookmark-btn-modal:hover {
    background: var(--primary-500);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.bookmark-btn-modal.bookmarked {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.bookmark-btn-modal.bookmarked:hover {
    background: var(--error-500);
    border-color: var(--error-500);
}

.keez-listing-btn {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    border: 2px solid transparent;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.keez-listing-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    text-decoration: none;
    color: white;
}

.share-btn-modal {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-600);
    border: 2px solid var(--success-300);
}

.share-btn-modal:hover {
    background: var(--success-500);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.property-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.property-stat {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--neutral-50);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    border: 1px solid var(--neutral-200);
    transition: all var(--transition-fast);
}

.property-stat:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.property-stat i {
    margin-right: var(--space-2);
    color: var(--primary-500);
    width: 24px;
    font-size: 1.25rem;
}

.property-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.property-detail-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid var(--neutral-200);
}

.property-detail-image:hover {
    transform: scale(1.02);
    border-color: var(--primary-300);
    box-shadow: var(--shadow-lg);
}

.property-description-full {
    line-height: 1.7;
    color: var(--neutral-700);
    margin-bottom: var(--space-8);
    font-size: 1.125rem;
}

/* Property Description Toggle - Desktop */
.property-description {
    position: relative;
}

.description-toggle {
    background: none;
    border: none;
    color: var(--primary-600);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: var(--space-2) 0;
    margin-top: var(--space-2);
    display: none; /* Hidden on desktop by default, shown on mobile */
    align-items: center;
    gap: var(--space-2);
    transition: color 0.2s ease;
}

.description-toggle:hover {
    color: var(--primary-700);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

/* Show toggle on mobile and for long descriptions */
@media (max-width: 768px) {
    .description-toggle {
        display: flex;
    }
}

.property-features {
    margin-bottom: var(--space-8);
}

.property-features h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--neutral-900);
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3);
}

.feature-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--neutral-50);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--neutral-700);
    font-weight: 500;
    border: 1px solid var(--neutral-200);
    transition: all var(--transition-fast);
}

.feature-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.feature-item i {
    margin-right: var(--space-2);
    color: var(--primary-500);
    width: 18px;
    font-size: 1rem;
}

/* ===================================
   LEAFLET CUSTOM POPUP STYLES - OPTIMIZED
   =================================== */

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e5e5;
    overflow: visible !important;
    background: white;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
    font-size: 14px;
    overflow: visible !important;
}

.popup-content {
    background: white;
    min-width: 280px;
    max-width: 300px;
    overflow: visible !important;
    position: relative;
}

/* Compact Popup Styles */
.popup-content-compact {
    background: white;
    width: 240px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.popup-header {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.popup-image-compact {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.popup-type-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    color: white;
    backdrop-filter: blur(4px);
}

.popup-type-badge.rent {
    background: rgba(16, 185, 129, 0.9);
}

.popup-type-badge.sale {
    background: rgba(59, 130, 246, 0.9);
}

.popup-info-compact {
    padding: 8px 12px;
}

.popup-price-compact {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.2;
}

.popup-address-compact {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.popup-address-compact i {
    margin-right: 4px;
    color: #3b82f6;
    width: 10px;
    font-size: 0.7rem;
}

.popup-details-compact {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.popup-details-compact i {
    margin-right: 2px;
    color: #3b82f6;
    width: 10px;
    font-size: 0.65rem;
}

.popup-actions-compact {
    display: flex;
    gap: 6px;
    padding: 0 12px 10px;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: transform 0.2s ease;
}

.popup-btn-primary:hover {
    transform: translateY(-1px);
}

.popup-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* Mobile Property Bottom Sheet */
.mobile-property-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-property-sheet.active {
    pointer-events: all;
    opacity: 1;
}

.sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 40vh;
    min-height: 160px;
}

.mobile-property-sheet.active .sheet-content {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 8px auto 12px;
}

.sheet-header {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.sheet-image-container {
    position: relative;
    flex-shrink: 0;
}

.sheet-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
}

.sheet-type-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    color: white;
    border: 2px solid white;
}

.sheet-type-badge.rent {
    background: #10b981;
}

.sheet-type-badge.sale {
    background: #3b82f6;
}

.sheet-info {
    flex: 1;
    min-width: 0;
}

.sheet-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.2;
}

.sheet-address {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 6px;
    font-weight: 500;
    word-break: break-word;
}

.sheet-details {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
}

.sheet-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.sheet-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sheet-btn-primary:active {
    transform: scale(0.98);
}

.sheet-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 100px;
}

.sheet-btn-secondary:active {
    background: #e5e7eb;
    transform: scale(0.98);
}

/* Multi-Select Property Type Filter */
.property-type-filter {
    position: relative;
}

.property-type-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: white;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: space-between;
}

.property-type-btn:hover {
    border-color: var(--primary-400);
}

.property-type-btn.active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.selected-count {
    background: var(--primary-500);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.property-type-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-top: 4px;
    max-height: 350px;
    overflow-y: auto;
    min-width: 280px;
}

.quick-select-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    padding: var(--space-3);
    border-bottom: 1px solid var(--neutral-200);
}

.quick-select-btn {
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    text-align: center;
}

.quick-select-btn:hover {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-color: var(--primary-300);
    color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clear-all-btn {
    background: linear-gradient(135deg, var(--red-50), var(--red-100));
    border-color: var(--red-200);
    color: var(--red-700);
    grid-column: 1 / -1;
}

.clear-all-btn:hover {
    background: linear-gradient(135deg, var(--red-100), var(--red-200));
    border-color: var(--red-300);
}

.property-type-groups {
    padding: var(--space-3);
    max-height: 240px;
    overflow-y: auto;
}

.property-group {
    margin-bottom: var(--space-3);
}

.property-group:last-child {
    margin-bottom: 0;
}

.property-group h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-2);
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--neutral-200);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.property-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--neutral-700);
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    margin: 1px 0;
}

.property-checkbox:hover {
    color: var(--neutral-900);
    background: var(--neutral-50);
}

.property-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--neutral-300);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.property-checkbox:hover .checkmark {
    border-color: var(--primary-400);
}

.property-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.property-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.popup-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
    border: none;
    border-radius: 0;
}

.popup-info {
    padding: 16px;
}

.popup-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 8px;
    line-height: 1.2;
}

.popup-address {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.popup-address i {
    margin-right: 6px;
    color: #3b82f6;
    width: 12px;
    font-size: 0.8rem;
}

.popup-details {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.popup-days-ago {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.popup-days-ago i {
    color: #aaa;
    font-size: 0.7rem;
}

.popup-detail {
    display: flex;
    align-items: center;
}

.popup-detail i {
    margin-right: 4px;
    color: #3b82f6;
    width: 12px;
    font-size: 0.8rem;
}

.popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.popup-view-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: transform 0.2s ease;
}

.popup-view-btn:hover {
    transform: translateY(-1px);
}

.popup-compare-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.popup-compare-btn:hover {
    transform: translateY(-1px);
}

/* Marker Hover Cards - Optimized */
.hover-card.v2 {
    width: 320px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e5e5;
}

.hover-card.v2 .hover-img {
    position: relative;
    height: 160px;
    background: #f5f5f5;
}

.hover-card.v2 .hover-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hover-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.7);
}

.hover-days-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    color: #333;
    background: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hover-badge.sale {
    background: rgba(245, 158, 11, 0.9);
}

.hover-badge.rent {
    background: rgba(139, 92, 246, 0.9);
}

.hover-price-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hover-info {
    padding: 16px;
}

.hover-title {
    color: #333;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hover-specs {
    display: flex;
    gap: 12px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===================================
   IMAGE GALLERY LIGHTBOX STYLES
   =================================== */

.image-gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity var(--transition-base, 0.3s) ease;
}

.image-gallery-overlay.active {
    display: flex;
    opacity: 1;
}

.image-gallery-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 90vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-gallery-main {
    width: 100%;
    height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.5));
    background: rgba(255, 255, 255, 0);
}

.image-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-full, 50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--neutral-700, #374151);
    transition: all var(--transition-fast, 0.15s) ease;
    z-index: 10;
}

.image-gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.image-gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.image-gallery-prev {
    left: 20px;
}

.image-gallery-next {
    right: 20px;
}

.image-gallery-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-full, 50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--neutral-700, #374151);
    transition: all var(--transition-fast, 0.15s) ease;
}

.image-gallery-close:hover {
    background: var(--error-500, #ef4444);
    color: white;
    transform: scale(1.1);
}

.image-gallery-counter {
    position: absolute;
    top: -50px;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--space-2, 8px) var(--space-4, 16px);
    border-radius: var(--radius-lg, 12px);
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.image-gallery-thumbnails {
    display: flex;
    gap: var(--space-2, 8px);
    margin-top: var(--space-4, 16px);
    max-width: 100%;
    overflow-x: auto;
    padding: var(--space-2, 8px);
    scroll-behavior: smooth;
}

.image-gallery-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    opacity: 0.6;
    transition: all var(--transition-fast, 0.15s) ease;
    border: 2px solid transparent;
}

.image-gallery-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.image-gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-500, #3b82f6);
    transform: scale(1.1);
}

.image-gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    display: none;
}

.image-gallery-loading.active {
    display: block;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .image-gallery-container {
        width: 95vw;
        height: 95vh;
    }
    
    .image-gallery-main {
        height: 70vh;
    }
    
    .image-gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .image-gallery-prev {
        left: 15px;
    }
    
    .image-gallery-next {
        right: 15px;
    }
    
    .image-gallery-close,
    .image-gallery-counter {
        top: -45px;
    }
    
    .image-gallery-thumbnails {
        gap: var(--space-1, 4px);
    }
    
    .image-gallery-thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .image-gallery-prev {
        left: 10px;
    }
    
    .image-gallery-next {
        right: 10px;
    }
    
    .image-gallery-close {
        top: 10px;
        right: 10px;
    }
    
    .image-gallery-counter {
        top: 10px;
        left: 10px;
    }
}

.hover-spec i {
    color: #3b82f6;
    margin-right: 4px;
    width: 12px;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-overlay {
        padding: var(--space-2);
        align-items: flex-start;
        padding-top: var(--space-4);
    }
    
    .modal-content {
        margin: 0;
        max-height: calc(100vh - 4rem);
        border-radius: var(--radius-xl);
        width: 100%;
        max-width: 100%;
    }
    
    .modal-header {
        padding: var(--space-3) var(--space-4);
        border-bottom: 1px solid var(--neutral-200);
    }
    
    .modal-title {
        font-size: 1.125rem;
        line-height: 1.4;
        margin: 0;
        padding-right: var(--space-2);
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: var(--space-4);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .property-detail-layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        min-height: auto;
    }
    
    .property-images-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
        max-height: 400px;
        overflow-y: auto;
    }
    
    .property-images-gallery img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: var(--radius-lg);
    }
    
    .property-detail-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .property-detail-actions {
        flex-direction: column;
        gap: var(--space-3);
        margin-top: var(--space-4);
    }
    
    .property-detail-actions .bookmark-btn-modal,
    .property-detail-actions .keez-listing-btn,
    .property-detail-actions .share-btn-modal {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: var(--space-3);
        font-size: 0.9rem;
        border-radius: var(--radius-lg);
    }
    
    .property-detail-price {
        font-size: 1.5rem;
        line-height: 1.2;
        word-break: break-word;
        margin-bottom: var(--space-2);
    }
    
    .property-detail-title {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: var(--space-3);
    }
    
    .property-detail-stats {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .property-images {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    
    .property-detail-image {
        height: 150px;
    }
    
    .property-detail-location {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: var(--space-4);
        padding: var(--space-3);
        background: var(--neutral-50);
        border-radius: var(--radius-lg);
        border-left: 3px solid var(--primary-500);
    }
    
    .property-detail-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: var(--space-4);
    }
    
    .property-detail-meta {
        gap: var(--space-3);
        flex-wrap: wrap;
    }
    
    .property-detail-stat {
        flex: 1;
        min-width: 100px;
        padding: var(--space-3);
        text-align: center;
        background: var(--neutral-50);
        border-radius: var(--radius-lg);
    }
    
    .property-detail-stat-value {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--primary-600);
    }
    
    .property-detail-stat-label {
        font-size: 0.75rem;
        color: var(--neutral-600);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .modal-overlay {
        padding: var(--space-1);
        padding-top: var(--space-2);
    }
    
    .modal-content {
        max-height: calc(100vh - 2rem);
        border-radius: var(--radius-lg);
    }
    
    .modal-header {
        padding: var(--space-3);
    }
    
    .modal-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .modal-body {
        padding: var(--space-3);
    }
    
    .property-detail-price {
        font-size: 1.25rem;
    }
    
    .property-detail-title {
        font-size: 1rem;
    }
    
    .property-images-gallery {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .property-images-gallery img {
        height: 180px;
    }
    
    .property-detail-stats {
        grid-template-columns: 1fr;
    }
    
    .property-detail-actions .bookmark-btn-modal,
    .property-detail-actions .keez-listing-btn,
    .property-detail-actions .share-btn-modal {
        padding: var(--space-4);
        font-size: 1rem;
    }
}

/* Minimum Screen Width (320px) - Ultra Small Phones */
@media (max-width: 360px) {
    .modal-overlay {
        padding: 0;
        padding-top: var(--space-1);
    }
    
    .modal-content {
        max-height: calc(100vh - 1rem);
        border-radius: var(--radius-md);
        width: calc(100vw - 0.5rem);
        margin: 0 auto;
    }
    
    .modal-header {
        padding: var(--space-2) var(--space-3);
        border-bottom: 1px solid var(--neutral-200);
    }
    
    .modal-title {
        font-size: 0.9rem;
        line-height: 1.2;
        font-weight: 600;
        margin: 0;
        padding-right: var(--space-2);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: var(--space-2);
    }
    
    .property-detail-layout {
        gap: var(--space-3);
    }
    
    .property-detail-price {
        font-size: 1.125rem;
        line-height: 1.1;
        margin-bottom: var(--space-2);
        word-break: break-all;
    }
    
    .property-detail-title {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: var(--space-2);
    }
    
    .property-detail-location {
        font-size: 0.8rem;
        padding: var(--space-2);
        margin-bottom: var(--space-3);
        line-height: 1.3;
    }
    
    .property-images-gallery {
        grid-template-columns: 1fr;
        gap: var(--space-1);
        max-height: 250px;
        overflow-y: auto;
    }
    
    .property-images-gallery img {
        height: 140px;
        border-radius: var(--radius-md);
    }
    
    .property-detail-stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }
    
    .property-detail-stat {
        padding: var(--space-2);
        min-width: auto;
    }
    
    .property-detail-stat-value {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    .property-detail-stat-label {
        font-size: 0.7rem;
    }
    
    .property-detail-actions {
        gap: var(--space-2);
        margin-top: var(--space-3);
    }
    
    .property-detail-actions .bookmark-btn-modal,
    .property-detail-actions .keez-listing-btn,
    .property-detail-actions .share-btn-modal {
        padding: var(--space-3);
        font-size: 0.85rem;
        border-radius: var(--radius-md);
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .property-detail-description {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: var(--space-3);
    }
}

/* Absolute Minimum Screen Width (320px) - iPhone SE and smaller */
@media (max-width: 320px) {
    .modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
    }
    
    .modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        max-width: 100vw !important;
    }
    
    .modal-header {
        padding: var(--space-2);
        border-bottom: 1px solid var(--neutral-200);
        flex-shrink: 0;
    }
    
    .modal-title {
        font-size: 0.85rem;
        line-height: 1.1;
        font-weight: 600;
        margin: 0;
        padding-right: var(--space-1);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 40px);
    }
    
    .modal-close {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        padding: 0;
    }
    
    .modal-body {
        padding: var(--space-2) !important;
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    .property-detail-layout {
        gap: var(--space-2) !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    .property-detail-images,
    .property-detail-info {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    .property-detail-price {
        font-size: 1rem;
        line-height: 1.1;
        margin-bottom: var(--space-1);
        word-break: break-all;
        font-weight: 700;
        color: var(--primary-600);
    }
    
    .property-detail-title {
        font-size: 0.8rem;
        line-height: 1.2;
        margin-bottom: var(--space-2);
        font-weight: 500;
    }
    
    .property-detail-location {
        font-size: 0.75rem;
        padding: var(--space-1);
        margin-bottom: var(--space-2);
        line-height: 1.2;
        background: var(--neutral-50);
        border-radius: var(--radius-md);
        border-left: 2px solid var(--primary-500);
    }
    
    .property-images-gallery {
        grid-template-columns: 1fr;
        gap: var(--space-1);
        max-height: 200px;
        overflow-y: auto;
        margin-bottom: var(--space-2);
    }
    
    .property-images-gallery img {
        height: 120px;
        border-radius: var(--radius-sm);
        width: 100%;
        object-fit: cover;
    }
    
    .property-detail-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-1);
        margin-bottom: var(--space-2);
    }
    
    .property-detail-stat {
        padding: var(--space-1);
        background: var(--neutral-50);
        border-radius: var(--radius-sm);
        text-align: center;
        min-width: auto;
    }
    
    .property-detail-stat-value {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--primary-600);
        margin-bottom: 2px;
        line-height: 1;
    }
    
    .property-detail-stat-label {
        font-size: 0.65rem;
        color: var(--neutral-600);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1;
    }
    
    .property-detail-actions {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
        margin-top: var(--space-2);
        padding-bottom: var(--space-2);
    }
    
    .property-detail-actions .bookmark-btn-modal,
    .property-detail-actions .keez-listing-btn,
    .property-detail-actions .share-btn-modal {
        width: 100%;
        padding: var(--space-2);
        font-size: 0.8rem;
        border-radius: var(--radius-sm);
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .property-detail-description,
    .property-description {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: var(--space-2);
    }
    

    
    .description-content {
        font-size: 0.75rem;
        line-height: 1.3;
        padding: var(--space-1);
        background: var(--neutral-50);
        border-radius: var(--radius-sm);
    }
    
    .property-detail-address {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: var(--space-2);
        color: var(--neutral-600);
    }
    
    .property-detail-address i {
        color: var(--primary-500);
        margin-right: var(--space-1);
    }
    
    .property-stat {
        display: flex;
        align-items: center;
        gap: var(--space-1);
        padding: var(--space-1);
        background: var(--neutral-50);
        border-radius: var(--radius-sm);
    }
    
    .stat-icon {
        color: var(--primary-500);
        font-size: 0.75rem;
        width: 16px;
        flex-shrink: 0;
    }
    
    .stat-content {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }
    
    .stat-value {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--neutral-900);
        line-height: 1;
    }
    
    .stat-label {
        font-size: 0.65rem;
        color: var(--neutral-600);
        line-height: 1;
    }
    
    .property-price-section {
        margin-bottom: var(--space-2);
    }
    
    .property-detail-info {
        gap: var(--space-2);
    }
    
    .property-detail-images {
        margin-bottom: var(--space-2);
    }
    
    /* Compact meta information */
    .property-detail-meta {
        display: flex;
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .property-detail-meta-item {
        font-size: 0.75rem;
        padding: var(--space-1);
        background: var(--neutral-50);
        border-radius: var(--radius-sm);
    }
}

/* ===================================
   PROPERTY COMPARISON STYLES
   =================================== */

/* Comparison Modal */
.comparison-modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 1400px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp var(--transition-base) ease-out;
    box-shadow: var(--shadow-2xl);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    border-bottom: 1px solid var(--neutral-200);
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.comparison-header i {
    color: var(--primary-600);
    font-size: 1.25rem;
}

.comparison-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--neutral-700);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--error-50);
    border-color: var(--error-300);
    color: var(--error-600);
    transform: translateY(-1px);
}

.btn-secondary i {
    font-size: 0.875rem;
}

/* Comparison Container */
.comparison-container {
    padding: var(--space-6);
    min-height: 400px;
}

.comparison-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
    color: var(--neutral-500);
}

.comparison-empty i {
    font-size: 4rem;
    margin-bottom: var(--space-6);
    color: var(--neutral-300);
}

.comparison-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--neutral-600);
}

.comparison-empty p {
    font-size: 1rem;
    color: var(--neutral-500);
    max-width: 400px;
    line-height: 1.6;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    padding: var(--space-4);
}

/* Comparison Property Card */
.comparison-property {
    background: white;
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    height: fit-content;
    animation: slideUp var(--transition-base) ease-out;
}

.comparison-property:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.comparison-property-header {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--neutral-100);
}

.comparison-property-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.comparison-property:hover .comparison-property-header img {
    transform: scale(1.05);
}

.comparison-remove {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.comparison-remove:hover {
    background: var(--error-600);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.comparison-badges {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 5;
}

.comparison-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.comparison-badge-sale {
    background: rgba(245, 158, 11, 0.95);
}

.comparison-badge-rent {
    background: rgba(139, 92, 246, 0.95);
}

.comparison-days-badge {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--neutral-700);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.comparison-property-content {
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comparison-property-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comparison-property-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-600);
    margin-bottom: var(--space-2);
    line-height: 1.2;
    order: -1;
}

/* Comparison Features */
.comparison-features {
    flex: 1;
    margin-bottom: var(--space-4);
}

/* Comparison Actions */
.comparison-actions {
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--neutral-100);
}

.comparison-view-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
}

.comparison-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-700), var(--secondary-700));
}

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

.comparison-view-btn i {
    font-size: 0.875rem;
}

.comparison-feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--neutral-100);
    gap: var(--space-3);
}

.comparison-feature-row:last-child {
    border-bottom: none;
}

.comparison-feature-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neutral-600);
    flex-shrink: 0;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.comparison-feature-label i {
    color: var(--primary-500);
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
}

.comparison-feature-label span {
    font-weight: 600;
}

.comparison-feature-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-900);
    text-align: right;
    word-break: break-word;
}

/* Comparison Floating Button */
.comparison-floating-btn {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
    animation: slideUp var(--transition-base) ease-out;
}

.btn-comparison {
    background: linear-gradient(135deg, var(--success-600), var(--success-500));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.btn-comparison:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white !important;
}

.btn-comparison:active {
    transform: translateY(-1px) scale(1);
}

.btn-comparison i {
    font-size: 1.125rem;
}

/* Property Card Compare Button */
.property-compare-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-600);
    border: 2px solid var(--success-300);
    border-radius: var(--radius-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.property-compare-btn:hover {
    background: var(--success-500);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--success-500);
}

.property-compare-btn.added {
    background: var(--success-500);
    color: white;
    border-color: var(--success-500);
}

.property-compare-btn.added:hover {
    background: var(--error-500);
    border-color: var(--error-500);
}

/* Responsive Design for Comparison */
@media (max-width: 1200px) {
    .comparison-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-4);
    }
    
    .comparison-modal-content {
        width: 98vw;
    }
}

@media (max-width: 768px) {
    .comparison-header {
        padding: var(--space-4) var(--space-5);
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }
    
    .comparison-header h3 {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .comparison-controls {
        justify-content: space-between;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        padding: var(--space-3);
    }
    
    .comparison-container {
        padding: var(--space-4);
    }
    
    .comparison-property-header {
        height: 180px;
    }
    
    .comparison-property-content {
        padding: var(--space-4);
    }
    
    .comparison-floating-btn {
        bottom: var(--space-4);
        right: var(--space-4);
    }
    
    .btn-comparison {
        padding: var(--space-3) var(--space-5);
        font-size: 0.9rem;
    }
    
    .comparison-feature-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
    
    .comparison-feature-value {
        text-align: left;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .comparison-modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .comparison-header {
        border-radius: 0;
    }
    
    .comparison-property-header {
        height: 160px;
    }
    
    .btn-comparison span {
        display: none;
    }
    
    .btn-comparison {
        width: 56px;
        height: 56px;
        padding: var(--space-3);
        justify-content: center;
    }
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */

.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all var(--transition-base) ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
}

.toast-message {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-900);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--neutral-100);
    color: var(--neutral-600);
}

/* Toast Types */
.toast-success {
    border-left: 4px solid var(--success-500);
}

.toast-success .toast-content i {
    color: var(--success-500);
}

.toast-error {
    border-left: 4px solid var(--error-500);
}

.toast-error .toast-content i {
    color: var(--error-500);
}

.toast-warning {
    border-left: 4px solid var(--warning-500);
}

.toast-warning .toast-content i {
    color: var(--warning-500);
}

.toast-info {
    border-left: 4px solid var(--primary-500);
}

.toast-info .toast-content i {
    color: var(--primary-500);
}

/* Mobile Toast Adjustments */
@media (max-width: 768px) {
    .toast-container {
        top: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
    }
    
    .toast {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }
}

/* Additional component styles and responsive improvements have been integrated above */