/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}


/* Ẩn hoàn toàn thanh tiêu đề Tab (bao gồm cả chữ và đường kẻ) */
.product-footer .container .nav-uppercase,
.product-footer .container hr {
    display: none !important;
}

/* Ép nội dung đẩy lên sát phía trên cho đẹp */
.product-footer .tab-panels {
    padding-top: 0 !important;
    margin-top: -10px !important; /* Đẩy nội dung lên cao hơn */
}

/* Đảm bảo nội dung bên trong không bị ẩn */
.product-footer .panel.active, 
.product-footer .tab-panels .panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.product-footer .woocommerce-tabs {
    border-top: none;
}
/* Chỉnh sửa nhãn New/Sale: Nhỏ hơn và Thấp xuống */
.badge-inner.new-bubble, 
.badge-inner.sale-bubble {
    /*border-radius: 5px !important;
	/* 1. Độ mờ nền: 0.85 có nghĩa là mờ 15% */
    background-color: rgb(251 67 6 / 85%) !important;
	font-weight: 500;
    
    /* 1. Làm nhỏ hơn: Giảm padding và font-size */
    padding: 10px 10px !important;    /* Số 3px là chiều cao, 10px là chiều rộng */
    font-size: 14px !important;      /* Giảm xuống 11px hoặc 12px để nhỏ gọn hơn */
    
    /* 2. Cho thấp xuống: Điều chỉnh vị trí */
    margin-top: 140px !important;     /* Tăng số này nếu muốn nhãn đẩy thấp xuống dưới */
	margin-left: 0px !important; 
    
    /* Giữ nguyên các thông số cũ */
    width: auto !important;
    height: auto !important;
    /*aspect-ratio: auto !important; */
    line-height: 1.2 !important;
    display: inline-block !important;
}
/* Ẩn khu vực bình luận và tiêu đề */
#comments, .comments-area, .comment-respond {
    display: none !important;
}

/* PHẦN BẢNG THÔNG TIN CĂN HỘ */
/* Bảng thông tin căn hộ tối ưu: Font mặc định & Chiều cao dòng thấp */
.bds-premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #f05a28; /* Màu cam QuyCanDep */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    /* Sử dụng font chữ mặc định của website */
    font-family: inherit; 
}

/* Tiêu đề bảng */
.bds-premium-table thead th {
    background-color: #f05a28 !important;
    color: #ffffff !important;
    padding: 10px 15px; /* Giảm chiều cao dòng tiêu đề */
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
}

/* Các ô nội dung */
.bds-premium-table td {
    padding: 10px 20px !important; /* Chiều cao dòng thấp hơn theo ý Anh */
    border-bottom: 1px dashed #dbdbdb;
    font-size: 16px;
    line-height: 1.8; /* Ép dòng sát nhau hơn */
}

/* Cột tiêu đề bên trái (Nền xám nhẹ) */
.bds-premium-table td.label-cell {
    background-color: #fcfcfc !important;
    
    font-weight: 500;
    width: 40%;
    border-right: 1px dashed #dbdbdb;
}

/* Cột dữ liệu bên phải */
.bds-premium-table td.data-cell {
    background-color: #ffffff;
    /*color: #f05a28; */
    font-weight: 500;
    text-align: left;
}

/* Dòng cuối cùng không có gạch chân */
.bds-premium-table tr:last-child td {
    border-bottom: none;
}

/* Hiệu ứng di chuột tinh tế */
.bds-premium-table tr:hover td {
    background-color: #fffaf8 !important;
}

/* Thêm icon mũi tên vào trước tiêu đề cột 1 */
.bds-premium-table td.label-cell:before {
    content: "\f105"; /* Mã code của icon fa-angle-right */
    font-family: "Font Awesome 5 Free", "FontAwesome"; /* Đảm bảo nhận diện đúng thư viện icon */
    font-weight: 900;
    color: #f05a28;  /*Màu cam thương hiệu */
    margin-right: 8px; /* Khoảng cách giữa icon và chữ */
    font-size: 14px;
}

