/* =============================================
   EL-SEMSAR — MAIN STYLES
   ============================================= */

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    font-size: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
    line-height: 1.6;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p  { line-height: 1.7; }

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

/* =============================================
   LAYOUT
   ============================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.hidden { display: none !important; }

/* =============================================
   NAVBAR — glass, sticky, height 60px
   ============================================= */
#main-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 64px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─── Nav links horizontal row ─── */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}
.nav-links li { list-style: none; }
.nav-links a, .nav-links span, .nav-link {
    font-family: 'Tajawal', sans-serif !important;
    font-size: .82rem !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .18s;
}
.nav-links a.active, .nav-links span.active, .nav-link.active {
    color: var(--accent) !important;
    font-weight: 600 !important;
}
.nav-links a:visited { color: var(--text-muted); }
.nav-links a:hover, .nav-links span:hover { color: var(--accent); }

.logo-ring {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-gold); color: var(--btn-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; flex-shrink: 0; line-height: 1;
}

.bell-wrap { position: relative; }

/* =============================================
   BUTTONS
   ============================================= */
button, .btn {
    cursor: pointer;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.2rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1.5px solid var(--btn-bg);
}
.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

#lang-toggle, #theme-toggle {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
#lang-toggle:hover, #theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   INPUTS
   ============================================= */
input, select, textarea {
    width: 100%;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

input::placeholder { color: var(--text-muted); }

/* =============================================
   HERO MAP — height 420px
   ============================================= */
.hero-map-section {
    position: relative;
    height: 420px;
    overflow: hidden;
}

#hero-map {
    width: 100% !important;
    max-width: 100% !important;
    height: 420px;
    position: relative;
    z-index: 1;
    overflow: hidden !important;
}

.leaflet-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: clip !important;
}

.prop-map-wrap {
    width: 100%;
    overflow: hidden;
}

.hero-map-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.78) 0%, rgba(10,10,10,0.1) 55%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-map-title {
    position: absolute;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    color: #F0E8D5;
    text-shadow: 0 2px 10px rgba(0,0,0,0.55);
    white-space: nowrap;
}

.hero-map-title h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 700;
}

.hero-map-title p {
    font-size: 0.95rem;
    color: rgba(240,232,213,0.78);
    margin-top: 0.3rem;
}

.hero-map-badge {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 3;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #C9A84C;
}

.hero-map-legend {
    position: absolute;
    bottom: 1rem;
    inset-inline-start: 1rem;
    z-index: 3;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    display: flex;
    gap: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-primary);
    align-items: center;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-inline-end: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* =============================================
   STATS STRIP — flex 4-5 items, glass
   ============================================= */
.stats-strip {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

.stats-strip .container {
    display: flex !important;
    justify-content: space-around;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stat-item {
    text-align: center;
    flex: 1 1 120px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* =============================================
   SEARCH GLASS — glass card
   ============================================= */
.search-glass-section {
    padding: 2rem 0 1.5rem;
    background: var(--bg-secondary);
}

.search-glass {
    max-width: 780px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
}

/* SEARCH TABS
   Issue 7 fix: use theme-aware variables so dark mode doesn't show gold text on gold background.
   Default (inactive) tab: surface bg with primary text.
   Active tab: brand button bg (dark in light mode, gold in dark mode) with legible contrast text. */
.search-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    direction: rtl;
}

.search-tabs button {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition);
    font-family: inherit;
}

.search-tabs button:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--btn-bg);      /* always contrasts against gold */
}

.search-tabs button.active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

.search-row {
    display: flex;
    flex-direction: row;
    direction: rtl;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    align-items: stretch;
}

.search-row input,
.search-row select {
    flex: 1;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.search-row input:focus,
.search-row select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.search-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1.5px solid var(--btn-bg);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.5rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ─── VOICE SEARCH BUTTON ─── */
.voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition);
    padding: 0;
}

.voice-btn:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--btn-bg);
    transform: translateY(-1px);
}

.voice-btn.listening {
    background: #E24B4A;
    border-color: #E24B4A;
    color: #fff;
    animation: pulse-mic 1s ease-in-out infinite;
}

@keyframes pulse-mic {
    0%, 100% { box-shadow: 0 0 0 0 rgba(226, 75, 74, 0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(226, 75, 74, 0); }
}

.voice-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.search-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    transition: color var(--transition);
}
.search-clear-btn:hover { color: var(--text-primary); }

/* SEARCH CHIPS — gold border, hover dark */
.search-chips, .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
    justify-content: flex-start;
}

