﻿/* --- 1. CORE VARIABLES & RESET (CHUẨN LUXURY) --- */
*, ::before, ::after {
    box-sizing: border-box; /* Giúp padding không làm nở độ rộng 1200px */
}
:root {
    /* Màu sắc thương hiệu */
    --primary: #064e3b; /* Emerald 900 */
    --primary-hover: #047857; /* Emerald 700 */
    --primary-light: #ecfdf5; /* Emerald 50 */
    --gold: #C5A059; /* Gold Luxury 
    /* Màu chữ & Nền */
    --text-main: #1f2937; /* Gray 800 */
    --text-muted: #6b7280; /* Gray 500 */
    --border-color: #e5e7eb; /* Gray 200 */
    --bg-body: #ffffff;
    --bg-soft: #f9fafb; /* Gray 50 */
    /* Kích thước & Font */
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-serif: 'Playfair Display', serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75em;
}

.font-serif {
    font-family: var(--font-serif);
}

.font-black {
    font-weight: 600 !important;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
    color: inherit;
}

/* Utilities */
.container-custom {
    width: 100%;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px;
}

.text-primary {
    color: var(--primary);
}

.bg-soft {
    background-color: var(--bg-soft);
}

/* --- 2. HEADER & NAVBAR --- */
.nav-link-clean {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    padding: 8px 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

    .nav-link-clean:hover {
        color: var(--primary);
    }

    .nav-link-clean::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -2px;
        left: 0;
        background-color: var(--primary);
        transition: width 0.3s ease;
    }

    .nav-link-clean:hover::after {
        width: 100%;
    }

/* Hotline Button */
.btn-hotline {
    background-color: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
}

    .btn-hotline:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
    }

/* --- 3. FILTER BOX (MODERN) --- */
.filter-box {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr auto;
    gap: 16px;
    align-items: end;
}

.filter-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    margin-left: 4px;
}

.filter-control {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-soft);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

input.filter-control {
    background-image: none;
}

.filter-control:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

/* Responsive Filter */
@media (max-width: 1024px) {
    .filter-box {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

        .filter-box > div:first-child {
            grid-column: 1 / -1;
        }

        .filter-box > div:last-child {
            grid-column: 1 / -1;
        }
}

@media (max-width: 640px) {
    .filter-box {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .filter-control {
        height: 45px;
        font-size: 13px;
    }
}

/* --- 4. BUILDING CARDS (SẢN PHẨM) --- */
.building-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 cột */
    gap: 30px;
}

.building-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .building-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
        border-color: var(--primary);
    }

.card-img-top {
    height: 240px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.building-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px; /* Cố định chiều cao tiêu đề */
}

    .card-title a:hover {
        color: var(--primary);
    }

.card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    margin-top: auto;
}

    .card-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

/* --- QUAN TRỌNG: RESPONSIVE CHO MOBILE 2 CỘT --- */
@media (max-width: 1024px) {
    .building-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    /* 1. Chia 2 cột trên Mobile */
    .building-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px; /* Khoảng cách nhỏ hơn */
    }

    /* 2. Thu nhỏ Card để vừa 2 cột */
    .card-img-top {
        height: 140px;
    }
    /* Ảnh thấp hơn */

    .card-body {
        padding: 12px;
    }
    /* Padding mỏng hơn */

    .card-title {
        font-size: 14px; /* Chữ nhỏ hơn */
        height: 40px; /* Chiều cao tiêu đề nhỏ hơn */
        margin-bottom: 4px;
    }

    .card-price {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .card-meta {
        font-size: 10px;
        gap: 6px;
        flex-wrap: wrap; /* Cho phép xuống dòng nếu cần */
    }

        .card-meta i {
            width: 12px;
            height: 12px;
        }
    /* Icon nhỏ lại */
}

/* --- 5. GALLERY (CHI TIẾT SẢN PHẨM) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    height: 450px;
}

.gallery-main {
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.gallery-item {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .gallery-main {
        height: 250px;
    }

    .gallery-side {
        display: none;
    }
    /* Ẩn ảnh phụ trên mobile */
}

/* --- 6. SIDEBAR & FORM (CHI TIẾT) --- */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

.quote-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    background: var(--bg-soft);
}

    .form-input:focus {
        background: white;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
    }