/* Thêm icon mũi tên vào trước tiêu đề cột 1 */
.bds-premium-table td.data-cell:before {
    content: "\f0a9"; /* Mã code của icon fa-angle-right */
    font-family: "Font Awesome 5 Free", "FontAwesome"; /* Đảm bảo nhận diện đúng thư viện icon */
    font-weight: 900;
    color: #f05a28;  /*Màu cam thương hiệu */
    margin-right: 8px; /* Khoảng cách giữa icon và chữ */
    font-size: 14px;
}



/* ==========================================================================
   FROM YÊU CẦU TƯ VẤN BĐS
   ========================================================================== */

/* 1. Định dạng ô nhập liệu và Icon */
.form-bds-custom input[type="text"],
.form-bds-custom input[type="tel"] {
    width: 100% !important;
    padding: 10px 15px 10px 40px !important;
    border: 1px solid #cccccc !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    height: 45px !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

.form-bds-custom .input-icon-wrap i {
    position: absolute;
    left: 15px;
    top: 22.5px;
    transform: translateY(-50%);
    color: #888888;
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
}

/* 2. Khung nền tổng thể của Form */
.form-bds-custom {
    border: 2px solid #e5e7eb !important;
    border-radius: 15px !important;
    padding: 8px 25px !important;
    background-color: #f0f0f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    max-width: 600px;
    margin: 0 auto !important;
}

/* 3. Tiêu đề Form */
.form-bds-custom .form-title {
    color: #ed4a0a;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
}

/* 4. Chia cột Layout (Desktop vs Mobile) */
.form-bds-custom .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0px;
}
.form-bds-custom .form-col {
    flex: 1;
    position: relative;
}

@media (max-width: 767px) {
    .form-bds-custom .form-row {
        display: block;
    }
    .form-bds-custom .form-col {
        margin-bottom: 15px;
    }
}

/* 5. Chữ báo lỗi hệ thống */
.form-bds-custom .wpcf7-not-valid-tip {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    font-weight: normal;
    text-align: left;
    padding-left: 10px;
}

/* 6. Định dạng tiêu đề khu vực Checkbox */
.form-bds-custom h4.checkbox-label {
    font-size: 15px !important;
    font-weight: bold !important;
    color: #373434 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    text-transform: none !important;
}

/* 7. CHUYỂN Ô CHỌN CĂN HỘ THÀNH HÀNG NGANG (GRID LAYOUT) */
.form-bds-custom .wpcf7-checkbox {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 cột trên PC */
    margin-bottom: 12px !important;
    
}

