:root {
    --primary: #0f172a;        /* Navy Slate */
    --primary-light: #1e293b;
    --accent: #e60000;         /* Brand Red */
    --accent-hover: #cc0000;
    --secondary: #3b82f6;      /* Trust Blue */
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --border: #eef2f6;
    --white: #ffffff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    height: 90px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.header-search input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eef2f6;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1.5px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo span {
    color: var(--accent);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Header */
@media (max-width: 991px) {
    header {
        height: auto !important;
        padding: 15px 0 !important;
        position: static !important;
    }
    .nav-container {
        flex-direction: column !important;
        gap: 15px !important;
    }
    .header-search {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        order: 3;
    }
    .logo {
        order: 1;
    }
    .nav-links {
        width: 100% !important;
        justify-content: center !important;
        gap: 15px !important;
        order: 2;
        flex-wrap: wrap;
    }
    .btn-contact-header {
        display: none !important; /* Hide in mobile header to save space */
    }
}

/* Hero Section Premium */
.hero {
    padding: 120px 0 160px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&q=80&w=2000') center/cover no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

/* Property Grid */
.property-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px 0;
}

.property-card {
    display: flex !important;
    flex-direction: row !important;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 300px; /* Fixed height for consistency */
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
}

.property-card:hover {
    transform: translateX(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.card-image {
    width: 400px !important;
    height: 100% !important;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

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

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

.card-tags {
    position: absolute;
    top: 15px !important;
    left: 15px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    z-index: 50 !important;
}

.card-tag {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    white-space: nowrap !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-block !important;
    position: static !important;
}

.card-tag.sale { 
    background: rgba(15, 23, 42, 0.85) !important;
}

.card-tag.rent, .card-tag.temporal { 
    background: rgba(230, 0, 0, 0.85) !important;
}

.card-tag.status { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.property-card .info {
    padding: 30px 40px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.property-card .price {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.property-card .title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.specs {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.spec-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.spec-badge:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.spec-badge svg {
    color: var(--accent);
}

/* Premium Buttons */
.btn-primary, .btn-contact-header {
    background: linear-gradient(135deg, var(--accent) 0%, #990000 100%);
    color: white !important;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(230, 0, 0, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover, .btn-contact-header:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(230, 0, 0, 0.35);
}

/* Mobile Property Cards */
@media (max-width: 991px) {
    .property-card {
        flex-direction: column !important;
        min-height: auto !important;
    }
    .card-image {
        width: 100% !important;
        height: 240px !important;
    }
    .property-card .info {
        padding: 24px !important;
    }
}

/* Detail Page Refinement */
.detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
}

.btn-fav-sidebar {
    width: 100% !important;
    margin-top: 15px;
    position: relative !important;
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

/* Status Tags Premium Overhaul */
.status-pill, .badge-premium, .card-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.status-pill:hover, .badge-premium:hover, .card-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Specific Colors with Vibrant Gradients */
.status-pill.sale, .badge-premium.sale, .card-tag.sale { 
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%); 
}

.status-pill.available, .badge-premium.available, .card-tag.status, .status-pill.status { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.status-pill.rent, .badge-premium.rent, .card-tag.rent {
    background: linear-gradient(135deg, #e60000 0%, #990000 100%);
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

/* Entrance Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.property-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Premium Gallery Bento Grid */
.premium-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 250px);
    gap: 12px;
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.premium-gallery img, .premium-gallery .placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-gallery img:hover {
    filter: brightness(0.85);
    transform: scale(1.02);
}

.main-img {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.sub-img {
    grid-column: span 1;
}

.btn-all-photos {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: white;
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 10;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.btn-all-photos:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    background: var(--bg-subtle);
}

/* Amenity Grid Improvement */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg-subtle);
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.amenity-item:hover {
    background: white;
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* Quick Specs Premium */
.quick-spec-card {
    background: white;
    padding: 15px 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quick-spec-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.quick-spec-card .icon-box {
    width: 45px;
    height: 45px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.quick-spec-card .val {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.quick-spec-card .lab {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Adjustments for Gallery */
@media (max-width: 768px) {
    .premium-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 300px;
    }
    .sub-img {
        display: none;
    }
    .main-img {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
    }
}