.search-chip {
    padding: 0.28rem 0.85rem;
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.search-chip:hover {
    background: var(--accent-gold);
    color: var(--btn-bg);
    border-color: var(--accent-gold);
}

.search-chip.active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

/* =============================================
   AD BANNER FULL — full width banners
   ============================================= */
.ad-banner {
    width: auto;
    margin: .85rem 1.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: opacity var(--transition);
}

.ad-banner:hover { opacity: 0.96; }

.ad-banner-full {
    height: auto;
    min-height: 140px;
    padding: 1.5rem 1.25rem;
    margin: .85rem 1.5rem;
    border-radius: 14px;
}

/* Dark style — always uses charcoal palette regardless of theme */
.ad-banner-dark {
    min-height: 140px;
    background: linear-gradient(135deg, #141414 0%, #0A0A0A 60%, #1E1E1E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    text-align: center;
    border-top: 1px solid #2A2A2A;
    border-bottom: 1px solid #2A2A2A;
    flex-wrap: wrap;
}

.ad-banner-dark .ad-text { flex: 1; min-width: 0; }

.ad-banner-dark .ad-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold); /* always gold on dark bg */
}

.ad-banner-dark .ad-subtitle {
    font-size: 0.82rem;
    color: rgba(240,232,213,0.65); /* light text on always-dark bg */
    margin-top: 0.15rem;
}

.ad-banner-dark .ad-cta {
    padding: 0.5rem 1.3rem;
    background: var(--gold);
    color: #0A0A0A; /* always dark text on gold */
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--transition);
    flex-shrink: 0;
    font-family: inherit;
}

.ad-banner-dark .ad-cta:hover { background: var(--gold-dark); color: #F0E8D5; }

/* Ad-banner-dark — light mode overrides */
[data-theme="light"] .ad-banner-dark {
    background: #E0DAD0;
    border-top: 1px solid rgba(201,168,76,0.3);
    border-bottom: 1px solid rgba(201,168,76,0.3);
}

[data-theme="light"] .ad-banner-dark .ad-title {
    color: #141414;
}

[data-theme="light"] .ad-banner-dark .ad-subtitle {
    color: rgba(20,20,20,0.65);
}

[data-theme="light"] .ad-banner-dark .ad-cta {
    background: #141414;
    color: #C9A84C;
}

[data-theme="light"] .ad-banner-dark .ad-cta:hover {
    background: #2A2A2A;
    color: #E8C46A;
}

/* Light style — always light palette regardless of theme */
.ad-banner-light {
    min-height: 60px;
    background: linear-gradient(135deg, #F5F2EC 0%, #EDE8DF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.85rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(201,168,76,0.25);
    border-bottom: 1px solid rgba(201,168,76,0.25);
    flex-wrap: wrap;
}

.ad-banner-light .ad-text { flex: 1; min-width: 0; }

.ad-banner-light .ad-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #141414; /* always dark on light bg */
}

.ad-banner-light .ad-subtitle {
    font-size: 0.8rem;
    color: rgba(20,20,20,0.6); /* always dark-muted on light bg */
    margin-top: 0.1rem;
}

.ad-banner-light .ad-cta {
    padding: 0.45rem 1.1rem;
    background: #141414; /* always dark on light bg */
    color: var(--gold);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--transition);
    flex-shrink: 0;
    font-family: inherit;
}

.ad-banner-light .ad-cta:hover { background: var(--gold-dark); color: #F0E8D5; }

.ad-banner img.ad-img-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =============================================
   ASK SEMSAR — glass card flex
   ============================================= */
.ask-section {
    padding: 2.5rem 0;
    background: var(--bg-primary);
}

.ask-card {
    max-width: 860px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    box-shadow: var(--shadow-md);
}

.ask-icon {
    font-size: 2.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.ask-body { flex: 1; }

.ask-body h2 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.ask-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.ask-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1.8rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1.5px solid var(--gold-dark);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.ask-btn:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--btn-text);
}

/* =============================================
   WHO SECTION — full width dark bg
   ============================================= */
/* WHO SECTION — intentionally always dark (brand identity) */
.who-section {
    background: #141414;
    padding: 3rem 0;
    min-height: 220px;
    border-top: 1px solid rgba(201,168,76,0.2);
    border-bottom: 1px solid rgba(201,168,76,0.2);
}

