/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Montserrat:wght@400;500;600&display=swap');

/* BASIC RESET & THEME */
:root {
    --primary-green: #556b2f;
    --dark-green: #2e4034;
    --background-light: #f0f2f5;
    --text-dark: #333;
    --text-light: #f2f2f2;
    --border-color: #ddd;
    --white-bg: #fff;
    --main-header-height: 70px; /* Height of the main navigation header */
    --search-bar-height: 110px; /* Height of the search/filter bar */
    --total-header-height: 180px; /* Sum of the two above */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    margin: 0;
}

/* GLOBAL UI SHELL (MAIN NAVIGATION) */
.global-header-shell {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-bg);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: var(--main-header-height);
}

/* TOP SEARCH BAR (NOW A SEPARATE FIXED ELEMENT) */
.top-search-container {
    position: fixed;
    top: var(--main-header-height); /* Position it directly below the main header */
    left: 0;
    width: 100%;
    background-color: var(--white-bg);
    z-index: 999; /* Below the main header but above content */
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
    height: var(--search-bar-height);
}

.top-search-bar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* This new wrapper pushes all content below the fixed headers */
.page-content-wrapper {
    padding-top: var(--total-header-height);
}


/* Styles for the new search and filter layout */
.search-input-container, .filter-checkbox-group {
    display: flex;
    flex-direction: column;
}

.search-input-container label, .filter-checkbox-group > label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.search-input-container {
    position: relative;
    flex-grow: 1;
}

.top-search-bar input[type="text"] {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.search-btn {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    height: 48px;
}

/* Custom Checkbox Filters */
.checkbox-options {
    display: flex;
    gap: 0.5rem;
}

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

.checkbox-wrapper label {
    display: block;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--white-bg);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500;
    height: 22px;
    line-height: 22px;
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
    background-color: var(--dark-green);
    color: var(--white-bg);
    border-color: var(--dark-green);
}

/* Autocomplete Dropdown Styles */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
}
.autocomplete-item:hover {
    background-color: #f0f0f0;
}
.autocomplete-item .main-text { font-weight: 600; }
.autocomplete-item .sub-text { font-size: 0.9rem; color: #666; margin-left: 8px; }

/* TWO-PANE LAYOUT */
.two-pane-layout {
    display: flex;
    height: calc(100vh - var(--total-header-height)); 
    max-width: 1800px;
    margin: 0 auto;
}

/* A. RESULTS LIST (LEFT PANE) */
.results-list {
    flex: 1;
    max-width: 500px;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--white-bg);
}
.property-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.property-card.highlighted {
    box-shadow: 0 0 0 3px var(--primary-green);
}
.card-photo-carousel {
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    border-radius: 8px 8px 0 0;
}
.card-info { padding: 1rem; }
.card-info h3 { margin: 0 0 0.5rem 0; }
.card-info p { margin: 0.25rem 0; color: #666; }
.card-info .price { font-weight: bold; font-size: 1.2rem; margin-top: 0.5rem; }
.card-action-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 1rem;
    text-align: center;
    text-decoration: none;
    color: white;
    background-color: var(--dark-green);
    border-radius: 5px;
}

/* B. INTERACTIVE MAP (RIGHT PANE) */
.interactive-map {
    flex: 2;
    background-color: #e0e0e0;
}
.map-pin-gmaps {
    width: 30px;
    height: 30px;
    background-color: var(--primary-green);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid white;
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
}
.map-pin-gmaps.highlighted {
    transform: rotate(-45deg) scale(1.3);
    background-color: #ffc107; /* Highlight color */
    z-index: 10;
}

/* SUGGESTED LOCATIONS */
.suggestions-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.suggestions-container h2 { font-family: 'Merriweather', serif; margin-bottom: 1.5rem; }
.suggestions-carousel { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; }
.suggestion-card {
    flex: 0 0 300px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    color: white;
    text-decoration: none;
}
.suggestion-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.suggestion-card:hover img { transform: scale(1.1); }
.suggestion-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.suggestion-card-overlay h4 { margin: 0; }
.suggestion-card-overlay p { margin: 5px 0 0 0; font-size: 0.9rem; }