.btn-submit-quote {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 15px;
    padding: 14px;
    border-radius: var(--radius-md);
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

    .btn-submit-quote:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
    }

/* Buttons Liên hệ */
.btn-zalo {
    background-color: #0b4428;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-schedule {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    margin-top: 12px;
}

    .btn-schedule:hover {
        background-color: var(--primary-light);
    }

/* --- 7. QUY TRÌNH (STEPS) --- */
.step-circle {
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(6, 78, 59, 0.2);
    transition: 0.3s;
}

    .step-circle:hover {
        transform: scale(1.1);
    }

.step-badge {
    position: absolute;
    top: 0;
    right: -5px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-light);
    border: 2px solid white;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 8. UTILITIES KHÁC --- */
.hero-solid-bg {
    background-color: #022c22;
    color: white;
}

.filter-overlap {
    margin-top: -50px;
    position: relative;
    z-index: 20;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 14px;
}

    .specs-table td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .specs-table tr:last-child td {
        border-bottom: none;
    }

.specs-label {
    font-weight: 600;
    background-color: var(--bg-soft);
    width: 35%;
    color: var(--text-muted);
}

/* Scrollbar ẩn */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* --- 1. SỬA LỖI MENU TRÊN MOBILE --- */
@media (max-width: 1024px) {
    /* Ẩn Mega Menu dạng hover trên điện thoại để không bị đè nội dung */
    .mega-menu, .alpha-dropdown-panel {
        display: none !important;
    }

    /* Ẩn Nav Desktop trên Mobile (Nếu chưa ẩn) */
    .xl\:flex {
        display: none !important;
    }
}
/* Áp dụng cho Header và tất cả các trang khác */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px !important; /* Chiều rộng cố định giống Maison */
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Đảm bảo Header không có padding lạ làm rộng hơn nội dung */
    header {
        width: 100% !important;
    }
}

/* Tinh chỉnh cho màn hình nhỏ hơn 1200px một chút (như iPad Pro) */
@media (min-width: 768px) and (max-width: 1200px) {
    .container {
        max-width: 95% !important;
    }

}


/* --- CSS DÙNG CHUNG CHO BỘ LỌC MAISON STYLE --- */

/* Khống chế độ dày font chữ Bold 700 */
.font-black, .font-bold, h1, h2, h3, b {
    font-weight: 600 !important;
}

/* Giao diện ô chọn Select2 (Selection Box) */
.select2-container--default .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    height: auto !important;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 28px !important;
        font-weight: 600 !important;
        color: #111827 !important;
        font-size: 14px !important;
        line-height: normal !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        display: none !important;
    }
/* ========================================================
   CUSTOM CSS CHO SELECT2 (MODERN DROPDOWN)
======================================================== */

/* 1. Box thả xuống nổi (Floating Dropdown) - FIX CHIỀU RỘNG Ở ĐÂY */
.modern-dropdown.select2-dropdown {
    min-width: 260px !important; /* Đặt độ rộng tối thiểu cho khung cha */
    width: auto !important; /* Tự động bung rộng nếu chữ dài */
    background-color: #ffffff !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15) !important;
    padding-bottom: 8px !important;
    margin-top: 8px !important;
    z-index: 9999 !important;
}

/* 2. Khung bao quanh ô Search */
.modern-dropdown .select2-search--dropdown {
    padding: 12px 12px 8px 12px !important;
    /* Đã xóa lệnh min-width ở đây để nó không đâm thủng viền nữa */
}

/* 3. Ruột của ô Search */
.modern-dropdown .select2-search__field {
    width: 100% !important; /* Ép input rộng vừa khít khung cha */
    box-sizing: border-box !important; /* Khóa chết padding không làm phình kích thước */
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    padding: 10px 12px !important;
    background-color: #f9fafb !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

    .modern-dropdown .select2-search__field:focus {
        border-color: #064e3b !important; /* Đổi màu viền khi bấm vào */
    }

/* 4. Vùng chứa danh sách menu */
.modern-dropdown .select2-results__options {
    overflow-x: hidden !important; /* Chặn hoàn toàn scroll ngang rác rưởi */
    overflow-y: auto !important; /* Vẫn giữ scroll dọc */
    max-height: 280px !important; /* Giới hạn chiều cao cho đẹp */
}

/* 5. Từng dòng item trong menu */
.modern-dropdown .select2-results__option {
    padding: 10px 16px !important;
    font-size: 14px !important;
    color: #4b5563 !important;
    border-radius: 10px !important;
    margin: 2px 8px !important; /* Thụt lề 2 bên 8px cho sang, không dính viền */
    transition: all 0.2s ease !important;
    white-space: nowrap !important; /* Ép hiển thị trên 1 dòng */
    cursor: pointer !important;
}

/* 6. Hiệu ứng khi lướt chuột qua (Hover) */
.modern-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: #f3f4f6 !important;
    color: #064e3b !important;
}

