/* ═══════════════════════════════════════════════════════════════
   Hoosier Vacations — Search Page Styles (Split-View with Map)
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    --burgundy:       #8B2252;
    --burgundy-dark:  #6E1A40;
    --burgundy-light: #A8305F;
    --gold:           #D4A843;
    --gold-light:     #E8C66A;
    --gold-dark:      #B8902E;
    --cream:          #FFF8F0;
    --cream-dark:     #F5EDDF;
    --dark:           #2C1810;
    --dark-muted:     #4A3728;
    --gray-50:        #FAFAF8;
    --gray-100:       #F3F1ED;
    --gray-200:       #E8E4DC;
    --gray-300:       #D4CFC5;
    --gray-400:       #A8A198;
    --gray-500:       #7A736A;
    --gray-600:       #5C554D;
    --gray-700:       #3E3830;
    --white:          #FFFFFF;
    --shadow-sm:      0 1px 3px rgba(44,24,16,0.06), 0 1px 2px rgba(44,24,16,0.04);
    --shadow-md:      0 4px 12px rgba(44,24,16,0.08), 0 2px 4px rgba(44,24,16,0.04);
    --shadow-lg:      0 12px 32px rgba(44,24,16,0.12), 0 4px 8px rgba(44,24,16,0.06);
    --shadow-xl:      0 20px 48px rgba(44,24,16,0.16), 0 8px 16px rgba(44,24,16,0.08);
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width:      1280px;
    --header-height:  64px;
    --search-height:  64px;
    --transition:     0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.938rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--burgundy);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--burgundy-dark);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--burgundy);
    border: 1.5px solid var(--burgundy);
}
.btn-outline:hover {
    background: var(--burgundy);
    color: var(--white);
}

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

.link-btn {
    color: var(--burgundy);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-size: inherit;
}
.link-btn:hover { color: var(--burgundy-dark); }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.site-header {
    position: relative;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    flex-shrink: 0;
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--burgundy);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    display: flex;
    align-items: center;
    color: var(--gold);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.938rem;
    color: var(--dark-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-link:hover {
    color: var(--burgundy);
    background: var(--cream);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════════════════════════════════════════════════════════
   SEARCH SECTION (compact bar below header)
   ═══════════════════════════════════════════════════════════════ */
.search-section {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    height: var(--search-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    flex-shrink: 0;
}

.search-section-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border-radius: 50px;
    border: 1.5px solid var(--gray-200);
    padding: 4px 4px 4px 8px;
    transition: border-color var(--transition);
}

.search-section-inner:focus-within {
    border-color: var(--burgundy);
}

.search-section .search-field {
    flex: 1;
    padding: 6px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.search-section .search-field label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.search-section .search-field input,
.search-section .search-field select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--dark);
    width: 100%;
    padding: 0;
    line-height: 1.3;
}

.search-section .search-field select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A736A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 16px;
}

.search-section .search-field input[type="date"] { cursor: pointer; }
.search-section .search-field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.4; cursor: pointer; }

.search-section .search-divider {
    width: 1px;
    height: 28px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.search-section .search-btn {
    border-radius: 50px;
    padding: 8px 20px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   SPLIT VIEW LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.split-view {
    display: flex;
    height: calc(100vh - var(--header-height) - var(--search-height));
    overflow: hidden;
    width: 100%;
}

.panel-left {
    width: 45%;
    position: relative;
}

.panel-right {
    width: 55%;
    overflow-y: auto;
    padding: 0 20px 80px;
    border-left: 1px solid var(--gray-200);
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.panel-right::-webkit-scrollbar {
    width: 6px;
}
.panel-right::-webkit-scrollbar-track {
    background: transparent;
}
.panel-right::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.search-map {
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   FILTER BAR (inside left panel)
   ═══════════════════════════════════════════════════════════════ */
.filter-section {
    padding: 16px 0 4px;
}

.filter-bar {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bedroom-pills {
    display: flex;
    gap: 3px;
}

.pill {
    padding: 5px 12px;
    font-size: 0.813rem;
    font-weight: 500;
    border-radius: 50px;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1.5px solid transparent;
    transition: all var(--transition);
}
.pill:hover { background: var(--cream-dark); color: var(--dark); }
.pill.active { background: var(--burgundy); color: var(--white); border-color: var(--burgundy); }

.price-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-range input {
    width: 80px;
    padding: 5px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.813rem;
    background: var(--white);
    transition: border-color var(--transition);
}
.price-range input:focus { outline: none; border-color: var(--burgundy); }

.price-dash { color: var(--gray-400); font-weight: 500; }

.amenity-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.813rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 3px 0;
    transition: color var(--transition);
}
.check-label:hover { color: var(--dark); }

.check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--burgundy);
    cursor: pointer;
}

.filter-sort { margin-left: auto; }

.filter-sort select {
    padding: 5px 28px 5px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.813rem;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237A736A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--transition);
}
.filter-sort select:focus { outline: none; border-color: var(--burgundy); }

.filter-toggle-mobile {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
    width: 100%;
    justify-content: center;
}
.filter-toggle-mobile:hover { border-color: var(--burgundy); color: var(--burgundy); }

/* ═══════════════════════════════════════════════════════════════
   RESULTS HEADER
   ═══════════════════════════════════════════════════════════════ */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 10px;
}

.results-count {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.clear-filters-btn { font-size: 0.75rem; }

/* ═══════════════════════════════════════════════════════════════
   PROPERTY GRID (2-column inside left panel)
   ═══════════════════════════════════════════════════════════════ */
.property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   PROPERTY CARD
   ═══════════════════════════════════════════════════════════════ */
.property-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.property-card.highlighted {
    border-color: var(--burgundy);
    box-shadow: var(--shadow-lg);
}

.property-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card-image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.property-card:hover .card-image-wrap img {
    transform: scale(1.05);
}

.card-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--dark);
    text-transform: capitalize;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark), var(--gray-200));
    color: var(--gray-400);
}