.who-inner {
    display: flex;
    align-items: stretch;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.who-text { flex: 1; }

.who-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.who-text p {
    font-size: 0.92rem;
    color: rgba(240,232,213,0.72);
    line-height: 1.8;
}

/* WHO VIDEO — right side dark box */
.who-video {
    flex: 1;
    min-width: 280px;
    min-height: 250px;
    align-self: stretch;
    background: rgba(10,10,10,0.7);
    border: 1px solid #2A2A2A;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition);
}

.who-video-placeholder {
    width: 100%;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.who-video:hover { border-color: var(--gold); }

.who-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.who-play-btn {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(201,168,76,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #0A0A0A;
    z-index: 2;
    transition: transform var(--transition), background var(--transition);
    pointer-events: none;
}

.who-video:hover .who-play-btn {
    transform: scale(1.1);
    background: var(--gold);
}

/* WHO SECTION — light mode overrides */
[data-theme="light"] .who-section {
    background: #E0DAD0;
    border-top: 1px solid rgba(201,168,76,0.2);
    border-bottom: 1px solid rgba(201,168,76,0.2);
}

[data-theme="light"] .who-text h2 {
    color: var(--accent);
}

[data-theme="light"] .who-text p,
[data-theme="light"] .who-points li,
[data-theme="light"] .who-label {
    color: #141414;
}

[data-theme="light"] .who-video {
    background: #D0C8BC;
    border-color: rgba(201,168,76,0.3);
}

/* =============================================
   SLIDES — horizontal, 3 visible, auto-advance
   ============================================= */
.slides-section {
    padding: 2.5rem 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.slides-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 1.25rem;
    padding: 0 1rem;
}

.slides-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.slides-see-all {
    font-size: 0.85rem;
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

.slides-see-all:hover { color: var(--accent); }

.slides-track-wrap {
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.slides-track {
    display: flex;
    gap: 1.25rem;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
    overflow-x: hidden;
}

.slide-card {
    flex: 0 0 calc(33.333% - 0.84rem);
    min-width: calc(33.333% - 0.84rem);
    height: 220px;
    aspect-ratio: unset;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    flex-shrink: 0;
}

.slide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.slide-img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    display: block;
    background: var(--bg-surface);
}

.slide-body {
    padding: 0.85rem 1rem;
}

.slide-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1.2;
}

.slide-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.2rem 0 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Dots */
.slides-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1.25rem;
}

.slides-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.slides-dot.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    width: 22px;
    border-radius: 4px;
}

/* =============================================
   CATEGORIES — grid 6 cols, glass cards
   ============================================= */
.categories-section {
    padding: 2.5rem 0;
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.section-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.category-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
    color: var(--text-primary);
}

.category-icon {
    font-size: 1.9rem;
    margin-bottom: 0.45rem;
    display: block;
    line-height: 1;
}

.category-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* =============================================
   AD INLINE — light style (homepage_middle)
   ============================================= */
/* (uses .ad-banner-light from above) */

/* =============================================
   PROPERTY CARDS — glass, hover lift
   ============================================= */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.featured-section {
    padding: 2.5rem 0;
    background: var(--bg-secondary);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--bg-surface);
}

.card-body {
    padding: 1rem;
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.25rem 0 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* CARD FOOTER — flex space-between, whatsapp btn */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--glass-border);
}

.card-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.32rem 0.8rem;
    background: #25D366;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}

.card-whatsapp:hover { background: #1ebe5d; color: #fff; }

.card-view-btn {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.card-view-btn:hover { color: var(--accent-hover); }

/* BADGES */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 600;
}

.badge-rent   { background: var(--badge-rent-bg);   color: var(--badge-rent-text); }
.badge-sale   { background: var(--badge-sale-bg);   color: var(--badge-sale-text); }
.badge-resale { background: var(--badge-resale-bg); color: var(--badge-resale-text); }

/* =============================================
   MARKET TRENDS — grid 3 cols, glass cards
   ============================================= */
.trends-section {
    padding: 2.5rem 0;
    background: var(--bg-primary);
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.trend-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition);
}

.trend-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.trend-area {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.trend-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1.2;
}

.trend-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.trend-arrow {
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.5rem;
}

.trend-up   { color: #22c55e; }
.trend-down { color: #E24B4A; }
.trend-flat { color: var(--text-muted); }

/* =============================================
   FOOTER — dark #141414
   ============================================= */
/* FOOTER — intentionally always dark (brand identity section) */
.site-footer {
    background: #141414;
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid #2A2A2A;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-brand .logo {
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

/* footer-logo class used in about/privacy/terms pages */
.footer-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.83rem;
    color: rgba(240,232,213,0.55);
    margin-top: 0.5rem;
    line-height: 1.65;
}

.footer-col h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.85rem;
}

.footer-col a {
    display: block;
    font-size: 0.82rem;
    color: rgba(240,232,213,0.6);
    margin-bottom: 0.45rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--gold); }

.footer-social {
    display: flex;
    gap: 8px;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid #2A2A2A;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(240,232,213,0.6);
    font-size: 0.95rem;
    transition: all var(--transition);
    text-decoration: none;
    margin-bottom: 0;
    flex-shrink: 0;
}

.footer-social a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid #2A2A2A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom span,
.footer-bottom p {
    font-size: 0.76rem;
    color: rgba(240,232,213,0.4);
}

