/*
Theme Name: Flatsome Child
Theme URI: https://flatsome3.uxthemes.com/
Description: Flatsome Child Theme for Real Estate Platform (Standardized v1.2.0)
Author: Senior WordPress Developer
Template: flatsome
Version: 1.2.0
*/

/* ==========================================================================
   PHẦN 1: HEADER NAVIGATION & DROPDOWN MENU TOÀN SITE
   ========================================================================== */

/* Dropdown Menu lớn (Hỗ trợ ID menu hiện tại và class .nd-megamenu) */
#menu-item-1546 > .nav-dropdown,
.nd-megamenu > .nav-dropdown {
    min-width: 600px !important;
    padding: 18px 20px !important;
}

#menu-item-1546 > .nav-dropdown > li,
.nd-megamenu > .nav-dropdown > li {
    padding: 0 12px !important;
}

#menu-item-1546 > .nav-dropdown > li > a,
.nd-megamenu > .nav-dropdown > li > a {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 6px 10px !important;
    border-left: 3px solid #cc0000 !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
}

.nav-dropdown li a {
    font-size: 13px !important;
    color: #475569 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease-in-out !important;
    display: block !important;
}

.header-nav > li.has-dropdown:hover > a .icon-angle-down {
    transform: rotate(180deg) !important;
    transition: transform 0.25s ease !important;
}

.header-nav > li.has-dropdown > a .icon-angle-down {
    transition: transform 0.25s ease !important;
}

.nav-dropdown {
    animation: ndDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes ndDropdownFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   PHẦN 2: HỆ THỐNG GIAO DIỆN BẤT ĐỘNG SẢN (CHUẨN ROW-SMALL FLATSOME)
   ========================================================================== */

/* 1. TRIỆT TIÊU CÁC CỘT & TÓM TẮT MẶC ĐỊNH CŨ CỦA FLATSOME PORTFOLIO */
.portfolio-top .large-3.col.col-divided,
.portfolio-summary.entry-summary,
.portfolio-sidebar {
    display: none !important;
}

/* 2. CONTAINER CHÍNH CỦA TRANG SINGLE BĐS */
#portfolio-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 3. BỐ CỤC HÀNG CHIA CỘT BĐS (ĐỒNG BỘ THEO ROW-SMALL) */
.row.row-bds-layout {
    display: flex !important;
    flex-flow: row wrap !important;
    width: auto !important;
}

/* Cột trái nội dung: 75% (9 Cột) trên Desktop */
.row-bds-layout > .bds-content-col.large-9.col {
    width: 75% !important;
    max-width: 75% !important;
    flex: 0 0 75% !important;
    min-width: 0 !important; /* Chống tràn ảnh & video */
    box-sizing: border-box !important;
}

/* Cột phải Sidebar tư vấn: 25% (3 Cột) trên Desktop */
.row-bds-layout > .bds-sidebar-col.large-3.col {
    width: 25% !important;
    max-width: 25% !important;
    flex: 0 0 25% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}


/* ==========================================================================
   PHẦN 3: HEADER BĐS (BREADCRUMB & TIÊU ĐỀ BÀI ĐĂNG)
   ========================================================================== */
.portfolio-breadcrumb-title {
    padding: 4px 0 6px 0 !important;
    background: transparent !important;
    border-bottom: none !important;
}

.portfolio-breadcrumb-title .page-title-inner {
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: flex-start !important;
    text-align: left !important;
    min-height: auto !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.portfolio-breadcrumb-title .flex-col.flex-right {
    width: 100% !important;
    margin-bottom: 8px !important;
    margin-left: 0 !important;
    text-align: left !important;
}

.portfolio-breadcrumb-title .flex-col.flex-grow {
    width: 100% !important;
}

/* Tiêu đề tin BĐS */
.portfolio-breadcrumb-title h1.entry-title {
    font-size: 22px !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    margin: 0 !important;
    border-left: 4px solid #cc0000 !important;
    padding-left: 12px !important;
    display: block !important;
}

/* Khung Breadcrumb 3D */
.portfolio-breadcrumb-title .breadcrumbs,
.nd-bds-breadcrumbs-frame {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.portfolio-breadcrumb-title .breadcrumbs a,
.portfolio-breadcrumb-title .breadcrumbs span,
.nd-bds-breadcrumbs-frame .nd-bc-link,
.nd-bds-breadcrumbs-frame .nd-bc-current {
    font-size: 10px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: color 0.2s ease !important;
}

.portfolio-breadcrumb-title .breadcrumbs a:hover,
.nd-bds-breadcrumbs-frame .nd-bc-link:hover {
    color: #cc0000 !important;
}

.portfolio-breadcrumb-title .breadcrumbs .divider,
.nd-bds-breadcrumbs-frame .nd-bc-sep {
    margin: 0 6px !important;
    color: #cbd5e1 !important;
    font-size: 9px !important;
}

/* Icon Home SVG Lucide cho Breadcrumb */
.portfolio-breadcrumb-title .breadcrumbs a:first-child {
    font-size: 0 !important;
    line-height: 0 !important;
}

.portfolio-breadcrumb-title .breadcrumbs a:first-child::before {
    content: '' !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #64748b !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center / contain !important;
    vertical-align: middle !important;
    transition: background-color 0.2s ease !important;
}

.portfolio-breadcrumb-title .breadcrumbs a:first-child:hover::before {
    background-color: #cc0000 !important;
}


/* ==========================================================================
   PHẦN 4: KHUNG THÔNG TIN BĐS (HERO CARD & SPECIFICATION)
   ========================================================================== */
.bds-card-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    padding-left: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3 !important;
    display: block !important;
}

.bds-card,
.bds-hero-card,
.nd-bds-modern-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04) !important;
}

