/*
Theme Name: Hello Elementor Child (KDT Van Phuc)
Theme URI: https://kdtvanphuc.com/
Description: Child theme tích hợp 100% mã tùy biến từ Flatsome Child, bộ font Google Sans Việt hóa, màu sắc thương hiệu #007351 & #bf0615, Header Center Sticky, Footer 3 cột và Fullview Engine.
Author: Phu Hung Land Tech Team
Author URI: https://phuhungland.com/
Template: hello-elementor
Version: 4.2.1794193898
Text Domain: hello-elementor-child
*/

/* ==========================================================================
   1. GOOGLE FONTS & BRAND DESIGN TOKENS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Manrope:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --kdt-font-main: 'Google Sans', 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --kdt-primary: #007351;        /* Xanh thương hiệu gốc */
    --kdt-primary-dark: #025951;   /* Xanh đậm menu & chữ nhấn */
    --kdt-primary-hover: #027353;  /* Xanh hover */
    --kdt-accent-red: #bf0615;     /* Màu đỏ link / điểm nhấn */
    --kdt-price-red: #db0808;      /* Màu đỏ giá */
    --kdt-accent-gold: #fcfe69;    /* Vàng kim điểm nhấn */
    --kdt-bg-light: #f6f3f3;
    --kdt-footer-bg: #007056;      /* Xanh đậm Footer Phú Hưng Land chuẩn */
    --kdt-footer-dark: #262626;    /* Nền đen Bottom bar */
    --kdt-text-main: #333333;
    --kdt-border-radius: 8px;
    --kdt-box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--kdt-font-main);
    color: var(--kdt-text-main);
    background-color: var(--kdt-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 1.1. Reset container chính (không dùng !important, không ép .entry-content/article) */
.site-main, .page-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 1.2. Fallback typography và link với :where để không ghi đè Elementor Kit */
:where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--kdt-font-main);
    font-weight: 700;
    color: var(--kdt-primary);
    margin-top: 0;
}

:where(a) {
    color: var(--kdt-accent-red);
    text-decoration: none;
    transition: color 0.22s ease;
}

:where(a:hover) {
    color: var(--kdt-primary-hover);
}

/* 1.3. Accessibility: Prefers-reduced-motion & Focus-visible */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--kdt-primary, #007351);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--kdt-primary, #007351);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. HEADER TỰ DO CHỈNH SỬA 100% BẰNG ELEMENTOR THEME BUILDER (ID: 10884)
      - Hoàn toàn gỡ bỏ !important cưỡng ép trên Typography, Màu sắc, Kích thước.
      - Trao quyền kiểm soát 100% cho bảng công cụ Elementor (Visual Editor).
      - Giữ cấu trúc Sticky và hỗ trợ dàn layout 2 cánh menu + logo cân đối.
   ========================================================================== */

/* 2.1. Khung Header Sticky cơ bản */
header[data-elementor-id="10884"],
header.elementor-10884,
.elementor-location-header,
#header.header,
.site-main-header {
    position: sticky;
    top: 0;
    z-index: 99999;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}

/* Cho phép các phần tử logo hoặc menu thò ra ngoài header mà không bị cắt */
header.elementor-10884,
header[data-elementor-id="10884"],
header.elementor-10884 *,
header[data-elementor-id="10884"] * {
    box-sizing: border-box;
}

/* 2.2. Flexbox Container Header Parent */
.elementor-element.elementor-element-con_header_parent,
.elementor-element-con_header_parent,
div[data-id="con_header_parent"],
.header-inner.container,
.header-inner.container-fullview {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

/* 2.3. Cánh Menu Trái (w_nav_left) */
div[data-id="w_nav_left"],
.elementor-element-w_nav_left,
.header-nav-left {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
}

/* 2.4. Logo Chính Giữa (Flatsome legacy - Elementor w_header_logo chỉnh tay trực tiếp) */
#logo.flex-col.logo,
.header-logo-center {
    text-align: center;
    position: relative;
    z-index: 10001;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

#logo a {
    display: inline-block;
    overflow: visible;
    text-decoration: none;
    line-height: 1;
}

#logo img,
#logo img.header_logo,
#logo img.kdt-hanging-logo {
    display: block;
    margin: 0 auto;
    width: auto;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.28s ease;
}