/* FOOTER — stays charcoal in both themes */
[data-theme="light"] .site-footer {
    background: #141414;
    border-top: 1px solid #2A2A2A;
}

[data-theme="light"] .site-footer .footer-brand p,
[data-theme="light"] .site-footer .footer-col a {
    color: rgba(240,232,213,0.6);
}

[data-theme="light"] .site-footer .footer-col a:hover {
    color: var(--gold);
}

[data-theme="light"] .site-footer .footer-social a {
    border-color: #2A2A2A;
    color: rgba(240,232,213,0.6);
}

[data-theme="light"] .site-footer .footer-social a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

[data-theme="light"] .footer-bottom {
    border-top: 1px solid #2A2A2A;
}

[data-theme="light"] .footer-bottom span,
[data-theme="light"] .footer-bottom p {
    color: rgba(240,232,213,0.4);
}

/* =============================================
   BOTTOM NAV — mobile only, 5 items
   ============================================= */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    z-index: 199;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-nav li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.62rem;
    gap: 2px;
    transition: color var(--transition);
    width: 100%;
}

.bottom-nav a:hover,
.bottom-nav a.active { color: var(--accent-gold); }

.bnav-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.bnav-label { line-height: 1; }

.bnav-add-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.bottom-nav .bnav-add {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #0A0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    margin-top: -16px;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 8px 22px rgba(20,20,20,0.22);
    transition: background var(--transition), color var(--transition), transform var(--transition);
    text-decoration: none;
    flex: 0 0 42px;
}

.bottom-nav .bnav-add:hover {
    background: var(--accent-hover);
    color: #0A0A0A;
    transform: translateY(-1px);
}

/* =============================================
   MODAL
   ============================================= */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#modal-box {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 20001;
    box-shadow: var(--shadow-lg);
}

#modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0.2rem 0.5rem;
    border: none;
}

#modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

#modal-content input {
    margin-bottom: 0.75rem;
}

#modal-content .auth-primary {
    width: 100%;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1.5px solid var(--btn-bg);
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

#modal-content .auth-link-row {
    text-align: center;
    margin: .75rem 0 0;
    font-size: .88rem;
}

#modal-content .auth-link-row a,
#modal-content a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

#modal-content .auth-link-row a:hover,
#modal-content a:hover {
    text-decoration: underline;
}

#modal-content .auth-note {
    color: var(--text-muted);
    font-size: .86rem;
    line-height: 1.7;
    margin: 0 0 .9rem;
}

#login-msg, #reg-msg, #reg-otp-msg, #forgot-msg, #reset-otp-msg {
    color: #E24B4A;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* =============================================
   BELL ICON
   ============================================= */
.bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.bell-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #E24B4A;
    color: #fff;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

[dir="rtl"] .bell-badge { right: auto; left: -5px; }

/* BELL DROPDOWN — glass, 280px wide */
.bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 10010;
    overflow: hidden;
    animation: dropIn 0.15s ease;
}

.bell-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.bell-dropdown-header span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bell-dropdown-header button {
    font-size: 0.72rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.bell-notif-list {
    max-height: 320px;
    overflow-y: auto;
}

.bell-notif-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.bell-notif-item:hover { background: var(--bg-surface); }
.bell-notif-item.unread { background: rgba(201,168,76,0.07); }

.bell-notif-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }

.bell-notif-body { flex: 1; min-width: 0; }

