:root {
    --bg-app: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #3b82f6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --brand-primary: #0f172a;
    --brand-secondary: #1e293b;
    --brand-accent: #2563eb;
    --brand-accent-hover: #1d4ed8;

    /* Armenian Tricolor Subtle Accents */
    --am-red: #d90012;
    --am-blue: #0033a0;
    --am-orange: #f2a800;

    /* Platform & Status Badges */
    --badge-fb: #1877f2;
    --badge-listam: #f97316;
    --badge-sale: #059669;
    --badge-rent: #7c3aed;

    --price-green: #059669;
    --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 16px 32px -6px rgba(15, 23, 42, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --header-height: 84px;
    --filter-top-gap: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    background: linear-gradient(135deg, #0b1120 0%, #0f172a 40%, #1e293b 100%);
    color: white;
    padding: clamp(0.65rem, 1.5vw, 1rem) clamp(0.75rem, 2.5vw, 2rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

header.is-scrolled {
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.25rem);
    flex-wrap: wrap;
}

/* Brand Container & Logo */
.brand-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
}

.brand-logo-link:hover {
    transform: translateY(-1px) scale(1.04);
}

.brand-logo-link:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 3px;
}

.brand-logo {
    display: block;
    width: 46px;
    height: 46px;
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: box-shadow 0.25s ease;
}

.brand-logo-link:hover .brand-logo {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.header-branding {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.header-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.1rem;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
    animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.source-pills-header {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
}

header .logo {
    font-size: clamp(1.15rem, 3.2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    font-size: clamp(0.72rem, 1.8vw, 0.84rem);
    color: #94a3b8;
    margin: 0;
    line-height: 1.3;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    gap: 2px;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

.language-btn {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    font-size: clamp(0.72rem, 1.6vw, 0.78rem);
    font-weight: 600;
    padding: clamp(0.28rem, 1vw, 0.35rem) clamp(0.55rem, 1.5vw, 0.75rem);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.language-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.language-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Main Catalog Layout
   ========================================================================== */
main {
    max-width: 1440px;
    margin: clamp(0.75rem, 2vw, 1.5rem) auto;
    padding: 0 clamp(0.5rem, 2vw, 1.25rem);
}

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: clamp(1rem, 2.2vw, 1.75rem);
    align-items: start;
    transition: grid-template-columns 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-column {
    position: sticky;
    top: calc(var(--header-height) + var(--filter-top-gap));
    max-height: calc(100vh - var(--header-height) - var(--filter-top-gap) - 1.25rem);
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Filter Toolbar
   ========================================================================== */
.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding: 0 0.2rem;
    flex-shrink: 0;
}

.filter-toolbar-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.filter-icon {
    color: var(--primary, #2563eb);
    flex-shrink: 0;
}

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

.filter-active-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    padding: 0 0.35rem;
    border-radius: var(--radius-full);
    line-height: 1;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.reset-btn {
    background: none;
    border: 0;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.reset-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.collapse-btn {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.collapse-btn:hover {
    background: #1e293b;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.collapse-chevron {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Filter Panel
   ========================================================================== */
.filter-panel {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    min-height: 0;
    flex: 1;
}

.filter-panel::-webkit-scrollbar {
    width: 6px;
}

.filter-panel::-webkit-scrollbar-track {
    background: transparent;
}

.filter-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.filter-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.field-label,
.filter-group legend {
    color: var(--text-muted);
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.filter-control {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font: inherit;
    padding: 0.55rem 0.75rem;
    width: 100%;
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.filter-control:hover {
    border-color: #cbd5e1;
}

.filter-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.keyword-search {
    background: #ffffff;
    border-color: #cbd5e1;
}

.filter-group {
    border: 0;
    margin: 1rem 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.filter-group label {
    color: #334155;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin: 0.45rem 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.filter-group label:hover {
    color: var(--brand-accent);
}

.filter-group input[type="checkbox"] {
    accent-color: var(--brand-accent);
    margin-right: 0.55rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ==========================================================================
   Dev / Test Filter Group & Quick Pill (Localhost & Testing Only)
   ========================================================================== */
.dev-test-group,
.dev-quick-pill {
    display: none !important;
}

.is-dev-env .dev-test-group {
    display: block !important;
}

.is-dev-env .dev-quick-pill {
    display: inline-flex !important;
}

.dev-quick-pill {
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1.5px solid #818cf8;
    color: #4338ca;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.32rem 0.75rem;
    border-radius: var(--radius-full, 9999px);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.15);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.dev-quick-pill:hover {
    background: #e0e7ff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.25);
}

.dev-quick-pill.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: #4338ca;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 3px 10px rgba(79, 70, 229, 0.4);
}

.dev-test-group {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.75) 0%, rgba(243, 232, 255, 0.75) 100%);
    border: 1.5px dashed #818cf8 !important;
    border-radius: var(--radius-md);
    padding: 0.85rem 0.95rem;
    margin: 0.5rem 0 1.1rem 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    transition: all 0.2s ease;
}

.dev-test-group:hover {
    border-color: #6366f1 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.dev-test-group .filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.dev-test-group legend {
    color: #4338ca;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.dev-test-group .dev-badge {
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.dev-test-group label {
    color: #1e1b4b;
    font-weight: 500;
    margin: 0.4rem 0;
}

.dev-test-group label:hover {
    color: #4f46e5;
}

.dev-test-group input[type="checkbox"] {
    accent-color: #4f46e5;
}

.filter-group-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.filter-group-header legend {
    margin-bottom: 0;
}

.mode-control {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-control:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.location-options {
    max-height: 180px;
    overflow-y: auto;
    padding-top: 0.25rem;
}

.location-options::-webkit-scrollbar {
    width: 5px;
}

.location-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.location-options label {
    margin: 0.4rem 0;
}

.location-search {
    font-size: 0.8rem;
    padding: 0.42rem 0.65rem;
    margin-bottom: 0.5rem;
}

.range-fields {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr 1fr;
}

.range-fields .filter-control {
    margin-bottom: 0.2rem;
}

.filter-hint {
    color: var(--text-light);
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0.25rem 0 1rem;
}

/* ==========================================================================
   Results Panel & Toolbar
   ========================================================================== */
.results-panel {
    min-width: 0;
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.6rem, 1.5vw, 1rem);
    border-bottom: 1px solid var(--border);
    margin-bottom: clamp(0.75rem, 1.8vw, 1rem);
    padding-bottom: clamp(0.5rem, 1.2vw, 0.75rem);
    flex-wrap: wrap;
}

.results-title-wrap {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.2vw, 0.75rem);
    flex-wrap: wrap;
}

.results-title-wrap h2 {
    font-size: clamp(1.15rem, 2.8vw, 1.35rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.result-count {
    color: #1d4ed8;
    font-size: clamp(0.75rem, 1.6vw, 0.82rem);
    font-weight: 600;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
}

.toolbar-sort-wrap {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.65rem);
}

.sort-heading {
    font-size: clamp(0.75rem, 1.6vw, 0.82rem);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sort-select {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: clamp(0.78rem, 1.8vw, 0.84rem);
    font-weight: 600;
    padding: clamp(0.35rem, 1vw, 0.42rem) clamp(2rem, 2.5vw, 2.25rem) clamp(0.35rem, 1vw, 0.42rem) clamp(0.65rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    appearance: none;
    -webkit-appearance: none;
}

.sort-select:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.sort-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Active filter chips */
.active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.filter-chip {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    padding: 0.25rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    background: #e2e8f0;
}

.chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.chip-remove:hover {
    color: #ef4444;
}

/* ==========================================================================
   Listings Grid & Property Cards
   ========================================================================== */
.listings-grid {
    display: grid;
    gap: 0.85rem;
}

.property-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

@media (max-width: 768px) {
    .property-card {
        grid-template-columns: 1fr;
    }
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: #94a3b8;
}

/* ==========================================================================
   Card Media & Visuals
   ========================================================================== */
.card-media {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 190px;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .card-media {
        min-height: 180px;
        aspect-ratio: 16 / 9;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
}

.card-media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #0f172a;
    z-index: 1;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.property-card:hover .card-media-img {
    transform: scale(1.04);
}

.photo-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.card-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
    text-align: center;
    overflow: hidden;
    user-select: none;
}

.card-media-fallback.cat-apartment {
    background: radial-gradient(circle at 50% 30%, #1e3a5f 0%, #0f172a 80%);
}

.card-media-fallback.cat-house {
    background: radial-gradient(circle at 50% 30%, #1e3d36 0%, #0c1a17 80%);
}

.card-media-fallback.cat-land {
    background: radial-gradient(circle at 50% 30%, #233b26 0%, #0b1c11 80%);
}

.card-media-fallback.cat-general {
    background: radial-gradient(circle at 50% 30%, #2a3342 0%, #0f172a 80%);
}

.fallback-graphic {
    width: 100%;
    height: 100%;
    max-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.88;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.fallback-svg {
    width: 100%;
    height: 100%;
    max-height: 120px;
}

.property-card:hover .fallback-graphic {
    transform: scale(1.03);
    opacity: 1;
}


.skeleton-image {
    width: 100%;
    height: 100%;
    min-height: 190px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .skeleton-image {
        min-height: 180px;
        aspect-ratio: 16 / 9;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
}

.skeleton-image::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

.property-info {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.35rem, 0.9vw, 0.5rem);
    min-width: 0;
}

.listing-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.4rem, 1.2vw, 0.75rem);
    flex-wrap: wrap;
}

.tags-container {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.8vw, 0.4rem);
    flex-wrap: wrap;
}

.source-tag {
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: clamp(0.64rem, 1.4vw, 0.7rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.source-tag.fb {
    background: linear-gradient(135deg, #1877f2, #0d5ec4);
}

.source-tag.listam {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.source-tag.source-telegram {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

.source-tag.source-estateam {
    background: linear-gradient(135deg, #059669, #047857);
}

.source-tag.sale {
    background: linear-gradient(135deg, #10b981, #059669);
}

.source-tag.rent {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.category-tag {
    font-size: clamp(0.7rem, 1.5vw, 0.75rem);
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-sm);
}

.time-tag {
    font-size: clamp(0.7rem, 1.5vw, 0.75rem);
    color: var(--text-muted);
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.price {
    font-size: clamp(1.15rem, 3.2vw, 1.38rem);
    color: var(--price-green);
    font-weight: 800;
    letter-spacing: -0.015em;
}

.specs-row {
    display: flex;
    gap: clamp(0.25rem, 0.8vw, 0.4rem);
    flex-wrap: wrap;
    margin: 0.1rem 0;
}

.spec-pill {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #334155;
    font-size: clamp(0.7rem, 1.6vw, 0.78rem);
    font-weight: 600;
    padding: clamp(0.18rem, 0.6vw, 0.22rem) clamp(0.4rem, 1vw, 0.55rem);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.spec-pill.sqm-rate {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.spec-pill.zoning-agri {
    background: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
}

.spec-pill.zoning-housing {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.location {
    font-size: clamp(0.82rem, 1.8vw, 0.88rem);
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.location-container {
    margin-top: 0.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.map-link-btn {
    background: none;
    border: none;
    padding: 0.12rem 0.25rem 0.12rem 0;
    margin: 0;
    font: inherit;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-align: left;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
    max-width: 100%;
    flex-wrap: wrap;
}

.map-link-btn:hover {
    color: #2563eb;
}

.loc-text {
    font-size: clamp(0.82rem, 1.8vw, 0.88rem);
    font-weight: 600;
}


.pin-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.description-snippet {
    font-size: clamp(0.78rem, 1.7vw, 0.84rem);
    color: #64748b;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    transition: all 0.2s ease;
}

.description-snippet.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    white-space: pre-line;
}

.description-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.1rem;
}

.description-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.description-expand-btn {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0.1rem 0.35rem 0.1rem 0;
    margin: 0;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.description-expand-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.description-expand-btn .expand-arrow {
    font-size: 0.75rem;
    line-height: 1;
}

.translate-toggle-btn {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0.1rem 0.35rem 0.1rem 0;
    margin: 0;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.translate-toggle-btn:hover {
    color: var(--primary, #2563eb);
}

.translate-toggle-btn .translate-icon {
    font-size: 0.75rem;
}

/* ==========================================================================
   Card Footer & Actions
   ========================================================================== */
.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: clamp(0.45rem, 1.2vw, 0.65rem);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    width: 100%;
}

/* Base button properties shared across all card footer actions */
.phone-link,
.map-btn,
.share-btn,
.view-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    gap: 0.4rem;
    transition: all 0.16s ease;
    user-select: none;
}

.phone-link svg,
.map-btn svg,
.share-btn svg,
.view-btn svg {
    flex-shrink: 0;
}

/* Phone Contact Link (Inviting Emerald Badge) */
.phone-link {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.phone-link:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px -1px rgba(22, 101, 52, 0.15);
}

.phone-link:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Map Action (Refined Neutral Surface) */
.map-btn {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.map-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px -1px rgba(15, 23, 42, 0.08);
}

.map-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Share Action (Refined Neutral Surface) */
.share-btn {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.share-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px -1px rgba(15, 23, 42, 0.08);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* View Original Post (Primary Brand Accent CTA) */
.view-btn {
    background: var(--brand-accent);
    border: 1px solid var(--brand-accent);
    color: #ffffff;
    font-weight: 600;
    padding: 0 0.95rem;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15);
}

.view-btn .arrow {
    display: inline-block;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
    line-height: 1;
}

.view-btn:hover {
    background: var(--brand-accent-hover);
    border-color: var(--brand-accent-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.35);
}

.view-btn:hover .arrow {
    transform: translate(2px, -2px);
}

.view-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   Skeleton Loading State
   ========================================================================== */
.skeleton-card {
    pointer-events: none;
}

.skeleton-line {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-header { width: 40%; height: 20px; margin-bottom: 0.5rem; }
.skeleton-price { width: 30%; height: 26px; margin-bottom: 0.4rem; }
.skeleton-details { width: 50%; height: 16px; margin-bottom: 0.4rem; }
.skeleton-location { width: 35%; height: 16px; margin-bottom: 0.4rem; }
.skeleton-snippet { width: 90%; height: 14px; }

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

/* ==========================================================================
   Pagination & Load More
   ========================================================================== */
.pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    text-align: center;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.load-more-btn {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.load-more-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--card-shadow-hover);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
    background: #ffffff;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.empty-icon-wrap {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.empty-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.empty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 420px;
    margin-bottom: 0.75rem;
}

.reset-filter-btn {
    background: var(--brand-accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.reset-filter-btn:hover {
    background: var(--brand-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

/* ==========================================================================
   Floating Back To Top Button
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
    z-index: 90;
}

.back-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    background: #1e293b;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    pointer-events: none;
}

.toast-message {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast-message.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-message.fade-out {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
}

.toast-icon {
    color: #10b981;
    font-weight: 800;
}

/* ==========================================================================
   Google Maps Interactive Modal
   ========================================================================== */
body.modal-open {
    overflow: hidden;
}

.map-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.map-modal-backdrop.active,
.map-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.map-modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.45);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-modal-backdrop.active .map-modal-dialog,
.map-modal-backdrop.is-open .map-modal-dialog {
    transform: scale(1) translateY(0);
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: #f8fafc;
}

.map-modal-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.25rem;
}

.map-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.map-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0 0;
}

.map-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.map-modal-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.map-modal-body {
    position: relative;
    width: 100%;
    height: 380px;
    background: #e2e8f0;
}

.map-modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: #f8fafc;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.map-modal-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.map-modal-open-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all 0.15s ease;
}

.map-modal-open-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.map-loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    z-index: 1;
}

.map-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: #ffffff;
    margin-top: 2rem;
}

/* ==========================================================================
   Collapsed Filter State
   ========================================================================== */
.catalog-layout.filters-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.filters-collapsed .filter-panel {
    display: none;
}

.filters-collapsed .filter-toolbar-label,
.filters-collapsed .reset-btn {
    display: none;
}

.filters-collapsed .filter-toolbar {
    justify-content: center;
    margin-bottom: 0;
}

.filters-collapsed .collapse-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Mobile & Tablet Responsiveness
   ========================================================================== */
@media (max-width: 900px) {
    .catalog-layout,
    .catalog-layout.filters-collapsed {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-column {
        position: sticky;
        top: 0;
        z-index: 50;
        width: 100%;
        background: var(--bg, #f8fafc);
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    .filter-toolbar {
        background: #ffffff;
        border: 1px solid var(--border);
        box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.08);
        padding: 0.5rem 0.8rem;
        border-radius: var(--radius-md);
        margin-bottom: 0;
        cursor: pointer;
        user-select: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .filter-toolbar:hover {
        border-color: #94a3b8;
    }

    .filter-panel {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        max-height: calc(85vh - 60px);
        overflow-y: auto;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        box-shadow: 0 18px 40px -6px rgba(15, 23, 42, 0.28);
        z-index: 60;
    }

    .filters-collapsed .filter-panel {
        display: none;
    }

    .filters-collapsed .filter-toolbar-label,
    .filters-collapsed .reset-btn {
        display: inline-block;
    }

    .filters-collapsed .filter-toolbar {
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    header {
        position: relative;
    }

    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .brand-container {
        gap: 0.6rem;
        max-width: 74%;
        min-width: 0;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
        border-radius: 9px;
    }

    .header-branding {
        max-width: 100%;
        min-width: 0;
    }

    header .logo {
        font-size: clamp(0.95rem, 3.6vw, 1.25rem);
    }

    .results-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        margin-bottom: 0.65rem;
        padding-bottom: 0.45rem;
    }

    .results-title-wrap {
        justify-content: space-between;
        width: 100%;
    }

    .toolbar-sort-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        flex: 1;
        max-width: 240px;
    }

    .property-info {
        padding: 0.7rem 0.8rem;
        gap: 0.35rem;
    }

    .price-row {
        margin-top: 0;
        gap: 0.4rem;
    }

    .price {
        font-size: 1.22rem;
    }

    .specs-row {
        margin: 0.05rem 0;
        gap: 0.25rem;
    }

    .spec-pill {
        padding: 0.14rem 0.42rem;
        font-size: 0.72rem;
    }

    .location-container {
        margin-top: 0;
    }

    .card-footer {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0.35rem;
        padding-top: 0.45rem;
        margin-top: auto;
    }

    .view-btn {
        flex: 1;
        min-width: 0;
        height: 32px;
        min-height: 32px;
        font-size: 0.78rem;
        padding: 0 0.65rem;
    }

    .phone-link {
        flex-shrink: 0;
        height: 32px;
        min-height: 32px;
        font-size: 0.78rem;
        padding: 0 0.55rem;
    }

    .share-btn {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        border-radius: var(--radius-sm);
    }

    .share-btn span {
        display: none;
    }
}

@media (max-width: 420px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .brand-container {
        max-width: 100%;
        width: 100%;
    }

    .header-branding {
        max-width: 100%;
    }

    .language-toggle {
        align-self: flex-start;
    }

    .toolbar-sort-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .sort-select {
        max-width: 100%;
        width: 100%;
        font-size: 0.78rem;
    }
}