/* 2.5. Cánh Menu Phải (w_nav_right) */
div[data-id="w_nav_right"],
.elementor-element-w_nav_right,
.header-nav-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: visible;
}

/* 2.6. Menu Items Cả 2 Cánh (Tôn trọng thiết lập Typography & Color từ Elementor) */
ul.elementor-nav-menu,
ul.nav-menu,
.header-nav.header-nav-main.nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.elementor-nav-menu > li,
ul.nav-menu > li,
.header-nav.header-nav-main.nav > li {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Thẻ Link Menu chính - KHÔNG DÙNG !important */
ul.elementor-nav-menu > li > a.elementor-item,
ul.nav-menu > li > a,
.header-nav.header-nav-main.nav > li > a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color 0.22s ease;
}

/* Biểu tượng Caret Down đã được quy định chuẩn hóa ở mục 2.10 */

/* 2.7. Menu Con Dropdown (Sub-Menu) */
ul.elementor-nav-menu--dropdown,
ul.sub-menu,
.header-nav-main.nav > li > ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 235px;
    list-style: none;
    margin: 0;
    z-index: 99999;
}

@media (min-width: 1025px) {
    ul.elementor-nav-menu > li > ul.sub-menu,
    ul.nav-menu li ul.sub-menu,
    .header-nav-main.nav > li > ul.sub-menu {
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    }
}

ul.elementor-nav-menu--dropdown li a,
ul.sub-menu li a,
.header-nav-main.nav > li > ul.sub-menu li a {
    display: block;
    text-decoration: none;
    line-height: 1.4;
    transition: all 0.2s ease;
}

/* 2.8. Nút Hotline (w_btn_hotline) */
div[data-id="w_btn_hotline"],
.elementor-element-w_btn_hotline,
.header-button-1 {
    width: auto;
    max-width: max-content;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    align-self: center;
}

div[data-id="w_btn_hotline"] .elementor-widget-container {
    width: auto;
    display: inline-flex;
}

div[data-id="w_btn_hotline"] a.elementor-button,
.header-button-1 .button.success.is-outline,
.btn-flatsome-hotline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    text-decoration: none;
    transition: all 0.25s ease;
}

div[data-id="w_btn_hotline"] .elementor-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

div[data-id="w_btn_hotline"] .elementor-button-icon svg {
    display: inline-block;
    vertical-align: middle;
}

/* 2.9. Responsive Mobile / Tablet */
@media (max-width: 1024px) {
    div[data-id="w_nav_left"] .elementor-nav-menu--main,
    div[data-id="w_nav_right"] {
        display: none !important;
    }

    div[data-id="con_header_parent"],
    .header-inner.container {
        padding: 0 15px;
    }

    div[data-id="w_nav_left"] {
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    div[data-id="w_nav_left"] .elementor-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

        #logo.flex-col.logo {
        flex: 1 1 auto;
        margin: 0;
        text-align: center;
    }

    div[data-id="w_btn_hotline"] {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .elementor-nav-menu--dropdown.elementor-nav-menu__container {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 999999;
    }

    .elementor-nav-menu--dropdown .elementor-nav-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .elementor-nav-menu--dropdown .elementor-nav-menu > li {
        width: 100%;
    }

    .elementor-nav-menu--dropdown .elementor-nav-menu > li > a {
        display: block;
        width: 100%;
    }

    .elementor-nav-menu--dropdown .sub-menu {
        position: static;
        width: 100%;
    }
}



/* ==========================================================================
   2.10. TÙY BIẾN ICON SỔ MENU CON & NÚT HOTLINE ĐIỆN THOẠI CAO CẤP
   ========================================================================== */

/* 1. Icon Caret Sổ Menu Con: Chuẩn hóa hiển thị, không xoay 180 độ */
.elementor-nav-menu--main .sub-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 10px;
    height: auto;
    padding: 0;
    margin: 0 0 0 6px;
    line-height: 1;
    transform: none;
    transition: none;
    pointer-events: none;
}