.card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-location {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-name {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-details {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--gray-500);
}

.card-detail svg { color: var(--gray-400); flex-shrink: 0; }

.card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.card-price-label {
    font-size: 0.7rem;
    color: var(--gray-400);
    font-weight: 500;
}

.card-price-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--burgundy);
}

.card-price-unit {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 400;
}

.card-view-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--burgundy);
    opacity: 0;
    transition: opacity var(--transition);
}

.property-card:hover .card-view-btn { opacity: 1; }

.card-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 8px;
}

.card-amenity-tag {
    font-size: 0.65rem;
    padding: 2px 7px;
    background: var(--cream);
    color: var(--gray-600);
    border-radius: 50px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   MAP PRICE PINS
   ═══════════════════════════════════════════════════════════════ */
.price-pin-wrapper {
    background: transparent !important;
    border: none !important;
}

.price-pin {
    background: var(--white);
    border: 2px solid var(--dark);
    border-radius: 8px;
    padding: 4px 8px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    line-height: 1.2;
}

.price-pin:hover,
.price-pin.active {
    background: var(--burgundy);
    border-color: var(--burgundy);
    color: var(--white);
    transform: scale(1.15);
    z-index: 1000 !important;
}

/* Hide default Leaflet attribution styles clutter */
.leaflet-control-attribution {
    font-size: 10px !important;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MAP TOGGLE
   ═══════════════════════════════════════════════════════════════ */
.map-toggle-mobile {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--dark);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    border: none;
    cursor: pointer;
}

.map-toggle-mobile svg { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   MORE FILTERS MODAL
   ═══════════════════════════════════════════════════════════════ */
.filters-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44,24,16,0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
}

.filters-modal-backdrop.open {
    display: block;
}

.filters-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 520px;
    max-width: 92vw;
    max-height: 85vh;
    flex-direction: column;
}

.filters-modal.open {
    display: flex;
}

.filters-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.filters-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.filters-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--gray-500);
    transition: all var(--transition);
}

.filters-modal-close:hover {
    background: var(--gray-100);
    color: var(--dark);
}

.filters-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.filters-modal-section {
    margin-bottom: 24px;
}

.filters-modal-section:last-child {
    margin-bottom: 0;
}

.filters-modal-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-pills-wrap {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.amenity-checks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 20px;
}

.amenity-checks-grid .check-label {
    font-size: 0.875rem;
    padding: 6px 0;
}

.amenity-checks-grid .check-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
}

.filters-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.filters-modal-footer .btn-primary {
    padding: 10px 28px;
}

#moreFiltersBtn {
    position: relative;
}

.filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--burgundy);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════════════ */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.skeleton-img {
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-50) 50%, var(--gray-100) 100%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-text {
    height: 12px;
    margin: 14px 14px 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-50) 50%, var(--gray-100) 100%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.shorter { width: 35%; margin-bottom: 14px; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY & ERROR STATES
   ═══════════════════════════════════════════════════════════════ */
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray-500);
}

.empty-state svg,
.error-state svg {
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3,
.error-state h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state p,
.error-state p {
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 24px 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-description {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 360px;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-contact a {
    font-size: 0.875rem;
    transition: color var(--transition);
}
.footer-links a:hover,
.footer-contact a:hover {
    color: var(--gold);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

.footer-contact svg {
    color: var(--gold);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.813rem;
    color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Tablet / narrow desktop */
@media (max-width: 1024px) {
    .panel-left { width: 45%; }
    .panel-right { width: 55%; }

    .property-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .filter-bar { gap: 14px; }

    .filter-amenities .amenity-checks {
        max-width: 280px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --search-height: 56px;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        z-index: 999;
    }
    .main-nav.open { display: flex; }
    .main-nav .nav-link { font-size: 1.2rem; padding: 12px 24px; }

    .mobile-menu-toggle { display: flex; }

    /* Search bar stacks vertically */
    .search-section {
        height: auto;
        padding: 10px 16px;
    }
    .search-section-inner {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
        padding: 8px;
        gap: 0;
    }
    .search-section .search-field {
        flex: 1 1 40%;
        padding: 8px 12px;
    }
    .search-section .search-divider { display: none; }
    .search-section .search-btn {
        width: 100%;
        border-radius: var(--radius-md);
        margin-top: 4px;
        padding: 10px;
    }

    /* Split view collapses */
    .split-view {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .panel-left {
        width: 100%;
        height: 280px;
        border-bottom: 1px solid var(--gray-200);
    }

    .panel-right {
        width: 100%;
        overflow-y: visible;
        padding: 0 16px 40px;
        border-left: none;
    }

    .map-toggle-mobile { display: flex; }

    .panel-left.hidden {
        display: none;
    }

    .property-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Filters */
    .filter-bar {
        display: none;
        flex-direction: column;
        gap: 14px;
        padding: 14px;
    }
    .filter-bar.open { display: flex; }
    .filter-toggle-mobile { display: flex; }

    .filter-sort { margin-left: 0; width: 100%; }
    .filter-sort select { width: 100%; }
    .bedroom-pills { flex-wrap: wrap; }
    .amenity-checks { gap: 2px 12px; }
    .price-range input { width: 100%; flex: 1; }

    .card-view-btn { opacity: 1; }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .results-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .search-section .search-field { flex: 1 1 100%; }
}