.form-bds-custom .wpcf7-checkbox .wpcf7-list-item {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.form-bds-custom .wpcf7-checkbox input[type="checkbox"] {
    margin: 0 8px 0 0 !important;
    transform: scale(1.15);
    vertical-align: middle !important;
}

.form-bds-custom .wpcf7-checkbox .wpcf7-list-item-label {
    color: #444444 !important;
    font-weight: 500 !important;
    vertical-align: middle !important;
}

@media (max-width: 549px) {
    .form-bds-custom .wpcf7-checkbox {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 cột trên Mobile */
    }
}

/* 8. Dòng Note cam kết bảo mật */
.form-bds-custom .form-note {
    color: #272423 !important;
    font-style: italic !important;
    font-size: 12px !important;
    margin-top: 13px !important;
    text-align: left;
    line-height: 1.4 !important;
    display: block !important;
    width: 100% !important;
}

/* 9. XỬ LÝ ĐƯA NÚT GỬI YÊU CẦU RA CHÍNH GIỮA (100% THÀNH CÔNG) */
.form-bds-custom .form-submit-wrap {
    display: block !important;
    width: 100% !important;
    text-align: center !important; /* Ép mọi thứ bên trong căn giữa */
    margin: 25px auto 0 auto !important;
    clear: both !important;
    float: none !important;
}

.form-bds-custom .form-submit-wrap input[type="submit"] {
    background-color: #ed4a0a !important;
    color: #ffffff !important;
    font-weight: bold;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 35px !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: background 0.3s;
    height: auto !important;
    display: inline-block !important; /* Cho phép căn giữa theo text-align */
    float: none !important;
    margin: 0 auto !important;
}

.form-bds-custom .form-submit-wrap input[type="submit"]:hover {
    background-color: #3858e9 !important;
}

/* 10. Chữ Placeholder gợi ý */
.form-bds-custom input[type="text"]::placeholder,
.form-bds-custom input[type="tel"]::placeholder {
    font-size: 13px !important;
    color: #999999 !important;
    opacity: 0.7;
}
.form-bds-custom input::-webkit-input-placeholder { font-size: 13px !important; color: #999999 !important; }
.form-bds-custom input::-moz-placeholder { font-size: 13px !important; color: #999999 !important; }
.form-bds-custom input:-ms-input-placeholder { font-size: 13px !important; color: #999999 !important; }

/* Khung thông báo thành công/thất bại cuối form */
.wpcf7-response-output {
    max-width: 100% !important;
    margin: 15px auto 0 auto !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    text-align: center !important;
}
/* ==========================================================================
   GIẢI PHÁP TRIỆT ĐỂ: ÉP NÚT GỬI YÊU CẦU PHẢI RA GIỮA 100%
   ========================================================================== */

/* Ép toàn bộ form xử lý theo dạng khối dọc để kích hoạt căn giữa nội dung */
.form-bds-custom,
.form-bds-custom form,
.wpcf7-form {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Đảm bảo tất cả các hàng, các đoạn text thông thường xếp đúng vị trí trải dài */
.form-bds-custom .form-row,
.form-bds-custom h3,
.form-bds-custom h4,
.form-bds-custom .wpcf7-checkbox,
.form-bds-custom .form-note {
    width: 100% !important;
}

/* Biện pháp mạnh: Ép trực tiếp khung chứa nút bấm và chính cái nút ra giữa form */
.form-bds-custom .form-submit-wrap {
    display: flex !important;
    justify-content: center !important; /* Ép mọi phần tử con nằm chính giữa theo hàng ngang */
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    float: none !important;
    margin: 25px 0 0 0 !important;
    padding: 0 !important;
}

/* Định dạng lại thuộc tính hiển thị của nút cam */
.form-bds-custom .form-submit-wrap input[type="submit"] {
    display: block !important;
    margin: 0 auto !important; /* Tự động chia đều khoảng trống hai bên trái phải */
    float: none !important;
    position: relative !important;
    left: 0 !important;
    transform: none !important;
}
/* Ẩn hoàn toàn khung thông báo mặc định màu xanh ở cuối form */
.wpcf7-response-output {
    display: none !important;
}

/* --- GIAO DIỆN POPUP CẢM ƠN CHUYÊN NGHIỆP --- */
.popup-overlay-custom {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6) !important; /* Làm tối nền phía sau */
    z-index: 999999 !important; /* Luôn nổi trên cùng tất cả mọi thứ */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Kích hoạt hiển thị */
.popup-overlay-custom.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Khung nội dung chính của Popup */
.popup-content-custom {
    background: #ffffff !important;
    padding: 35px 25px !important;
    border-radius: 15px !important;
    max-width: 450px !important;
    width: 90% !important;
    text-align: center !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay-custom.active .popup-content-custom {
    transform: scale(1) !important;
}

/* Icon tích xanh */
.popup-icon-success {
    width: 60px;
    height: 60px;
    background: #28a745 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 30px !important;
    font-weight: bold !important;
    margin: 0 auto 15px auto !important;
}

/* Các đoạn text trong popup */
.popup-title {
    color: #28a745 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    margin-bottom: 10px !important;
}
.popup-desc {
    font-size: 15px !important;
    color: #333333 !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
}
.popup-subdesc {
    font-size: 14px !important;
    color: #666666 !important;
    font-style: italic !important;
    line-height: 1.4 !important;
    margin-bottom: 20px !important;
}

/* Nút liên hệ Zalo */
.popup-btn-zalo {
    display: block !important;
    background: #0068ff !important; /* Màu xanh Zalo */
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    margin-bottom: 10px !important;
    font-size: 15px !important;
    transition: background 0.3s !important;
}
.popup-btn-zalo:hover {
    background: #0056b3 !important;
}

/* Nút đóng đóng popup */
.popup-btn-close {
    background: none !important;
    border: none !important;
    color: #999999 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 5px !important;
}
.popup-btn-close:hover {
    color: #333333 !important;
}

.nav-tabs+.tab-panels {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
}


/* ===================================================
   CROP IFRAME BẰNG TRANSFORM SCALE (CHỐNG TRẮNG LỀ PHẢI)
   =================================================== */

/* 1. KHUNG NGOÀI TẠO BORDER XÁM */
.crop-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 58%; /* Tỷ lệ khung hình chuẩn */
    height: 0;
    overflow: hidden;
    border-radius: 0px;
    background-color: #ffffff; /* Màu viền xám bao quanh */
    box-sizing: border-box;
}

/* 2. KHUNG TRONG CHỨA IFRAME */
.crop-iframe-inner {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 13px;
    right: 13px;
    overflow: hidden;
    border-radius: 5px;
    background-color: #ffffff;
}

/* 3. PHÓNG TO IFRAME ĐỂ DỊCH CHUYỂN KÍN KHÍT 100% */
.crop-iframe-inner iframe {
    position: absolute !important;
    top: -5%;
    left: -5%;
    width: 110% !important;   /* Ép kích thước khung iframe to hơn khung chứa */
    height: 110% !important;
    border: none !important;
    
    /* KỸ THUẬT QUAN TRỌNG: Phóng to 1.18 lần và căn gốc ở giữa */
    transform: scale(1.18) !important;
    transform-origin: center center !important;
}

/* 4. TỐI ƯU CHO MOBILE */
@media (max-width: 768px) {
    .crop-iframe-wrapper {
        padding-bottom: 110%;
    }
    
    .crop-iframe-inner {
        top: 10px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }

    .crop-iframe-inner iframe {
        transform: scale(1.25) !important; /* Trên mobile phóng to hơn chút để giấu nút */
    }
}

/* ===================================================
   TỐI ƯU POPUP FORM & NÚT X CHUẨN MỌI MÀN HÌNH (PC / MOBILE / IPAD)
   =================================================== */

/* 1. KHUNG POPUP TỔNG THỂ */
#popup-form-tuvan.lightbox-by-id {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 20px !important;
    position: relative !important;
    overflow: visible !important; /* Giải phóng khung để không cắt mất nút X */
}

/* 2. FORM BÊN TRONG */
#popup-form-tuvan .form-bds-custom, 
#popup-form-tuvan form {
    border-radius: 20px !important;
    box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
    margin: 0 !important;
}

/* 3. CO GIÃN TRÊN ĐIỆN THOẠI (MOBILE) */
@media (max-width: 767px) {
    #popup-form-tuvan.lightbox-by-id {
        width: 88% !important;
        margin: 0 auto !important;
    }
}

/* 4. NÚT X ĐỎ - BẤM CỰC NHẠY TRÊN CẢ MÁY TÍNH & ĐIỆN THOẠI / IPAD */
button.nut-close-lightbox-custom,
#popup-form-tuvan .nut-close-lightbox-custom {
    position: absolute !important;
    right: -28px !important;      /* Nằm vừa khít góc phải bo tròn */
    top: 10px;
    width: 38px !important;       /* Vùng bấm rộng rãi cho cả ngón tay & chuột */
    height: 38px !important;
    line-height: 34px !important;
    text-align: center !important;
    color: #ff3b30 !important;     /* Nét chữ X màu đỏ rực */
    padding: 0 !important;
    font-size: 28px !important;
    font-weight: bold !important;
    
    /* TỐI ƯU CẢM ỨNG & HIỂN THỊ ĐA TẮC DỤNG */
    cursor: pointer !important;
    z-index: 9999999 !important;  /* Nổi tuyệt đối lên trên cùng */
    pointer-events: auto !important;
    touch-action: manipulation !important;
    transition: all 0.2s ease-in-out !important;
}


/* 5. VỚI LỚP PHỦ NỀN VÀ KHUNG TỔNG THỂ */
.mfp-wrap, .mfp-container {
    z-index: 999995 !important;
}

/* Ẩn nút X mặc định cũ bị ẩn/lỗi của Flatsome */
.mfp-close {
    display: none !important;
}