.elementor-nav-menu--main .sub-arrow svg,
.elementor-nav-menu--main .sub-arrow .e-font-icon-svg {
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    max-width: 10px;
    max-height: 10px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    fill: currentColor;
    vertical-align: middle;
    transform: none;
    transition: none;
}

ul.elementor-nav-menu > li.menu-item-has-children:hover > a .sub-arrow,
ul.elementor-nav-menu > li.menu-item-has-children:focus-within > a .sub-arrow,
ul.elementor-nav-menu > li.menu-item-has-children:hover > a .sub-arrow svg,
ul.elementor-nav-menu > li.menu-item-has-children:focus-within > a .sub-arrow svg {
    transform: none;
    transition: none;
}

.kdt-menu-caret {
    display: none;
}

/* 2. Nút Hotline (0931.08.08.08) Dạng Viên Thuốc - Hỗ trợ :has() an toàn với fallback */
ul.elementor-nav-menu li.menu-item-10927 {
    display: inline-flex;
    align-items: center;
    margin-left: 14px;
}
@supports selector(:has(*)) {
    ul.elementor-nav-menu li:has(a[href^="tel:"]) {
        display: inline-flex;
        align-items: center;
        margin-left: 14px;
    }
}

ul.elementor-nav-menu li.menu-item-10927 a.elementor-item,
ul.elementor-nav-menu li a.elementor-item[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    height: 38px;
    line-height: 1;
    border: 1.5px solid var(--kdt-primary, #007351);
    border-radius: 99px;
    color: var(--kdt-primary, #007351);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background-color: transparent;
    transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    text-decoration: none;
}

.kdt-phone-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    fill: currentColor;
    margin-right: 8px;
    vertical-align: -1px;
    transition: transform 0.28s ease;
}

ul.elementor-nav-menu li.menu-item-10927 a.elementor-item:hover,
ul.elementor-nav-menu li a.elementor-item[href^="tel:"]:hover {
    background-color: var(--kdt-primary, #007351);
    color: #ffffff;
    border-color: var(--kdt-primary, #007351);
    box-shadow: 0 4px 15px rgba(0, 115, 81, 0.32);
    transform: translateY(-1.5px);
}

ul.elementor-nav-menu li.menu-item-10927 a.elementor-item:hover .kdt-phone-icon,
ul.elementor-nav-menu li a.elementor-item[href^="tel:"]:hover .kdt-phone-icon {
    transform: rotate(15deg) scale(1.15);
}

ul.elementor-nav-menu li.menu-item-10927 a.elementor-item::after,
ul.elementor-nav-menu li a.elementor-item[href^="tel:"]::after {
    display: none;
    content: none;
}

@media (max-width: 1024px) {
    ul.elementor-nav-menu--dropdown li.menu-item-10927 {
        margin: 12px 0 6px;
        display: block;
        width: 100%;
    }
    @supports selector(:has(*)) {
        ul.elementor-nav-menu--dropdown li:has(a[href^="tel:"]) {
            margin: 12px 0 6px;
            display: block;
            width: 100%;
        }
    }
    ul.elementor-nav-menu--dropdown li.menu-item-10927 a.elementor-item,
    ul.elementor-nav-menu--dropdown li a.elementor-item[href^="tel:"] {
        width: 100%;
        height: 42px;
        background-color: var(--kdt-primary, #007351);
        color: #ffffff;
    }
}

/* ==========================================================================
   3. FOOTER (ĐÃ MỞ KHÓA HOÀN TOÀN CHO ELEMENTOR THEME BUILDER)
      - Đã gỡ bỏ toàn bộ 86 lệnh !important và các selector data-id Elementor.
      - Bạn có thể tự do chỉnh sửa màu nền, font chữ, kích cỡ và khoảng cách trong Elementor Theme Builder.
   ========================================================================== */

/* Fallback styling cho native footer nếu không dùng Elementor */
.footer-widgets.footer-1 {
    background-color: var(--kdt-footer-bg);
    padding: 50px 20px 40px 20px;
    box-sizing: border-box;
    width: 100%;
}

.footer-widgets.footer-1 .container {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.absolute-footer.dark {
    background-color: var(--kdt-footer-dark);
    color: #a0a0a0;
    padding: 16px 20px;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 991px) {
    .footer-widgets.footer-1 .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================================================
   4. ICON BACK-TO-TOP & FLOATING CONTACT HUB
   ========================================================================== */

/* 4.1. Nút Back-to-Top (#top-link) Chuẩn Gốc kdtvanphuc.com */
#top-link.back-to-top {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid var(--kdt-footer-bg) !important;
    background: var(--kdt-footer-bg) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(15px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 99999 !important;
    cursor: pointer !important;
}

#top-link.back-to-top.active,
#top-link.back-to-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#top-link.back-to-top:hover {
    background: var(--kdt-primary-dark) !important;
    border-color: var(--kdt-primary-dark) !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

#top-link.back-to-top .icon-angle-up {
    display: inline-block !important;
    line-height: 1 !important;
}

/* 4.2. Floating Action Hub (Nút gọi nổi & Zalo cố định góc trái màn hình) */
.kdt-floating-contact {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kdt-floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.kdt-floating-btn.btn-call {
    background: linear-gradient(135deg, #055840 0%, #007351 100%);
    animation: kdt-pulse 2s infinite;
}

.kdt-floating-btn.btn-zalo {
    background: #0088cc;
}

.kdt-floating-btn:hover {
    transform: scale(1.1);
}

@keyframes kdt-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 115, 81, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(0, 115, 81, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 115, 81, 0); }
}


/* ==========================================================================
   5. TOÀN BỘ CSS TÙY BIẾN TỪ FLATSOME-CHILD (POST 48, 5087 & WOOCOMMERCE)
   ========================================================================== */

/* Nút liên hệ nổi (Button Contact VR) */
#button-contact-vr .button-contact .phone-vr {
    position: relative;
    visibility: visible;
    background-color: transparent;
    width: 100px;
    height: 90px;
    cursor: pointer;
    z-index: 11;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transition: visibility .5s;
    left: 8px;
    bottom: 0px;
    display: block;
}

/* [PHASE 3B.2] Dead Flatsome CSS Removed (Alert, Breadcrumbs, Filter-button) */

/* Tùy biến phản hồi gửi yêu cầu thành công WPForms */
.wpforms-confirmation-container-full, div[submit-success]>.wpforms-confirmation-container-full:not(.wpforms-redirection-message) {
    background: linear-gradient(to right, #73BF94, #2D77A6);
    border-radius: 5px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid #73BF94;
    color: #fff;
    text-size-adjust: auto;
    margin: 0 auto 24px;
    padding: 15px 15px;
}

/* Tùy biến nút submit WPForms */
div.wpforms-container-full .wpforms-form input[type=submit], 
div.wpforms-container-full .wpforms-form button[type=submit], 
div.wpforms-container-full .wpforms-form .wpforms-page-button {
    background: linear-gradient(to right, #73BF94, #2D77A6);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 50px;
}
div.wpforms-container-full .wpforms-form .wpforms-submit-container {
    padding: 10px 0 0 0;
    clear: both;
    position: relative;
    text-align: center;
}


/* ==========================================================================
   THIẾT KẾ CARD SẢN PHẨM BẤT ĐỘNG SẢN CHUẨN HIỆN ĐẠI (AUDITED CMD_025)
   - Giới hạn phạm vi cho archive BĐS (tax-product_cat, .kdt-bds-product-grid)
   - Loại bỏ !important để Elementor Visual Editor chỉnh tự do
   - Không ẩn .screen-reader-text (tuân thủ Accessibility WCAG)
   - Chiều cao đồng đều bằng nhau trên Desktop, Tablet và Mobile
   ========================================================================== */

/* 1. Lưới sản phẩm BĐS 4 cột đều trên PC (Scoped cho BĐS, không ảnh hưởng toàn site) */
.tax-product_cat ul.products,
.post-type-archive-product ul.products,
.kdt-bds-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0 0 35px 0;
    list-style: none;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .tax-product_cat ul.products,
    .post-type-archive-product ul.products,
    .kdt-bds-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .tax-product_cat ul.products,
    .post-type-archive-product ul.products,
    .kdt-bds-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .tax-product_cat ul.products,
    .post-type-archive-product ul.products,
    .kdt-bds-product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* 2. Thiết kế Card Sản phẩm chung - Chiều cao tối ưu bằng nhau (GIỮ LẠI KHUNG CARD NGOÀI THEO LỆNH USER) */
.tax-product_cat ul.products li.product,
.post-type-archive-product ul.products li.product,
.kdt-bds-card,
.kdt-bds-loop-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
    float: none;
    box-sizing: border-box;
}

.tax-product_cat ul.products li.product:hover,
.post-type-archive-product ul.products li.product:hover,
.kdt-bds-card:hover,
.kdt-bds-loop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

/* Thẻ link bao bọc toàn bộ nội dung card trong loop WooCommerce */
.tax-product_cat ul.products li.product .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
    padding: 0;
}

/* 3. Ảnh đại diện sản phẩm BĐS - CỐ ĐỊNH KÍCH THƯỚC & TỈ LỆ (GIỮ NGUYÊN 100% THEO LỆNH USER) */
.tax-product_cat ul.products li.product .woocommerce-LoopProduct-link img,
.tax-product_cat ul.products li.product img,
.kdt-bds-card .card-thumb img,
.kdt-bds-loop-card img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    min-height: 200px;
    object-fit: cover;
    object-position: center center;
    border-radius: 11px 11px 0 0;
    margin: 0;
    display: block;
    transition: transform 0.4s ease;
}

.tax-product_cat ul.products li.product:hover .woocommerce-LoopProduct-link img,
.tax-product_cat ul.products li.product:hover img,
.kdt-bds-card:hover .card-thumb img,
.kdt-bds-loop-card:hover img {
    transform: scale(1.03);
}

.kdt-bds-card .card-thumb {
    position: relative;
    overflow: hidden;
    padding-top: 0;
    height: 200px;
    max-height: 200px;
    min-height: 200px;
    width: 100%;
    background-color: #f1f5f9;
}

.kdt-bds-card .card-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 4. Khung nội dung Card (Body) - Giải phóng cho Elementor */
.kdt-bds-card .card-body {
    padding: 0;
    box-sizing: border-box;
}

/* 5. Tiêu đề BĐS - GIẢI PHÓNG HOÀN TOÀN CHO ELEMENTOR ĐIỀU KHIỂN (Bỏ line-clamp, min-height, font, color) */
.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    text-align: left;
    word-break: break-word;
    box-sizing: border-box;
}

.kdt-bds-card .card-title,
.kdt-bds-loop-card .elementor-heading-title {
    margin: 0;
    padding: 0;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.kdt-bds-card .card-title a {
    color: inherit;
    text-decoration: none;
}

/* 6. Đơn giá - GIẢI PHÓNG HOÀN TOÀN CHO ELEMENTOR ĐIỀU KHIỂN (Nhận font, color, text-align từ Builder) */
.tax-product_cat ul.products li.product .price {
    padding: 0;
    margin: 0;
    text-align: left;
    display: block;
    line-height: 1.2;
    font-size: 18px;
    font-weight: 700;
    color: #d0021b;
    box-sizing: border-box;
}

.kdt-bds-card .card-price,
.kdt-bds-loop-card .elementor-widget-woocommerce-product-price {
    padding: 0;
    margin: 0;
    display: block;
    box-sizing: border-box;
}

.kdt-bds-card .card-price .bds-price,
.kdt-bds-loop-card .bds-price {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
    display: inline-block;
}

/* Ẩn tiền tố mặc định nếu có trong loop BĐS */
.tax-product_cat ul.products li.product .rrp-price,
.tax-product_cat ul.products li.product .price del {
    display: none;
}

/* 7. Hộp thông số (.thong-tin-du-an) - GIẢI PHÓNG HOÀN TOÀN CHO ELEMENTOR (Bỏ min-height 110px, background, border, icon color) */
.tax-product_cat ul.products li.product .thong-tin-du-an {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.kdt-bds-card .thong-tin-du-an {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.kdt-bds-card .thong-tin-du-an i {
    font-size: inherit;
    margin-right: 6px;
    text-align: center;
}

.kdt-bds-card .thong-tin-du-an strong {
    font-weight: 600;
    margin-right: 2px;
}

/* 8. Nút Chi tiết › - GIẢI PHÓNG HOÀN TOÀN CHO ELEMENTOR (Bỏ color, font, hover color cố định) */
.tax-product_cat ul.products li.product .kdt-card-action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin-top: auto;
    background: transparent;
    border: none;
}

.tax-product_cat ul.products li.product .kdt-view-detail {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--kdt-primary, #007351);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.kdt-bds-card .card-footer {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
}

.kdt-bds-card .btn-view-bds {
    text-decoration: none;
}

/* Ẩn nút mua hàng trong danh mục BĐS */
.tax-product_cat ul.products li.product .add_to_cart_button,
.tax-product_cat ul.products li.product .ajax_add_to_cart,
.kdt-bds-card .add_to_cart_button,
.kdt-bds-loop-card .add_to_cart_button {
    display: none;
}

/* 9. Accessibility: Chuẩn hóa .screen-reader-text (TUYỆT ĐỐI KHÔNG DÙNG display: none) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Ẩn nút mua hàng trong danh mục BĐS (không ảnh hưởng toàn bộ sản phẩm WooCommerce) */
.tax-product_cat ul.products li.product .add_to_cart_button,
.tax-product_cat ul.products li.product .ajax_add_to_cart,
.kdt-bds-card .add_to_cart_button,
.kdt-bds-loop-card .add_to_cart_button {
    display: none;
}

/* ==========================================================================
   KHỐI 1: 8 THẺ MENU DANH MỤC BẤT ĐỘNG SẢN (CHUẨN GIAO DIỆN NGUYÊN BẢN USER)
   Lưu ý: Tuyệt đối KHÔNG gán rule lên Container mẹ để người dùng tự do chỉnh tay
   ========================================================================== */

/* Định dạng thẻ Menu BĐS (chuẩn 4 cột, nền trắng, bo góc 8px, bóng đổ) */
.elementor-widget-image-box.kdt-menu-card {
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    width: calc(25% - 15px) !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    padding: 6px 6px 12px 6px !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.elementor-widget-image-box.kdt-menu-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14) !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-wrapper {
    display: block !important;
    width: 100% !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-img {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    height: 115px !important;
    width: 100% !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-img a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 6px !important;
    transition: transform 0.35s ease !important;
}

.elementor-widget-image-box.kdt-menu-card:hover .elementor-image-box-img img {
    transform: scale(1.05) !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-content {
    padding: 2px 4px 0 !important;
    background: transparent !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #0e3e33 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.2px !important;
    text-align: center !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-title a {
    color: #0e3e33 !important;
    text-decoration: none !important;
    display: block !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-title::after {
    content: '' !important;
    display: block !important;
    width: 35px !important;
    height: 2px !important;
    background: #0e3e33 !important;
    margin: 8px auto 0 !important;
    transition: width 0.3s ease, background 0.3s ease !important;
}

.elementor-widget-image-box.kdt-menu-card:hover .elementor-image-box-title::after {
    width: 55px !important;
    background: #c5a869 !important;
}

.elementor-widget-image-box.kdt-menu-card .elementor-image-box-description {
    display: none !important;
}

@media (max-width: 1024px) and (min-width: 768px) {
    .elementor-widget-image-box.kdt-menu-card {
        flex: 0 0 calc(25% - 10px) !important;
        max-width: calc(25% - 10px) !important;
        width: calc(25% - 10px) !important;
        padding: 4px 4px 8px 4px !important;
        margin-bottom: 0 !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-img {
        height: 76px !important;
        margin-bottom: 6px !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-content {
        padding: 0 2px !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-title {
        font-size: 9.5px !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-title::after {
        margin: 5px auto 0 !important;
    }
}

@media (max-width: 767px) {
    .elementor-widget-image-box.kdt-menu-card {
        flex: 0 0 calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
        margin-bottom: 2px !important;
        padding: 4px 4px 7px 4px !important;
        border-radius: 6px !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-img {
        height: 70px !important;
        margin-bottom: 6px !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-content {
        padding: 0 2px !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-title {
        font-size: 10px !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }
    .elementor-widget-image-box.kdt-menu-card .elementor-image-box-title::after {
        margin: 5px auto 0 !important;
    }
}

/* ==========================================================================
   HOMEPAGE LOOP CAROUSEL SLIDER ENHANCEMENT
   ========================================================================== */
.elementor-widget-loop-carousel {
    position: relative !important;
}

.elementor-widget-loop-carousel .elementor-swiper {
    position: relative !important;
    padding: 10px 0 35px 0 !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button {
    background: #ffffff !important;
    color: #0e3e33 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 15 !important;
    cursor: pointer !important;
    top: calc(50% - 20px) !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button i,
.elementor-widget-loop-carousel .elementor-swiper-button svg {
    fill: #0e3e33 !important;
    color: #0e3e33 !important;
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button:hover {
    background: #0e3e33 !important;
    box-shadow: 0 6px 20px rgba(14, 62, 51, 0.25) !important;
    transform: scale(1.08) !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button:hover i,
.elementor-widget-loop-carousel .elementor-swiper-button:hover svg {
    fill: #ffffff !important;
    color: #ffffff !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button-prev {
    left: -22px !important;
}

.elementor-widget-loop-carousel .elementor-swiper-button-next {
    right: -22px !important;
}

@media (max-width: 1024px) {
    .elementor-widget-loop-carousel .elementor-swiper-button-prev {
        left: 0 !important;
    }
    .elementor-widget-loop-carousel .elementor-swiper-button-next {
        right: 0 !important;
    }
}

.elementor-widget-loop-carousel .swiper-pagination {
    bottom: 5px !important;
}

.elementor-widget-loop-carousel .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: #94a3b8 !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
    margin: 0 4px !important;
}

.elementor-widget-loop-carousel .swiper-pagination-bullet-active {
    background: #0e3e33 !important;
    opacity: 1 !important;
    width: 22px !important;
    border-radius: 4px !important;
}


/* =========================================================================
   CUSTOM FLOATING ACTION BUTTONS & BACK TO TOP (MATCHING ATTACHED IMAGES)
   ========================================================================= */

/* 1. Nút Back-to-Top (#top-link) chuẩn hình vuông bo góc viền đen nền trắng */
#top-link.back-to-top {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border: 2px solid #222222 !important;
    border-radius: 9px !important;
    color: #222222 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(15px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 99999 !important;
    cursor: pointer !important;
    padding: 0 !important;
}

#top-link.back-to-top.active,
#top-link.back-to-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#top-link.back-to-top:hover {
    background: #f8fafc !important;
    border-color: #000000 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15) !important;
}

#top-link.back-to-top .kdt-chevron-up {
    width: 18px !important;
    height: 18px !important;
    stroke: #222222 !important;
    display: block !important;
}

/* 2. BUTTON CONTACT VR - CHUẨN 100% GỐC TỪ KDTVANPHUC.COM & ẢNH ĐÍNH KÈM */
#button-contact-vr {
    position: fixed !important;
    bottom: 15px !important;
    left: 15px !important;
    z-index: 99999 !important;
}
#button-contact-vr .button-contact {
    position: relative !important;
    margin-top: -15px !important;
}
#button-contact-vr .button-contact .phone-vr {
    position: relative !important;
    visibility: visible !important;
    background-color: transparent !important;
    width: 90px !important;
    height: 90px !important;
    cursor: pointer !important;
    z-index: 11 !important;
    -webkit-backface-visibility: hidden !important;
    -webkit-transform: translateZ(0) !important;
    transition: visibility .5s !important;
    left: 0 !important;
    bottom: 0 !important;
    display: block !important;
}
.phone-vr-circle-fill {
    width: 65px !important;
    height: 65px !important;
    top: 12px !important;
    left: 12px !important;
    position: absolute !important;
    box-shadow: 0 0 0 0 #c31d1d !important;
    background-color: rgba(230,8,8,0.7) !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    -webkit-animation: phone-vr-circle-fill 2.3s infinite ease-in-out !important;
    animation: phone-vr-circle-fill 2.3s infinite ease-in-out !important;
    transition: all .5s !important;
    -webkit-transform-origin: 50% 50% !important;
    -ms-transform-origin: 50% 50% !important;
    transform-origin: 50% 50% !important;
    -webkit-animation: zoom 1.3s infinite !important;
    animation: zoom 1.3s infinite !important;
}
.phone-vr-img-circle {
    background-color: #e60808 !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    top: 25px !important;
    left: 25px !important;
    position: absolute !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    -webkit-animation: phonering-alo-circle-img-anim 1s infinite ease-in-out !important;
    animation: phone-vr-circle-fill 1s infinite ease-in-out !important;
}
.phone-vr-img-circle a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}
.phone-vr-img-circle img {
    max-height: 25px !important;
    max-width: 27px !important;
    display: block !important;
    position: static !important;
    transform: none !important;
}

#zalo-vr .phone-vr-circle-fill {
    box-shadow: 0 0 0 0 #2196F3 !important;
    background-color: rgba(33, 150, 243, 0.7) !important;
}
#zalo-vr .phone-vr-img-circle {
    background-color: #2196F3 !important;
}

@-webkit-keyframes phone-vr-circle-fill {
    0% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
    10% { -webkit-transform: rotate(-25deg) scale(1) skew(1deg); }
    20% { -webkit-transform: rotate(25deg) scale(1) skew(1deg); }
    30% { -webkit-transform: rotate(-25deg) scale(1) skew(1deg); }
    40% { -webkit-transform: rotate(25deg) scale(1) skew(1deg); }
    50% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
    100% { -webkit-transform: rotate(0) scale(1) skew(1deg); }
}
@keyframes phone-vr-circle-fill {
    0% { transform: rotate(0) scale(1) skew(1deg); }
    10% { transform: rotate(-25deg) scale(1) skew(1deg); }
    20% { transform: rotate(25deg) scale(1) skew(1deg); }
    30% { transform: rotate(-25deg) scale(1) skew(1deg); }
    40% { transform: rotate(25deg) scale(1) skew(1deg); }
    50% { transform: rotate(0) scale(1) skew(1deg); }
    100% { transform: rotate(0) scale(1) skew(1deg); }
}
@-webkit-keyframes zoom {
    0% { transform: scale(.9); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px transparent; }
    100% { transform: scale(.9); box-shadow: 0 0 0 0 transparent; }
}
@keyframes zoom {
    0% { transform: scale(.9); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px transparent; }
    100% { transform: scale(.9); box-shadow: 0 0 0 0 transparent; }
}