/* public/css/style.css */

:root {
    /* Color Palette */
    --primary: #0D3B7A;            /* Primary Navy */
    --primary-dark: #07254f;       /* Darker Navy for hover */
    --primary-light: #e8eef6;      /* Light Navy */
    --accent: #D6B37F;             /* Gold Accent */
    --accent-dark: #c19b64;        /* Gold Hover */
    --accent-light: #fdfaf5;       /* Light Gold Accent Areas */
    
    /* Secondary Blue */
    --secondary: #4A90E2;          /* Secondary Ocean Blue */
    --secondary-dark: #2774cf;
    --secondary-light: #f0f7fe;
    
    /* Neutral & Backgrounds */
    --background: #F8FAFC;         /* Soft Background */
    --surface: #FFFFFF;            /* White for Cards, Forms, etc. */
    --border: #E2E8F0;             /* Clean slate-grey border */
    
    /* Typography colors */
    --text-main: #1E293B;          /* Dark Slate body text */
    --text-heading: #0D3B7A;       /* Ocean Blue Headings */
    --text-muted: #64748B;         /* Muted Slate text */
    
    /* Shadow tokens */
    --shadow-sm: 0 4px 12px rgba(13, 59, 122, 0.03);
    --shadow-md: 0 10px 30px rgba(13, 59, 122, 0.06);
    --shadow-lg: 0 20px 50px rgba(13, 59, 122, 0.1); /* Luxury floating card */
    
    /* Border Radius tokens */
    --radius-sm: 10px;
    --radius-md: 16px;             /* Buttons & standard containers (16px) */
    --radius-lg: 20px;             /* Property Cards */
    --radius-xl: 24px;             /* Hero search card */
    
    /* Status / Feedback Colors */
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --success: #22C55E;
    --success-light: #DCFCE7;

    /* Transition */
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Prompt', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Prompt', 'Noto Sans Thai', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Base Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--surface); /* #FFFFFF */
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px; /* Height: 80px */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.logo-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 1px;
}

.logo svg, .logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 4px;
}

.nav-center {
    display: none; /* Hidden on mobile */
}

@media(min-width: 768px) {
    .nav-center {
        display: flex;
        align-items: center;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.nav-item:hover {
    color: var(--accent); /* Sky Blue Hover */
}

.nav-fav {
    display: inline-flex;
    align-items: center;
    color: var(--text-main);
}

.nav-fav:hover {
    color: var(--accent);
}

/* Button Design */
.nav-btn, .btn-primary {
    background-color: var(--accent); /* #4CA9FF Primary Sky Blue */
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md); /* 14px */
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(76, 169, 255, 0.3); /* Soft Blue Shadow */
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn:hover, .btn-primary:hover {
    background-color: var(--accent-dark); /* #3898F5 */
    box-shadow: 0 6px 20px 0 rgba(76, 169, 255, 0.45);
    transform: translateY(-1px);
}

.nav-btn-outline, .btn-secondary {
    background-color: var(--surface); /* #FFFFFF */
    color: var(--primary); /* #173B6B */
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border); /* 1px solid #DDE5EE */
    border-radius: var(--radius-md); /* 14px */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.nav-btn-outline:hover, .btn-secondary:hover {
    background-color: #F8FAFC; /* #F8FAFC */
    border-color: #cbd5e1;
}

/* User dropdown trigger details */
.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--background);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.user-profile-menu:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* --- STICKY SEARCH BAR --- */
.search-hero {
    background: linear-gradient(rgba(13, 59, 122, 0.45), rgba(13, 59, 122, 0.45)), url('../images/Cover.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 8rem 0 10rem 0;
    text-align: center;
    position: relative;
}

.search-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.search-hero p {
    color: #f1f5f9;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-weight: 500;
}

.search-sticky-container {
    background: rgba(255, 255, 255, 0.85); /* Glassmorphism */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl); /* 24px */
    box-shadow: var(--shadow-lg); /* Luxury Floating Card */
    padding: 2rem;
    margin: -5.5rem auto 4rem auto;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media(min-width: 540px) and (max-width: 991px) {
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-btn {
        grid-column: span 2;
    }
}
@media(min-width: 992px) {
    .search-grid {
        grid-template-columns: repeat(3, 1fr) auto;
    }
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}

.search-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-field select,
.search-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.search-field select:focus,
.search-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(214, 179, 127, 0.25);
}

.search-field-range {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
}

.search-field-range input {
    flex: 1;
    min-width: 0;
}

.search-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md); /* 16px */
    padding: 0.85rem 2.25rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-end;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px 0 rgba(74, 144, 226, 0.3); /* Soft Blue Shadow */
}