.bell-notif-title {
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.bell-notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.bell-dropdown-footer {
    padding: 0.6rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.bell-dropdown-footer a {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* =============================================
   USER AVATAR + DROPDOWN
   ============================================= */
.nav-user {
    position: relative;
    flex-shrink: 0;
}

.avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.3rem 0.7rem 0.3rem 0.4rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: border-color var(--transition);
}

.avatar-btn:hover { border-color: var(--accent); }

.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: var(--btn-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-name {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-caret {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-inline-start: 2px;
}

/* USER DROPDOWN — glass, 200px wide, 7 items */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 200px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 300;
    overflow: hidden;
    animation: dropIn 0.15s ease;
}

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

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    text-decoration: none;
    transition: background var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.user-dropdown a svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.user-dropdown a:hover svg { color: var(--accent); }

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

.dropdown-badge {
    margin-inline-start: auto;
    background: #E24B4A;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}

.dropdown-admin { color: var(--accent) !important; }
.dropdown-admin:hover { background: var(--bg-surface) !important; }
.dropdown-logout { color: #E24B4A !important; }
.dropdown-logout:hover { background: rgba(226,75,74,0.08) !important; }

/* =============================================
   FILTER BAR (admin / search compat)
   ============================================= */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: center;
    max-width: 860px;
    margin: 1rem auto 0;
}

.filter-bar select,
.filter-bar input[type="number"] {
    width: auto;
    flex: 1 1 160px;
    min-width: 120px;
    max-width: 200px;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.filter-bar select:focus,
.filter-bar input[type="number"]:focus {
    border-color: var(--input-focus);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.filter-bar button {
    flex: 0 0 auto;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =============================================
   RTL SUPPORT
   ============================================= */
[dir="rtl"] #modal-close  { left: auto; right: 1rem; }
[dir="rtl"] .card-meta    { flex-direction: row-reverse; }

/* Section headers — right-aligned in RTL */
[dir="rtl"] .section-header          { text-align: right; }
[dir="rtl"] .section-header h2,
[dir="rtl"] .section-header p        { text-align: right; }

/* Slides section header — swap title/link sides in RTL */
[dir="rtl"] .slides-header           { flex-direction: row-reverse; }
[dir="rtl"] .slides-header h2        { text-align: right; }

/* Footer text — right-aligned in RTL */
[dir="rtl"] .footer-brand p          { text-align: right; }
[dir="rtl"] .footer-col h4,
[dir="rtl"] .footer-col a            { text-align: right; }
[dir="rtl"] .footer-bottom           { flex-direction: row-reverse; }

/* Ask section — right-align text in RTL */
[dir="rtl"] .ask-body h2,
[dir="rtl"] .ask-body p              { text-align: right; }

/* Trends section header */
[dir="rtl"] .trends-section .section-header { text-align: right; }

/* Hero title — right-align in RTL */
[dir="rtl"] .hero-map-title          { text-align: right; }

/* Bell badge — left side in RTL (already handled, kept for clarity) */
[dir="rtl"] .bell-badge              { right: auto; left: -5px; }

/* =============================================
   RESPONSIVE — tablet 1024, 768, 480
   ============================================= */
@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .trends-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-actions { gap: 8px; }
    .navbar .logo span { display: none; }
    .nav-links { display: none; }
    .properties-grid { grid-template-columns: 1fr; }
    #modal-box { padding: 1.5rem; }
    .avatar-name { display: none; }
    .avatar-btn  { padding: 0.3rem 0.5rem; }

    .hero-map-section { height: 300px; }
    .hero-map-title { bottom: 3rem; }
    #hero-map { height: 300px !important; }
    .leaflet-container { width: 100% !important; max-width: 100% !important; overflow: clip !important; height: 300px !important; }

    .who-inner { flex-direction: column; gap: 1.5rem; }
    .who-video { width: 100%; max-width: 420px; min-height: 210px; }

    .ask-card { flex-direction: column; text-align: center; padding: 1.5rem; }
    .ask-btn { align-self: center; }

    .slides-track .slide-card { flex: 0 0 calc(50% - 0.625rem); min-width: calc(50% - 0.625rem); }

    .trends-grid { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .bottom-nav { display: block; }
    body { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 600px) {
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar select,
    .filter-bar input[type="number"] { max-width: 100%; }
    .filter-bar button { width: 100%; justify-content: center; }
    .search-glass { margin: 0 0.75rem; }
}

@media (max-width: 480px) {
    .search-tabs button { font-size: 0.78rem; padding: 0.32rem; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .slides-track .slide-card { flex: 0 0 calc(100% - 0.5rem); min-width: calc(100% - 0.5rem); }
    .hero-map-title h1 { font-size: 1.35rem; }
    .stat-item { flex: 1 1 calc(50% - 0.5rem); }
    .search-row { flex-direction: column; }
    .ad-banner-dark { padding: 1rem; flex-direction: column; text-align: center; }
    .ad-banner-light { padding: 0.75rem; flex-direction: column; text-align: center; }
}

/* =============================================
   MAP POPUP & PIN
   ============================================= */
.map-popup { width: 220px; font-family: 'Tajawal', sans-serif; direction: rtl; border-radius: 8px; overflow: hidden; }
.map-popup-img { height: 110px; background-size: cover; background-position: center; position: relative; }
.map-popup-badge { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.map-popup-body { padding: .75rem; background: #F5F2EC; }
.map-popup-price { font-size: 1rem; font-weight: 700; color: #141414; margin-bottom: 3px; }
.map-popup-title { font-size: .8rem; color: #555555; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-popup-area { font-size: .75rem; color: #888888; margin-bottom: 8px; }
.map-popup-link { display: block; text-align: center; background: #141414; color: #C9A84C; padding: 7px; border-radius: 6px; font-size: .8rem; font-weight: 700; text-decoration: none; }
.map-popup-link:hover { background: #B8962E; color: #F0E8D5; }
.map-pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.4); cursor: pointer; transition: transform .2s; }
.map-pin-dot:hover { transform: scale(1.4); }
.leaflet-popup-content { margin: 0; padding: 0; }
.leaflet-popup-content-wrapper { padding: 0; border-radius: 8px; overflow: hidden; }

/* =============================================
   DEDICATED MAP PAGE
   ============================================= */
.map-page-filter { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; background: rgba(245,242,236,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201,168,76,0.25); flex-wrap: wrap; }
[data-theme="dark"] .map-page-filter { background: rgba(20,20,20,0.8); }
.map-type-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.map-type-tab { padding: .32rem .85rem; border-radius: 20px; border: 1.5px solid var(--border); background: transparent; color: var(--text-primary); font-family: 'Tajawal', sans-serif; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.map-type-tab.active, .map-type-tab:hover { background: var(--accent-gold); color: #0A0A0A; border-color: var(--accent-gold); }
.map-area-select { padding: .32rem .7rem; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font-family: 'Tajawal', sans-serif; font-size: .82rem; min-width: 130px; }
.map-count-badge { margin-inline-start: auto; font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.map-page-legend { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .25rem 0; font-size: .75rem; color: var(--text-muted); width: 100%; }
.map-page-legend span { display: flex; align-items: center; gap: .3rem; }
#full-map { width: 100%; height: calc(100vh - 120px); }

@media (max-width: 768px) {
    .map-page-filter {
        gap: .5rem;
        padding: .5rem .75rem;
    }
    .map-type-tabs {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .map-type-tabs::-webkit-scrollbar,
    .map-page-legend::-webkit-scrollbar {
        display: none;
    }
    .map-type-tab {
        flex: 0 0 auto;
        padding-inline: .75rem;
    }
    .map-area-select {
        flex: 1 1 160px;
        min-width: 0;
    }
    .map-count-badge {
        margin-inline-start: 0;
        flex: 0 0 auto;
    }
    .map-page-legend {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-bottom: .1rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
}

/* =============================================
   DESIGN SYSTEM — Unified Components v2
   ============================================= */

/* ── Typography Utilities ── */
.t-hero  { font-size: var(--font-hero);  font-weight: 700; line-height: 1.2; }
.t-price { font-size: var(--font-price); font-weight: 700; color: var(--accent-gold); line-height: 1.2; }
.t-small { font-size: var(--font-sm); }
.t-tiny  { font-size: var(--font-tiny); }
.t-gold  { color: var(--accent-gold); }
.t-muted { color: var(--text-muted); }

h1 { font-size: var(--font-h1); font-weight: 700; line-height: 1.25; }
h2 { font-size: var(--font-h2); font-weight: 700; }
h3 { font-size: var(--font-h3); font-weight: 600; }

/* ── Section Wrapper ── */
.section {
    padding: var(--space-xl) 0;
}

.sec-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.sec-title {
    font-size: var(--font-h2);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.sec-more {
    font-size: var(--font-sm);
    color: var(--accent-gold);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition);
}
.sec-more:hover { color: var(--accent-hover); }

/* ── Glass Card ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.glass-card:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

/* ── Buttons ── */
.btn-gold {
    background: var(--accent-gold);
    color: #0A0A0A;
    border: 1.5px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.4rem;
    font-family: inherit;
    font-size: var(--font-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-gold:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #F0E8D5;
}

.btn-outline {
    background: transparent;
    color: var(--accent-gold);
    border: 1.5px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.4rem;
    font-family: inherit;
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-outline:hover {
    background: var(--accent-gold);
    color: #0A0A0A;
}

/* ── WhatsApp Button ── */
.wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.35rem 0.9rem;
    background: #25D366;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
}
.wa-btn:hover { background: #1ebe5d; color: #fff; }

/* ── Unified Property Card ── */
.prop-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
}
.prop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.prop-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-surface);
    flex-shrink: 0;
}
.prop-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.prop-card:hover .prop-card-img img { transform: scale(1.04); }

.prop-badge {
    position: absolute;
    top: var(--space-sm);
    inset-inline-end: var(--space-sm);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-tiny);
    font-weight: 700;
    z-index: 2;
    white-space: nowrap;
}

/* Listing type badge colours — works as .prop-badge.badge-{type} */
.badge-residential-sale  { background: #E24B4A; color: #fff; }
.badge-residential-rent  { background: #378ADD; color: #fff; }
.badge-commercial-sale   { background: #7B5EA7; color: #fff; }
.badge-commercial-rent   { background: #2D8A84; color: #fff; }
.badge-hotel             { background: #C9A84C; color: #1C1007; }

.prop-fav {
    position: absolute;
    top: var(--space-sm);
    inset-inline-start: var(--space-sm);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    font-size: 1rem;
    transition: background var(--transition), transform var(--transition);
    padding: 0;
}
.prop-fav:hover { background: var(--accent-gold); transform: scale(1.1); }

.prop-ai-badge {
    position: absolute;
    bottom: var(--space-sm);
    inset-inline-start: var(--space-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: var(--font-tiny);
    color: var(--accent-gold);
    font-weight: 600;
    z-index: 2;
}

.prop-card-body {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-xs);
}

.prop-card-price {
    font-size: var(--font-price);
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1.2;
}

.prop-card-title {
    font-size: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prop-card-meta {
    font-size: var(--font-tiny);
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.prop-card-area {
    font-size: var(--font-tiny);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.prop-card-footer {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-top: auto;
}

/* ── Cards Grids ── */
.props-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .props-grid,
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .props-grid,
    .cards-grid { grid-template-columns: 1fr; }
}

/* ── Search Component ── */
.stab {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.stab:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #0A0A0A;
}
.stab.active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

.search-input {
    flex: 1;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: var(--font-sm);
    outline: none;
    transition: border-color var(--transition);
}
.search-input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

/* ── Navbar Aliases ── */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
}

.nav-logo-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #0A0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Stab active state (app.js uses .on) ── */
.stab.on {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

/* =============================================
   HERO SEARCH OVERLAY (new homepage)
   ============================================= */
.hero-search-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0.75rem 1.5rem 1.25rem;
    pointer-events: none;
}
.hero-search-wrap > * { pointer-events: auto; }

.hero-stats-strip {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.hero-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #C9A84C;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.7rem;
    color: rgba(240,232,213,0.65);
    line-height: 1;
}

.hero-search-glass {
    background: rgba(10,10,10,0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    max-width: 860px;
    margin: 0 auto;
}

.hero-search-glass .search-tabs {
    margin-bottom: 0.6rem;
}

.hero-search-glass .stab {
    background: rgba(255,255,255,0.08);
    border-color: rgba(201,168,76,0.3);
    color: rgba(240,232,213,0.8);
}
.hero-search-glass .stab:hover {
    background: var(--accent-gold);
    color: #0A0A0A;
    border-color: var(--accent-gold);
}
.hero-search-glass .stab.on {
    background: var(--accent-gold);
    color: #0A0A0A;
    border-color: var(--accent-gold);
}

.hero-search-glass .search-row input,
.hero-search-glass .search-row select {
    background: rgba(255,255,255,0.1);
    border-color: rgba(201,168,76,0.3);
    color: #F0E8D5;
}
.hero-search-glass .search-row input::placeholder { color: rgba(240,232,213,0.5); }
.hero-search-glass .search-row input:focus,
.hero-search-glass .search-row select:focus {
    border-color: var(--accent-gold);
    background: rgba(255,255,255,0.14);
}
.hero-search-glass .search-row select option { background: #1E1E1E; color: #F0E8D5; }

@media (max-width: 768px) {
    .hero-stats-strip { gap: 1rem; }
    .hero-stat-num { font-size: 1.1rem; }
}
@media (max-width: 480px) {
    .hero-search-wrap { padding: 0.5rem 0.75rem 1rem; }
    .hero-stats-strip { gap: 0.65rem; margin-bottom: 0.5rem; }
    .hero-search-glass { padding: 0.6rem 0.75rem; }
    .hero-search-glass .search-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
        padding-bottom: 0;
        scrollbar-width: none;
    }
    .hero-search-glass .search-tabs::-webkit-scrollbar { display: none; }
    .hero-search-glass .stab {
        min-width: 0;
        padding-inline: 0.45rem;
        font-size: 0.76rem;
    }
    .hero-search-glass .search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 0.55rem;
        align-items: stretch;
    }
    .hero-search-glass .search-row input,
    .hero-search-glass .search-row select {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
    }
    .hero-search-glass .search-row .search-btn {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        min-height: 44px;
    }
    .hero-search-glass .search-row .voice-btn {
        grid-column: 2;
        grid-row: 3;
        width: 44px;
        height: 44px;
        align-self: stretch;
        justify-self: stretch;
    }
}

/* =============================================
   POPULAR AREAS — horizontal scroll
   ============================================= */
.popular-areas-section {
    padding: 1.5rem 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.areas-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-xs) 0 var(--space-sm);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.areas-scroll::-webkit-scrollbar { display: none; }

.area-card {
    flex: 0 0 130px;
    min-height: 95px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-md) var(--space-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}
.area-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.area-card-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.area-card-name {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

/* =============================================
   HORIZONTAL PROP CARD (.prop-card-h)
   ============================================= */
.prop-card-h {
    flex-direction: row;
    min-height: 160px;
}

.prop-card-h .prop-card-img {
    width: 38%;
    flex-shrink: 0;
    aspect-ratio: unset;
    min-height: 160px;
}

.prop-card-h .prop-card-body {
    padding: var(--space-sm) var(--space-md);
}

@media (max-width: 600px) {
    .prop-card-h {
        flex-direction: column;
    }
    .prop-card-h .prop-card-img {
        width: 100%;
        min-height: unset;
        aspect-ratio: 4 / 3;
    }
    .prop-card-h .prop-card-body {
        padding: var(--space-md);
    }
}

/* =============================================
   SPONSORED CARD (external ad banner)
   ============================================= */
.sponsored-card {
    border: 2px solid rgba(201,168,76,0.5) !important;
    background: rgba(201,168,76,0.04) !important;
    position: relative;
}

/* Sponsored property listing (boosted by owner) */
.prop-sponsored-listing {
    border: 2px solid rgba(201,168,76,0.5) !important;
    background: rgba(201,168,76,0.04) !important;
    position: relative;
}

.sponsored-label {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    background: #C9A84C;
    color: #141414;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0 16px 0 8px;
    z-index: 5;
}

/* =============================================
   LISTINGS SECTION
   ============================================= */
.listings-section {
    padding: var(--space-xl) 0;
    background: var(--bg-primary);
}

.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.listings-count {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .listings-grid { grid-template-columns: 1fr; }
}

/* ── Listing type tabs (link-based, no JS handler) ── */
.listing-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
    direction: rtl;
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    align-items: center;
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-size: var(--font-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}
.page-btn:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #0A0A0A;
}
.page-btn.active {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-text);
    pointer-events: none;
}
.page-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

/* =============================================
   ASK STRIP — single-line CTA bar
   ============================================= */
.ask-strip {
    background: #141414;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(201,168,76,0.2);
    border-bottom: 1px solid rgba(201,168,76,0.2);
}

[data-theme="light"] .ask-strip {
    background: var(--bg-surface);
}

.ask-strip-text {
    color: rgba(240,232,213,0.85);
    font-size: 0.92rem;
}
[data-theme="light"] .ask-strip-text { color: var(--text-secondary); }
.ask-strip-text strong { color: #C9A84C; }

.ask-strip-btn {
    background: #C9A84C;
    color: #0A0A0A;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.ask-strip-btn:hover { background: #B8962E; color: #F0E8D5; }

/* =============================================
   SEARCH PAGE — SPLIT LAYOUT (Airbnb style)
   ============================================= */
.search-layout {
    display: grid;
    grid-template-columns: 1fr 40%;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3rem;
    align-items: start;
}

.search-results-col { min-width: 0; }

.search-map-col {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    align-self: start;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
}

#search-map { width: 100%; height: 100%; }

/* Highlighted card (when pin clicked) */
.prop-card.card-highlighted {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 2px var(--accent-gold), var(--shadow-gold) !important;
}

/* Horizontal card footer inside body (no extra padding) */
.prop-card-h .prop-card-footer {
    padding: var(--space-xs) 0 0;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}

/* Mobile: stack layout, map togglable */
@media (max-width: 768px) {
    .search-layout {
        grid-template-columns: 1fr;
        padding: 0.75rem 0.75rem 3rem;
    }
    .search-map-col {
        display: none;
        position: static;
        height: 300px;
        border-radius: 12px;
    }
    .search-map-col.map-visible { display: block; }
}

/* =============================================
   SEARCH CARD DENSITY (Bayut-style .prop-card-h)
   ============================================= */

/* Card wrapper is now <div> — give it pointer cursor */
.prop-card { cursor: pointer; }

/* Image section can be <a> or <div> — ensure block display */
a.prop-card-img { display: block; text-decoration: none; }

/* Larger price on horizontal search cards */
.prop-card-h .prop-card-price-lg {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Price + agent circle on same row */
.prop-price-agent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .2rem;
}

/* Agent/owner initial circle */
.card-agent {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #141414;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: default;
}

/* Title: 2-line clamp */
.prop-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.45;
    margin-bottom: .2rem;
}

/* Description: 1-line ellipsis */
.prop-card-desc {
    font-size: .78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .3rem;
    line-height: 1.4;
}

/* Action buttons row */
.prop-card-actions {
    display: flex;
    gap: .35rem;
    align-items: center;
    margin-top: .4rem;
    flex-wrap: wrap;
}

/* WhatsApp button */
.card-wa-btn {
    padding: .32rem .75rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity .15s;
}
.card-wa-btn:hover { opacity: .85; }

/* Call button */
.card-call-btn {
    padding: .32rem .75rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color .15s, color .15s;
}
.card-call-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* Favorite heart button */
.card-fav-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: .85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s;
    margin-inline-start: auto;
}
.card-fav-btn:hover { border-color: #ef4444; }

/* Footer layout: area on top, actions below */
.prop-card-h .prop-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--space-xs) 0 0;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
}