/* 7. Dòng đang được chọn */
.modern-dropdown .select2-results__option[aria-selected=true] {
    background-color: #ecfdf5 !important;
    color: #064e3b !important;
    font-weight: 600 !important;
}

/* 8. Tắt viền mặc định của thanh chọn ban đầu */
.select2-container--default .select2-selection--single {
    background: transparent !important;
    border: none !important;
    height: auto !important;
}

    /* [ĐÃ FIX LỖI ĐÈ ICON]: Trả lại khoảng trống bên trái cho Icon và bên phải cho Mũi tên */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 28px !important; /* Đẩy chữ sang phải 28px né cái Icon ra */
        padding-right: 24px !important; /* Đẩy chữ sang trái né cái mũi tên ra */
        line-height: normal !important;
        color: inherit !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        display: none !important;
    }

    @@media (max-width: 640px) {
        .mobile-card-body {
            padding: 8px 10px !important;
        }

        .mobile-card-title {
            font-size: 13px !important;
            line-height: 1.3 !important;
            height: 34px !important;
        }

        .mobile-label {
            font-size: 10px !important;
            min-width: auto !important;
            color: #9ca3af !important;
        }

        .mobile-value {
            font-size: 11px !important;
        }

        .mobile-price {
            font-size: 13px !important;
        }

        .mobile-gap {
            gap: 2px !important;
            margin-bottom: 2px !important;
        }
    }


/* --- MEGA MENU (Cho các mục khác) --- */
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    z-index: 9999;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.2s ease-out;
    overflow: hidden;
}

.group:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- LAYOUT CHUNG --- */
.menu-layout {
    display: flex;
    height: 205px;
    background: white;
}

.menu-sidebar, .menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.menu-sidebar {
    width: 45%;
    background-color: #f9fafb;
    border-right: 1px solid #f0f0f0;
}

.menu-content {
    width: 55%;
    background-color: white;
}

.menu-header {
    height: 42px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.menu-sidebar .menu-header {
    background-color: #f9fafb;
}

.menu-content .menu-header {
    background-color: white;
}

.scroll-list {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

/* District Item */
.district-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 20px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.1s;
    position: relative;
    white-space: nowrap;
}

    .district-item:hover, .district-item.active {
        color: #064e3b;
        font-weight: 700;
        background-color: white;
        width: calc(100% + 1px);
        border-right: 1px solid white;
        z-index: 10;
    }

        .district-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: #064e3b;
        }

/* Simple Link */
.simple-link {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
    font-size: 13px;
    color: #444;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

    .simple-link:hover {
        color: #064e3b;
        background-color: #f0fdf4;
        font-weight: 600;
        padding-left: 24px;
    }

/* Ward List */
.ward-list {
    display: none;
    flex-direction: column;
}

    .ward-list.active {
        display: flex;
        animation: fadeIn 0.2s ease-out;
    }

@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- CSS CHO MENU BLOG DROPDOWN --- */
.alpha-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 250px;
    background: #fff;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    z-index: 9999;
}

.group:hover .alpha-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.alpha-drop-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 2px;
}

    .alpha-drop-item:last-child {
        margin-bottom: 0;
    }

    .alpha-drop-item:hover {
        background-color: #f0fdf4;
    }

.drop-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C5A059;
    margin-right: 12px;
    font-size: 14px;
    transition: 0.2s;
}

.alpha-drop-item:hover .drop-icon {
    background: #064e3b;
    color: #fff;
    border-color: #064e3b;
}

.drop-text {
    display: flex;
    flex-direction: column;
}

.drop-title {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.alpha-drop-item:hover .drop-title {
    color: #064e3b;
}