.bds-card,
.bds-hero-card {
    padding: 22px !important;
    margin-bottom: 20px !important; /* Đồng bộ nhịp khoảng cách 20px */
}

/* Hero Top: Giá & Diện tích */
.bds-hero-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 14px !important;
}

.bds-hero-price {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #dc2626 !important;
    letter-spacing: -0.5px !important;
    line-height: 1 !important;
}

.bds-hero-unit-price {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-left: 6px !important;
}

.bds-hero-area {
    text-align: right !important;
    background: #f8fafc !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

.bds-hero-area .bds-label {
    display: block !important;
    font-size: 11px !important;
    color: #64748b !important;
    text-transform: uppercase !important;
}

.bds-hero-area .bds-value {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.bds-hero-address {
    margin-top: 12px !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Lưới thông số kỹ thuật (Grid 3 & 4) */
.bds-grid-3 { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
.bds-grid-4 { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 10px !important; }

.bds-spec-item,
.bds-cost-item {
    background: #f8fafc !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    border: 1px solid #f1f5f9 !important;
}

.bds-spec-label {
    font-size: 11.5px !important;
    color: #64748b !important;
    margin-bottom: 3px !important;
    display: block !important;
    font-weight: 500 !important;
}

.bds-spec-value {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* Tiện ích & Đặc điểm */
.bds-features-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 8px !important;
}

.bds-feature-pill {
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.bds-feature-pill svg {
    color: #16a34a !important;
}


/* ==========================================================================
   PHẦN 5: THƯ VIỆN ẢNH AIRBNB MOSAIC GRID
   ========================================================================== */
.bds-hero-gallery-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 8px !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05) !important;
    margin-bottom: 20px !important;
}

.bds-mosaic-grid {
    display: flex !important;
    gap: 8px !important;
    height: 420px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.bds-mosaic-left {
    width: 60% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

.bds-mosaic-left img, 
.bds-mosaic-right img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.bds-mosaic-left:hover img, 
.bds-mosaic-item:hover img {
    transform: scale(1.02) !important;
}

.bds-mosaic-right {
    width: 40% !important;
    height: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 8px !important;
}

.bds-mosaic-item {
    position: relative !important;
    overflow: hidden !important;
    height: 100% !important;
}

.bds-view-all-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.7) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    backdrop-filter: blur(2px) !important;
}

.bds-mobile-view-badge {
    display: none;
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    background: rgba(15, 23, 42, 0.8) !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
}

/* Video & Map Embed */
.bds-map-wrapper iframe, 
.bds-video-wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important;
    border-radius: 8px !important;
    border: none !important;
}


/* ==========================================================================
   PHẦN 6: SIDEBAR TƯ VẤN VIÊN (STICKY CARD & QUICK FORM)
   ========================================================================== */
.bds-sidebar-sticky-wrap {
    position: sticky !important;
    top: 95px !important;
}

.bds-sidebar-consultant-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 18px 14px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06) !important;
}

