@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 1. HEADER */
header { background: #ffffff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: #10316b; }
.logo i { font-size: 26px; color: #1570ef; }
.logo span { color: #1570ef; }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-menu a { font-size: 15px; font-weight: 600; color: #334155; transition: color 0.2s; }
.nav-menu a:hover, .nav-menu a.active { color: #1570ef; }
.header-hotline { display: flex; align-items: center; gap: 8px; background: #eff6ff; padding: 8px 18px; border-radius: 30px; color: #1570ef; font-weight: 700; font-size: 14px; border: 1px solid #bfdbfe; }

/* 2. HERO LANDING TRANG CHỦ */
.hero {
    background: linear-gradient(135deg, #184394 0%, #153c85 50%, #0f2c66 100%);
    color: #ffffff;
    padding: 50px 0 110px;
    position: relative;
}
.hero-content { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.hero-text { flex: 1.2; }
.hero-text h1 { font-size: 36px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero-text p { font-size: 15px; color: #cbd5e1; line-height: 1.6; max-width: 520px; }
.hero-banner-card {
    flex: 0.8;
    background: linear-gradient(135deg, #0284c7 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.hero-banner-card h3 { font-size: 18px; font-weight: 800; color: #fde047; margin-bottom: 8px; }
.hero-banner-card .badge-group { display: flex; gap: 6px; margin-top: 10px; }
.hero-banner-card .badge-item { background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* 3. KHỐI TÌM KIẾM TRANG CHỦ */
.search-wrapper { margin-top: -60px; position: relative; z-index: 20; }
.search-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 24px;
    box-shadow: 0 12px 32px -4px rgba(16, 24, 40, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.search-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-btn {
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: #f1f5f9;
    color: #64748b;
    transition: 0.2s;
}
.tab-btn.active { background: #102a5c; color: #ffffff; }
.search-form-row { display: flex; gap: 12px; align-items: center; }
.filter-dropdown {
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    outline: none;
}
.search-input-box { flex: 1; position: relative; }
.search-input-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 16px; }
.search-input-box input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
}
.search-input-box input:focus { border-color: #1570ef; background: #fff; }
.btn-submit-search {
    background: #102a5c;
    color: #ffffff;
    border: none;
    padding: 13px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.btn-submit-search:hover { background: #0c1e3d; }

/* 4. 6 KHỐI TIỆN ÍCH */
.tools-grid { display: flex; gap: 14px; margin-top: 24px; justify-content: space-between; }
.tool-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 4px 20px -2px rgba(16, 24, 40, 0.06); border-color: #1570ef; }
.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 8px;
}
.tool-card span { font-size: 12px; font-weight: 700; color: #334155; line-height: 1.3; }

/* 5. LƯỚI CARD TRANG CHỦ */
.main-section { padding: 48px 0 80px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-title { font-size: 22px; font-weight: 800; color: #0f172a; }
.see-all-link { font-size: 14px; font-weight: 700; color: #1570ef; }

.properties-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.property-card {
    width: calc(25% - 15px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(16, 24, 40, 0.06);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}
.property-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 30px -10px rgba(16, 24, 40, 0.15);
    border-color: #93c5fd;
}
.card-media { position: relative; height: 190px; overflow: hidden; background: #f1f5f9; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.property-card:hover .card-media img { transform: scale(1.08); }

.badge-video { position: absolute; top: 12px; left: 12px; background: #eab308; color: #78350f; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; z-index: 2; }
.card-actions-top { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.action-circle-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #475569; }
.badge-time { position: absolute; bottom: 12px; left: 12px; background: rgba(15, 23, 42, 0.7); color: #ffffff; padding: 3px 8px; border-radius: 6px; font-size: 11px; }
.badge-img-count { position: absolute; bottom: 12px; right: 12px; background: rgba(15, 23, 42, 0.7); color: #ffffff; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }

.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.4; height: 39px; overflow: hidden; margin-bottom: 10px; }
.property-card:hover .card-title { color: #1570ef; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.price-main { font-size: 18px; font-weight: 800; color: #1570ef; }
.price-per-m2 { font-size: 12px; color: #64748b; font-weight: 500; }
.address-row { font-size: 12px; color: #64748b; margin-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specs-divider { border-top: 1px dashed #e2e8f0; padding-top: 12px; margin-top: auto; display: flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 600; color: #475569; }

/* 6. POPUP XEM NHANH */
.quick-modal-overlay {
    position: fixed; inset: 0; background: rgba(43, 53, 69, 0.95);
    z-index: 9999; display: none; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(8px);
}
.quick-modal-overlay.active { display: flex; }
.quick-modal-container { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1200px; position: relative; gap: 30px; }
.modal-close-btn { position: absolute; top: -40px; right: 0; background: transparent; border: none; color: #ffffff; font-size: 32px; cursor: pointer; }
.modal-left-info { flex: 1; color: #ffffff; }
.modal-left-info h2 { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.modal-left-info .modal-price { font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.modal-left-info .modal-address { font-size: 14px; color: #e2e8f0; margin-bottom: 16px; }
.modal-left-info .modal-specs { display: flex; gap: 16px; font-size: 14px; color: #f1f5f9; margin-bottom: 24px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.15); border-bottom: 1px solid rgba(255,255,255,0.15); }
.btn-modal-detail { display: inline-block; background: #1570ef; color: #ffffff; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 14px; }

.modal-center-gallery { flex: 1.1; display: flex; flex-direction: column; align-items: center; position: relative; }
.modal-phone-frame { width: 360px; height: 500px; background: #000; border-radius: 20px; overflow: hidden; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.modal-phone-frame img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; cursor: pointer; font-size: 16px; color: #1e293b; display: flex; align-items: center; justify-content: center; z-index: 10; }
.gallery-prev { left: -50px; } .gallery-next { right: -50px; }

.modal-right-contact { flex: 0.8; }
.contact-card-white { background: #ffffff; border-radius: 16px; padding: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.agent-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.agent-avatar-circle { width: 48px; height: 48px; border-radius: 50%; background: #f1f5f9; border: 1px solid #cbd5e1; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #102a5c; }
.agent-meta h4 { font-size: 16px; font-weight: 800; color: #0f172a; }
.contact-action-row { display: flex; gap: 10px; }
.btn-phone-call { flex: 1; background: #102a5c; color: #ffffff; padding: 12px; border-radius: 8px; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-zalo-direct { width: 46px; height: 46px; background: #0088cc; color: #ffffff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* 7. PHẦN DANH SÁCH (danhsach.php) */
.top-search-section { background: #ffffff; padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.filter-bar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar-row select, .filter-bar-row input { padding: 10px 14px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13.5px; font-weight: 500; color: #334155; outline: none; background: #f8fafc; }
.input-keyword-box { flex: 1.5; min-width: 220px; }
.btn-filter-modal { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-weight: 700; color: #1e293b; cursor: pointer; position: relative; }
.btn-filter-modal .badge-dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; background: #ef4444; border-radius: 50%; }
.btn-search-main { background: #102a5c; color: #ffffff; border: none; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }

.listing-page-wrapper { padding: 24px 0 60px; }
.breadcrumb { font-size: 13px; color: #64748b; margin-bottom: 12px; }
.page-main-heading { font-size: 24px; font-weight: 800; color: #0f172a; margin-bottom: 20px; }
.listing-grid-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.property-list-col { display: flex; flex-direction: column; gap: 20px; }
.horizontal-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.03); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.horizontal-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1); border-color: #93c5fd; }
.card-mosaic-gallery { display: grid; grid-template-columns: 1.8fr 1fr; gap: 4px; height: 260px; position: relative; }
.mosaic-left { height: 100%; position: relative; }
.mosaic-left img, .mosaic-right img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-right { display: grid; grid-template-rows: 1fr 1fr 1fr; gap: 4px; height: 100%; }
.badge-premium { position: absolute; top: 12px; left: 12px; background: #f97316; color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; z-index: 2; }
.badge-photo-count { position: absolute; bottom: 10px; right: 10px; background: rgba(15, 23, 42, 0.75); color: #fff; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; z-index: 2; }

.horizontal-card-body { padding: 18px 20px; }
.h-card-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 8px; line-height: 1.4; }
.h-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.h-price-main { font-size: 20px; font-weight: 800; color: #1570ef; }
.h-price-unit { font-size: 13px; color: #64748b; font-weight: 500; }
.h-tags-row { display: flex; gap: 8px; margin-bottom: 12px; }
.h-tag-btn { background: #eff6ff; color: #1570ef; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 6px; }
.h-address-row { font-size: 13px; color: #64748b; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.h-specs-row { font-size: 13px; font-weight: 600; color: #475569; display: flex; gap: 16px; margin-bottom: 14px; }
.h-desc-snippet { font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.h-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 14px; }
.h-agent-meta { display: flex; align-items: center; gap: 10px; }
.h-agent-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e0f2fe; color: #0284c7; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.h-agent-info h5 { font-size: 13px; font-weight: 700; color: #0f172a; }
.h-action-btns { display: flex; gap: 8px; }
.btn-h-call { background: #102a5c; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.btn-h-zalo { background: #0088cc; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; }

.filter-sidebar-col { display: flex; flex-direction: column; gap: 20px; }
.sidebar-filter-box { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.filter-box-title { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 14px; }
.filter-pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-pill { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #334155; text-align: center; cursor: pointer; display: block; }
.filter-pill:hover, .filter-pill.active { background: #eff6ff; border-color: #1570ef; color: #1570ef; }

/* 8. MODAL FILTER */
.modal-filter-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.modal-filter-overlay.active { display: flex; }
.modal-filter-box { background: #ffffff; width: 100%; max-width: 650px; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2); display: flex; flex-direction: column; }
.modal-filter-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid #e2e8f0; }
.modal-close-icon { background: none; border: none; font-size: 22px; cursor: pointer; color: #64748b; }
.modal-tabs-strip { display: flex; gap: 8px; padding: 16px 24px 8px; overflow-x: auto; border-bottom: 1px solid #f1f5f9; }
.modal-tab-pill { padding: 8px 18px; border-radius: 30px; border: 1px solid #cbd5e1; background: #fff; font-size: 13.5px; font-weight: 700; color: #334155; cursor: pointer; white-space: nowrap; }
.modal-tab-pill.active { border-color: #1570ef; color: #1570ef; background: #eff6ff; }
.modal-filter-body { padding: 20px 24px; min-height: 280px; max-height: 380px; overflow-y: auto; }
.tab-content-panel { display: none; }
.tab-content-panel.active { display: block; }
.inputs-range-flex { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.inputs-range-flex input { flex: 1; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 8px; outline: none; }
.options-2col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-label-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.modal-filter-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.btn-reset-filter { background: #fff; border: 1px solid #cbd5e1; padding: 10px 24px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.btn-apply-filter { background: #102a5c; color: #fff; border: none; padding: 10px 28px; border-radius: 8px; font-weight: 700; cursor: pointer; }

/* 9. ZALO FLOAT & RESPONSIVE */
.zalo-float { position: fixed; bottom: 28px; right: 28px; width: 52px; height: 52px; background: #0088cc; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #ffffff; font-weight: 800; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 136, 204, 0.4); z-index: 999; }

@media (max-width: 992px) {
    .property-card { width: calc(50% - 10px); }
    .hero-banner-card { display: none; }
    .tools-grid { flex-wrap: wrap; }
    .tool-card { flex: 1 1 30%; }
    .listing-grid-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .property-card { width: 100%; }
    .nav-menu { display: none; }
    .search-form-row { flex-direction: column; }
    .filter-dropdown, .search-input-box, .btn-submit-search { width: 100%; }
}