/* ==========================================================================
   Keypekee Real Estate Design System Core Root Variables
   ========================================================================== */
:root {
    --bg-base: #f8fafc;
    --surface-white: #ffffff;
    
    /* Blue Design Elements Palette */
    --brand-primary: #0f172a;       /* Deep Slate Corporate Navy */
    --brand-blue: #1d4ed8;          /* Bright Royal Accent Blue */
    --brand-blue-hover: #1e40af;    /* Darkened Active Link Royal Blue */
    --brand-blue-light: #eff6ff;    /* Ice Blue Background Shading Tint */
    
    /* Touch of Red Design Accent Elements */
    --brand-accent-red: #dc2626;    /* Vibrant Crimson Highlight Red */
    --brand-red-hover: #b91c1c;     /* Deep Blood Red Core Action States */
    --brand-red-light: #fef2f2;     /* Subtle Pinkish Red Badge Fills */
    
    /* Neutral Text Typography Channels */
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-neutral: #e2e8f0;
    
    --radius-md: 12px;
    --radius-sm: 6px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Body Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-dark);
    line-height: 1.5;
}

/* ==========================================================================
   Header Navigation Layout System
   ========================================================================== */
.kl-navbar {
    background-color: var(--surface-white);
    border-bottom: 1px solid var(--border-neutral);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.kl-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kl-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.kl-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.kl-nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.kl-nav-links a:hover,
.kl-nav-links a.active {
    color: var(--brand-blue);
}

/* Call to Action Navigation Primary Red Accent Button Integration */
.kl-nav-links .nav-cta-btn {
    background-color: var(--brand-accent-red);
    color: var(--surface-white) !important;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.kl-nav-links .nav-cta-btn:hover {
    background-color: var(--brand-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* ==========================================================================
   Catalog Hero & Modern Search Filters Header
   ========================================================================== */
.catalog-hero {
    background: radial-gradient(circle at 90% 10%, var(--brand-blue-light) 0%, transparent 40%), var(--surface-white);
    border-bottom: 1px solid var(--border-neutral);
    padding: 60px 24px;
    text-align: center;
}

.catalog-hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.catalog-hero h1 {
    font-size: 36px;
    color: var(--brand-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.catalog-hero p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

/* Interactive Elastic Layout Search Dashboard Panel Bar */
.filter-console-wrapper {
    background-color: var(--surface-white);
    border: 1px solid var(--border-neutral);
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
}

.search-input-box, .filter-select-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box {
    flex: 2;
}

.filter-select-box {
    flex: 1;
    border-left: 1px solid var(--border-neutral);
    padding-left: 12px;
}

.search-icon, .filter-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}

.filter-icon {
    left: 24px;
}

.calc-control, .filter-console-wrapper input, .filter-console-wrapper select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid transparent;
    background-color: var(--bg-base);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition-smooth);
}

.filter-console-wrapper select {
    padding-left: 48px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.filter-console-wrapper input:focus, .filter-console-wrapper select:focus {
    background-color: var(--surface-white);
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* ==========================================================================
   Listing Grid System Layout Container Elements
   ========================================================================== */
.catalog-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
}

.catalog-meta-strip {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-counter {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.properties-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

/* ==========================================================================
   Premium Real Estate Adaptive Showcase Property Card Framework
   ========================================================================== */
.property-card {
    background-color: var(--surface-white);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(29, 78, 216, 0.15);
}

/* Image Wrapper Layouts */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    background-color: var(--brand-primary);
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.property-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

/* Status Badges Overlay Configurations */
.status-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-onsale {
    background-color: #10b981;
    color: var(--surface-white);
}

.badge-sold {
    background-color: var(--text-dark);
    color: var(--surface-white);
}

/* Cash Investment Banner Placement Overlay Ribbon */
.price-overlay-ribbon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background-color: var(--brand-primary);
    color: var(--surface-white);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    border-left: 3px solid var(--brand-accent-red); /* High Contrast Red Element Stamp */
}

/* Body Content Block Text Streams */
.card-body-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.location-metadata {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-blue); /* Professional Blue Highlight marker font */
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.property-card-title {
    font-size: 20px;
    color: var(--brand-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-card-snippet {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Individual Feature Pill Strips */
.property-specs-strip {
    display: flex;
    gap: 12px;
    border-top: 1px dashed var(--border-neutral);
    padding-top: 16px;
}

.spec-pill {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Action Footer Container Controls */
.card-footer-actions {
    padding: 0 24px 24px 24px;
    background-color: var(--surface-white);
}

.btn-details-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: var(--bg-base);
    color: var(--brand-primary);
    text-decoration: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-neutral);
}

.property-card:hover .btn-details-link {
    background-color: var(--brand-accent-red); /* Transitions to complete crimson red identity on explicit layout hover */
    color: var(--surface-white);
    border-color: var(--brand-accent-red);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-details-link i {
    transition: transform 0.2s ease;
}

.property-card:hover .btn-details-link i {
    transform: translateX(4px);
}

/* ==========================================================================
   System Handling & Fallback Component Structures (Empty States)
   ========================================================================== */
.catalog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    background-color: var(--surface-white);
    border: 1px dashed var(--border-neutral);
    border-radius: var(--radius-md);
    max-width: 500px;
    margin: 40px auto;
}

.catalog-empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.catalog-empty-state h3 {
    font-size: 18px;
    color: var(--brand-primary);
    margin-bottom: 6px;
}

.catalog-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Footer Container Base Frame Elements */
.kl-footer {
    text-align: center;
    padding: 40px 24px;
    background-color: var(--brand-primary);
    color: #94a3b8;
    font-size: 13px;
    border-top: 4px solid var(--brand-accent-red);
}

/* ==========================================================================
   Media Breakpoint Queries for Responsive Adaptability Matrix
   ========================================================================== */
@media (max-width: 768px) {
    .kl-nav-links a:not(.nav-cta-btn) {
        display: none; /* Collapses text routes gracefully for basic mobile configurations */
    }
    .filter-console-wrapper {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    .filter-select-box {
        border-left: none;
        padding-left: 0;
    }
    .filter-icon {
        left: 12px;
    }
    .properties-display-grid {
        grid-template-columns: 1fr;
    }
    .catalog-hero h1 {
        font-size: 28px;
    }
}