.bds-consultant-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.bds-avatar-circle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.bds-consultant-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 2px 0 !important;
}

.bds-consultant-role {
    font-size: 11.5px !important;
    color: #64748b !important;
    display: block !important;
}

.bds-consultant-desc {
    font-size: 12px !important;
    color: #475569 !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
    background: #f8fafc !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    border-left: 3px solid #0284c7 !important;
}

.bds-consultant-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.bds-btn-call-sidebar, 
.bds-btn-zalo-sidebar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.bds-btn-call-sidebar { background: #dc2626 !important; color: #ffffff !important; }
.bds-btn-call-sidebar:hover { background: #b91c1c !important; transform: translateY(-2px) !important; }
.bds-btn-zalo-sidebar { background: #0284c7 !important; color: #ffffff !important; }
.bds-btn-zalo-sidebar:hover { background: #0369a1 !important; transform: translateY(-2px) !important; }

.bds-quick-form-wrap {
    padding-top: 12px !important;
    border-top: 1px dashed #e2e8f0 !important;
}

.bds-quick-form-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
}

.bds-form-field {
    width: 100% !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
}

.bds-form-submit-btn {
    width: 100% !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}


/* ==========================================================================
   PHẦN 7: CARD BĐS CHO ARCHIVE & TRANG CHỦ (.nd-bds-modern-card)
   ========================================================================== */
.nd-bds-card-badges-wrap {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    z-index: 3 !important;
    pointer-events: none !important;
}

.nd-bds-card-badges-wrap .nd-media-badge-top {
    position: static !important;
    margin: 0 !important;
}

.nd-bds-subcat-pill {
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.12) !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.nd-bds-modern-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 25px -4px rgba(15, 23, 42, 0.09) !important;
    border-color: #cbd5e1 !important;
}

.nd-bds-card-media {
    position: relative !important;
    width: 100% !important;
    padding-top: 64% !important;
    background-color: #f1f5f9 !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.nd-bds-card-media .nd-media-link {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.nd-bds-card-media .nd-card-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease !important;
}

.nd-bds-modern-card:hover .nd-card-thumb {
    transform: scale(1.06) !important;
}

.nd-media-badge-top {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    line-height: 1.3 !important;
}

.nd-badge-du-an { background: rgba(30, 41, 59, 0.88) !important; color: #ffffff !important; }
.nd-badge-mua-ban { background: rgba(5, 150, 105, 0.9) !important; color: #ffffff !important; }
.nd-badge-cho-thue { background: rgba(217, 119, 6, 0.92) !important; color: #ffffff !important; }

.nd-media-badge-count {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    z-index: 3 !important;
}

.nd-bds-card-body {
    padding: 14px 15px !important;
}

.nd-bds-card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
    min-height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.nd-bds-card-title a {
    color: #0f172a !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.nd-bds-modern-card:hover .nd-bds-card-title a {
    color: #cc0000 !important;
}

.nd-card-price-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding-top: 10px !important;
    border-top: 1px dashed #e2e8f0 !important;
    margin-bottom: 6px !important;
}

.nd-price-bold {
    font-size: 17px !important;
    font-weight: 900 !important;
    color: #dc2626 !important;
    letter-spacing: -0.3px !important;
    line-height: 1 !important;
}

.nd-area-tag {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
}

.nd-card-address-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
    color: #64748b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.nd-address-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* ==========================================================================
   PHẦN 8: RESPONSIVE MOBILE CHUẨN XÁC
   ========================================================================== */
@media (max-width: 768px) {
    /* Đảm bảo toàn bộ khung nội dung full 100% trên màn hình nhỏ */
    #portfolio-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Rớt cột 100% tự nhiên */
    .row-bds-layout > .bds-content-col.large-9.col,
    .row-bds-layout > .bds-sidebar-col.large-3.col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .row-bds-layout > .bds-sidebar-col.large-3.col {
        position: static !important;
        margin-top: 20px !important;
    }

    /* Collapse các lưới thông số về 2 cột */
    .bds-grid-3, 
    .bds-grid-4 {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Thư viện ảnh chuyển sang 1 ảnh lớn trên mobile */
    .bds-mosaic-grid {
        height: 250px !important;
    }
    .bds-mosaic-left {
        width: 100% !important;
    }
    .bds-mosaic-right {
        display: none !important;
    }
    .bds-mobile-view-badge {
        display: inline-flex !important;
    }
}