.search-btn:hover {
    background-color: var(--secondary-dark);
    box-shadow: 0 6px 20px 0 rgba(74, 144, 226, 0.45);
    transform: translateY(-1px);
}

/* --- PROPERTY LISTINGS GRID --- */
.section-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    position: relative;
    color: var(--text-heading); /* Navy Title */
}

.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 4rem;
}
@media(min-width: 540px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}
@media(min-width: 992px) {
    .properties-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}
@media(min-width: 1280px) {
    .properties-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Recently Viewed Grid — smaller cards */
.properties-grid.recently-viewed-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
@media (max-width: 539px) {
    .properties-grid.recently-viewed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}
@media (max-width: 374px) {
    .properties-grid.recently-viewed-grid {
        grid-template-columns: 1fr;
    }
}

/* --- PROPERTY CARD --- */
.property-card {
    background: var(--surface); /* White */
    border-radius: var(--radius-lg); /* 20px */
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(13, 59, 122, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.property-card:hover {
    transform: translateY(-8px); /* Lift 8px */
    box-shadow: 0 20px 40px rgba(13, 59, 122, 0.12); /* Luxury floating card */
    border-color: var(--accent);
}

.property-image-container {
    width: 100%;
    aspect-ratio: 16/9; /* 16:9 Image Ratio */
    position: relative;
    background-color: #cbd5e1;
    overflow: hidden;
}

.property-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image-container img {
    transform: scale(1.06);
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

/* Status Colors */
.status-available { background-color: #DCFCE7; color: #22C55E; }
.status-ready-for-sale { background-color: #F0FDF4; color: #15803D; border: 1px solid rgba(21, 128, 61, 0.15); }
.status-reserved { background-color: #FEF3C7; color: #F59E0B; }
.status-rented { background-color: #FEE2E2; color: #EF4444; }
.status-sold { background-color: #EDE9FE; color: #7C3AED; }
.status-closed { background-color: #F1F5F9; color: #94A3B8; }

.fav-btn-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fav-btn-overlay:hover {
    background: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(13, 59, 122, 0.15);
}

.fav-btn-overlay svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-main);
    stroke-width: 2.2;
    transition: var(--transition);
}

.fav-btn-overlay.is-fav svg {
    fill: #EF4444;
    stroke: #EF4444;
}

.property-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.property-card-meta .bullet {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.property-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-heading); /* Navy Headings */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-specs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    margin-top: auto;
}

.property-card-spec-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.property-card-spec-item svg {
    flex-shrink: 0;
}

.property-card-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.property-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary); /* Navy Price */
}

.property-card-price span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Mock gradient background for no-image states */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--primary);
    opacity: 0.4;
}

/* --- FRONTEND FORM STYLES --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* --- ALERTS & FLASH MESSAGES --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #DCFCE7;
    color: #22C55E;
    border-left-color: #22C55E;
}

.alert-error {
    background-color: #FEE2E2;
    color: #EF4444;
    border-left-color: #EF4444;
}

/* --- FOOTER --- */
footer {
    background: var(--primary); /* Navy Footer */
    color: #cbd5e1;
    padding: 4.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    margin-top: auto;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

@media(min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-logo {
    color: white;
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section Alternate backgrounds helper */
.section-sand {
    background-color: var(--background);
}

.section-white {
    background-color: var(--surface);
}

/* --- SEARCH TAB NAV --- */
.search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    justify-content: flex-start;
}
.search-tab {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.search-tab:hover, .search-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- INDICATORS BELOW SEARCH --- */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 3.5rem;
}
@media(min-width: 768px) {
    .indicators-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}
.indicator-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.indicator-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.indicator-icon svg {
    width: 20px;
    height: 20px;
}
.indicator-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.15rem;
}
.indicator-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- POPULAR CATEGORIES --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}
@media(min-width: 540px) and (max-width: 991px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media(min-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.category-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.category-card:hover img {
    transform: scale(1.05);
}
.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(13, 59, 122, 0.95) 0%, rgba(13, 59, 122, 0.4) 60%, transparent 100%);
    padding: 1.25rem;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.category-card-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.15rem;
}
.category-card-info span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}
.category-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.category-icon-btn svg {
    width: 16px;
    height: 16px;
}

/* --- FLAG ICONS --- */
.flag-icon {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.flag-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switcher {
    position: relative;
}

.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.lang-switcher-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.lang-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 150px;
    z-index: 200;
    overflow: hidden;
}

.lang-switcher.open .lang-switcher-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--primary-light);
}

.lang-option.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

@media (max-width: 767px) {
    .lang-switcher-label {
        display: none;
    }

    .lang-switcher-btn {
        padding: 0.4rem 0.5rem;
    }
}

/* --- NAV LINKS (Dashboard header) --- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

/* --- RESPONSIVE FRONTEND HEADER --- */
@media (max-width: 767px) {
    .header-container {
        height: 60px;
    }

    .logo-title {
        font-size: 1.05rem;
    }

    .logo-subtitle {
        display: none;
    }

    .logo-img {
        width: 24px;
        height: 24px;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .nav-right .nav-fav span {
        display: none;
    }

    .nav-right .nav-btn,
    .nav-right .nav-btn-outline {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .search-hero {
        padding: 4rem 0 6rem 0;
    }

    .search-hero h1 {
        font-size: 1.75rem;
    }

    .search-hero p {
        font-size: 1rem;
    }

    .search-sticky-container {
        padding: 1.25rem;
        margin-top: -3.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

/* --- MOBILE BOTTOM NAVIGATION --- */
.mobile-bottom-nav {
    display: none;
}
@media(max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
        z-index: 999;
        justify-content: space-around;
        padding: 0.5rem 0;
    }
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 600;
        text-align: center;
    }
    .mobile-nav-item.active {
        color: var(--primary);
    }
    .mobile-nav-item svg {
        width: 20px;
        height: 20px;
    }
    body {
        padding-bottom: 60px; /* Space for mobile nav */
    }
}

/* --- SPECIFICATIONS GRID --- */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

@media(min-width: 576px) {
    .spec-item {
        border-bottom: none;
    }
}

.spec-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- PROPERTY DETAIL PAGE RESPONSIVE --- */
.detail-hero-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}
@media(min-width: 768px) {
    .detail-hero-gallery {
        grid-template-columns: 2fr 1fr;
    }
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media(min-width: 768px) {
    .detail-content-grid {
        grid-template-columns: 1fr 320px;
        gap: 2rem;
    }
}

/* --- SAFE AREA (notch/home indicator) --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
}

/* --- TOUCH IMPROVEMENTS --- */
@media (hover: none) and (pointer: coarse) {
    .property-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    .property-card:active {
        transform: scale(0.98);
    }
    .nav-btn:hover, .btn-primary:hover {
        transform: none;
    }
    .search-btn:hover {
        transform: none;
    }
}

/* --- SMALL PHONE (< 375px) --- */
@media (max-width: 374px) {
    .container {
        padding: 0 0.75rem;
    }
    .search-hero h1 {
        font-size: 1.45rem;
    }
    .search-hero p {
        font-size: 0.88rem;
    }
    .search-sticky-container {
        padding: 1rem;
        margin-top: -3rem;
    }
    .property-card-content {
        padding: 1rem;
    }
    .property-card-title {
        font-size: 1rem;
    }
    .property-card-price {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 1.1rem;
    }
    .indicator-card {
        padding: 0.85rem 0.65rem;
    }
    .indicator-info h4 {
        font-size: 0.82rem;
    }
    .indicator-info p {
        font-size: 0.68rem;
    }
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .indicators-grid {
        grid-template-columns: 1fr;
    }
}

/* --- TABLET LANDSCAPE --- */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .search-hero {
        padding: 5rem 0 7rem 0;
    }
}

/* --- PRINT FRIENDLY --- */
@media print {
    header, footer, .mobile-bottom-nav, .floating-chat-head-wrapper, .floating-chat-box {
        display: none !important;
    }
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* --- SMOOTH SCROLLING --- */
html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- IMAGE LAZY LOAD FADE --- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

/* --- SELECTION COLORS --- */
::selection {
    background: var(--primary);
    color: white;
}

/* --- SCROLLBAR STYLING --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--background);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- FOCUS VISIBLE (accessibility) --- */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   SHARE LISTING MODAL & PREMIUM STYLING
   ============================================================ */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 30, 61, 0.45); /* Deep dark blue overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.share-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.share-modal-container {
    background: var(--surface);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.share-modal-overlay.active .share-modal-container {
    transform: translateY(0) scale(1);
}
.share-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
}
.share-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}
.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
}
.share-modal-close:hover {
    color: var(--danger);
    transform: scale(1.1);
}
.share-modal-body {
    padding: 1.5rem;
}
.share-modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.share-property-info {
    background: var(--secondary-light);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}
.share-property-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.share-social-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.share-social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.share-social-item span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}
.share-social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.share-social-item:hover .share-social-icon {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-md);
}
.share-social-item:hover span {
    color: var(--primary);
}

/* Brand Colors */
.share-line .share-social-icon { background: #06C755; }
.share-facebook .share-social-icon { background: #1877F2; }
.share-whatsapp .share-social-icon { background: #25D366; }
.share-telegram .share-social-icon { background: #0088cc; }
.share-x .share-social-icon { background: #000000; }

.share-copy-section {
    display: flex;
    gap: 0.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}
.share-copy-section input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.share-copy-section button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.share-copy-section button:hover {
    background: var(--primary-dark);
}
.share-copied-feedback {
    margin-top: 0.75rem;
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.15);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    animation: fadeIn 0.2s ease;
}

/* Detail page specific button styling */
.pd-share-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    padding: 0;
    outline: none;
}
.pd-share-btn:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: scale(1.05);
}
.pd-share-btn:hover svg {
    stroke: var(--primary) !important;
}

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

@media (max-width: 480px) {
    .share-social-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }
    .share-social-icon {
        width: 40px;
        height: 40px;
    }
    .share-social-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================================
   PREMIUM SKELETON LOADERS & MICRO-ANIMATIONS
   ============================================================ */

/* Skeleton shimmer base */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite ease-in-out;
    border-radius: 6px;
    display: inline-block;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Skeleton sizing helpers */
.skeleton-gallery-main {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}
.skeleton-gallery-thumb {
    width: 64px;
    height: 48px;
    border-radius: 4px !important;
    flex-shrink: 0;
}
.skeleton-text {
    height: 14px;
    border-radius: 4px !important;
}
.skeleton-title {
    height: 24px;
    border-radius: 4px !important;
}
.skeleton-badge {
    height: 20px;
    border-radius: 50px !important;
}
.skeleton-button {
    width: 100%;
    height: 38px;
    border-radius: var(--radius-sm) !important;
}

/* Scroll Reveal base state */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger list animation within revealed containers */
.reveal-stagger > * {
    opacity: 0;
}
.reveal-on-scroll.revealed.reveal-stagger > *,
.revealed .reveal-stagger > * {
    animation: revealFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-stagger > *:nth-child(1) { animation-delay: 50ms; }
.reveal-stagger > *:nth-child(2) { animation-delay: 150ms; }
.reveal-stagger > *:nth-child(3) { animation-delay: 250ms; }
.reveal-stagger > *:nth-child(4) { animation-delay: 350ms; }
.reveal-stagger > *:nth-child(5) { animation-delay: 450ms; }
.reveal-stagger > *:nth-child(6) { animation-delay: 550ms; }
.reveal-stagger > *:nth-child(n+7) { animation-delay: 650ms; }

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

/* Smooth active scale state for general modals */
.agent-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), -webkit-backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.agent-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.agent-modal-content {
    background: white;
    border-radius: 12px;
    width: 95%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.95) translateY(12px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.agent-modal-overlay.active .agent-modal-content {
    transform: scale(1) translateY(0);
}

/* Micro-interaction hovers for lists & action buttons */
.btn-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-sm);
}
.nav-menu .nav-item {
    position: relative;
}
.nav-menu .nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}
.nav-menu .nav-item:hover::after {
    width: 100%;
}



