.fs-12{
    font-size: 12px;
}
#header_site{
    z-index: 99999;
}
#menu_mobile{
    width: 100%;
}
#menu_mobile .menu_site li .sub-menu{
    display: none;
}

#menu_mobile .menu_site li .sub-menu .sub-tab {
  border: 0;
  background-color: transparent;
  border-radius: 0;
  padding: 12px;
}

#menu_mobile .menu_site li .sub-menu .sub-tab p {
  color: #4B5563;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px; /* 157.143% */
}

#menu_mobile .menu_site li .sub-menu .sub-tab:not(:last-child) {
  margin-bottom: 28px;
}

#menu_mobile .menu_site li .sub-menu .sub-tab.active {
  border-radius: 4px;
  background: var(--bg-fill-primary-subtle-default, #F0F0F2);
}

#menu_mobile .menu_site li .sub-menu .sub-tab .head-tab {
  display: flex;
  align-items: center;
  text-align: start;
  color: #000;
}

#menu_mobile .menu_site li .sub-menu .sub-tab .head-tab img {
  width: auto;
  height: 24px;
  margin-right: 5px;
}

#menu_mobile .menu_site li .sub-menu .sub-tab .head-tab.new-tag .new-mega {
  display: block;
}

#menu_mobile .menu_site li .sub-menu .sub-tab .head-tab .new-mega {
  display: none;
  border-radius: var(--2xSmall, 8px);
  border: var(--border-width-border, 1px) solid var(--border-neutral-light-default, #EFF0F3);
  background: var(--content-inverse, #FFF);
  padding: 4px 8px;
  /* shadow/xs */
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.04),
              0 4px 8px 0 rgba(0, 0, 0, 0.06);
}
#menu_mobile .btn-action{
    padding: 0 30px;
    width: 100%;
    
}
#menu_mobile .btn-action a{
    width: 100%;
    background-color: white;
    color: #000;
}




#header_site .menu_site li.menu-item-has-children:hover .sub-menu{
    top: calc(100% + 0px);
    opacity: 1;
    visibility: visible;
    transition: all .5s ease;
}
#header_site .menu_site li.menu-item-has-children .sub-menu{
    width: 100%;
    height: auto;
    background-color: transparent;
    position: absolute;
    top: calc(100% + 20px);
    opacity: 0;
    visibility: hidden;
    left: 0;
    transition: all .5s ease;
}
#header_site .menu_site li.menu-item-has-children .sub-menu nav{
    height: 100%;
}
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs{
    border: 0;
    background: var(--bg-fill-neutral-subtle-default, #F9F9FB);
    padding: 32px;
    border-radius: 0;
    height: 100%;
}
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs {
  border: 0;
  background: var(--bg-fill-neutral-subtle-default, #F9F9FB);
  padding: 32px;
  border-radius: 0;
  height: 100%;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button {
  border: 0;
  background-color: transparent;
  border-radius: 0;
  padding: 12px;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button p {
  color: #4B5563;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px; /* 157.143% */
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button:not(:last-child) {
  margin-bottom: 28px;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button.active {
  border-radius: 4px;
  background: var(--bg-fill-primary-subtle-default, #F0F0F2);
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button .head-tab {
  display: flex;
  align-items: center;
  text-align: start;
  color: #000;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button .head-tab img {
  width: auto;
  height: 24px;
  margin-right: 5px;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button .head-tab.new-tag .new-mega {
  display: block;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs button .head-tab .new-mega {
  display: none;
  border-radius: var(--2xSmall, 8px);
  border: var(--border-width-border, 1px) solid var(--border-neutral-light-default, #EFF0F3);
  background: var(--content-inverse, #FFF);
  padding: 4px 8px;
  /* shadow/xs */
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.04),
              0 4px 8px 0 rgba(0, 0, 0, 0.06);
}
#header_site .menu_site li.menu-item-has-children .sub-menu .wrap_content-mega {
  background: var(--bg-fill-neutral-subtle-hover, #EFF0F3);
  padding: 32px;
  height: 100%;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .wrap_content-mega .tab-content ul {
  list-style: none;
  padding-left: 0;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .wrap_content-mega .tab-content ul li {
  position: relative;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .wrap_content-mega .tab-content ul li::after {
  position: absolute;
  content: "\f105";
  font-family: "fontAwesome";
  top: 50%;
  transform: translateY(-50%);
  right: 15px;
}


#mega_menu_image_target {
    transition: opacity 0.3s ease-in-out; 
    opacity: 1;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.img-fading {
    opacity: 0 !important;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link {
  border: 0;
  background-color: transparent;
  border-radius: 0;
  padding: 12px;
  display: block;
  text-decoration: none; 
  width: 100%; 
}

/* Style cho text mô tả bên trong thẻ a */
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link p {
  color: #4B5563;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px; 
}

/* Margin bottom giữa các item */
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link:not(:last-child) {
  margin-bottom: 28px;
}

/* Style khi Active (Hover vào) */
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link.active {
  border-radius: 4px;
  background: var(--bg-fill-primary-subtle-default, #F0F0F2);
}

/* Style cho phần header của tab (Icon + Title) */
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link .head-tab {
  display: flex;
  align-items: center;
  text-align: start;
  color: #000;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link .head-tab img {
  width: auto;
  height: 24px;
  margin-right: 5px;
}

/* Badge 'Mới' */
#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link .head-tab.new-tag .new-mega {
  display: block;
}

#header_site .menu_site li.menu-item-has-children .sub-menu .nav-tabs .nav-link .head-tab .new-mega {
  display: none;
  border-radius: var(--2xSmall, 8px);
  border: var(--border-width-border, 1px) solid var(--border-neutral-light-default, #EFF0F3);
  background: var(--content-inverse, #FFF);
  padding: 4px 8px;
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.04), 0 4px 8px 0 rgba(0, 0, 0, 0.06);
  color: #000; /* Đảm bảo text không bị đổi màu */
  font-weight: normal;
}


/* =========================================
   CUSTOM MEGA MENU - INDEPENDENT HEIGHTS
========================================= */
#header_site .menu_site li.menu-item-has-children.mega-menu-wrapper {
    position: relative;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0 !important; 
    transform: translateY(10px) !important; 
    width: auto !important; 
    min-width: 220px !important;
    background: transparent !important;
    border: none !important;        
    box-shadow: none !important;      
    filter: drop-shadow(0px 8px 24px rgba(0, 0, 0, 0.12)); 
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    padding: 0;
}

#header_site .menu_site li.menu-item-has-children.mega-menu-wrapper:hover .sub-menu.custom-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-inner {
    display: flex;
    flex-direction: row;
   align-items: flex-start !important;
}
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-right,
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-col-3 {
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin-top 0.2s ease;
}
/* 2. CỘT TRÁI: Đặt nền và viền riêng */
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-left {
    position: relative;
    width: 220px;
    background: #F5F5F5;
    /* padding: 16px 0; */
    border: 1px solid #E5E5E5;
    border-radius: 2px; 
    transition: border-radius 0.3s ease;
    z-index: 2; 
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-right-col .mega-left {
    border-radius: 2px 0 0 2px;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #000;
    transition: 0.2s ease;
    font-weight: 400;
    white-space: nowrap;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item i {
    font-size: 24px;
    color: #000;
}
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a i{
  font-size: 24px;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item:hover, 
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item.active {
    background: #E9E9E9;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-right {
    position: relative;
    width: 0;
    opacity: 0;
    background: #E9E9E9; 
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent; 
    border-radius: 0 2px 2px 2px; 
    margin-left: -1px; 
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    z-index: 1;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-right-col .mega-right {
    width: 220px;
    opacity: 1;
    /* padding: 16px 0; */
    border-color: #E5E5E5; 
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel.active {
    display: block;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.2s;
    border-radius: 0;
    white-space: nowrap;
    background: transparent;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a:hover {
    background: #F5F5F5;
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Mobile */
@media (max-width: 991px) {
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu {
        position: static;
        width: 100% !important;
        min-width: 100% !important;
        transform: none !important;
        filter: none;
        display: none;
    }
    #header_site .menu_site li.menu-item-has-children.show_submenu .sub-menu.custom-mega-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-inner {
        flex-direction: column;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-left {
        width: 100%;
        border-radius: 8px;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-right-col .mega-left {
        border-radius: 8px 8px 0 0;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-right {
        border-radius: 0 0 8px 8px;
        margin-left: 0;
        margin-top: -1px;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-right-col .mega-right {
        width: 100%;
    }
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-right {
    /* padding: 16px 0 !important; */
    transition: width 0.3s ease, opacity 0.3s ease;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul {
    margin: 0 !important;
    padding: 0 !important;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item,
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a {
    line-height: 24px !important; /* Ép chung 1 line-height */
    box-sizing: border-box !important;
    margin: 0 !important;
}


#menu_mobile .menu_site li .sub-menu {
  padding-left: 0 !important;
  background: var(--Greyscale-25) !important;
  border-top: 1px solid var(--Greyscale-100);
}

#menu_mobile .menu_site li .sub-menu > li > a {
  text-transform: none !important;
  font-size: 16px !important;
  padding: 12px 30px 12px 45px !important; 
  color: var(--Greyscale-600) !important;
  border-bottom: 1px solid var(--Greyscale-100);
}

#menu_mobile .menu_site li .sub-menu > li:last-child > a {
  border-bottom: none !important;
}

#menu_mobile .menu_site li .sub-menu > li .sub-menu {
  background: var(--Greyscale-50) !important;
  border-top: none !important;
}

#menu_mobile .menu_site li .sub-menu > li .sub-menu > li > a {
  padding: 10px 30px 10px 60px !important;
  font-size: 15px !important;
  color: var(--Greyscale-500) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

#menu_mobile .menu_site li.menu-item-has-children::after {
  pointer-events: none !important; 
}

#menu_mobile .menu_site li .sub-menu li.menu-item-has-children::after {
  height: 48px !important; 
  color: var(--Greyscale-600) !important;
  font-size: 14px !important;
}

#menu_mobile .menu_site li.menu-item-has-children.show_submenu > a {
  color: var(--Greyscale-900) !important;
  font-weight: 600 !important;
}

#menu_mobile .menu_site li.menu-item-has-children::after {
    content: none !important;
    display: none !important;
}

#menu_mobile .menu_site li.menu-item-has-children > a {
    position: relative !important;
}

#menu_mobile .menu_site li.menu-item-has-children > a::after {
    content: "\f107" !important;
    font-family: "FontAwesome" !important;
    position: absolute !important;
    right: 30px !important; 
    top: 50% !important;
    transform: translateY(-50%) !important; 
    width: 28px !important; 
    height: 28px !important;
    display: flex !important;
    justify-content: center !important; 
    align-items: center !important;
    transition: transform 0.3s ease !important;
    pointer-events: none !important; 
    font-size: 24px;
}

#menu_mobile .menu_site li.menu-item-has-children.show_submenu > a::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

#menu_mobile .menu_site li .sub-menu li.menu-item-has-children > a::after {
    right: 20px !important;
    color: var(--Greyscale-600) !important;
    font-size: 22px !important;
}
/* Style cho menu cấp 4 (Mục con của Mua sắm, Nhà thầu...) trên mobile */
#menu_mobile .menu_site li .sub-menu > li .sub-menu > li .sub-menu {
    background: #FFFFFF !important; /* Làm sáng nền lên chút cho dễ nhìn */
    border-top: none !important;
}

/* Thụt lề (padding-left) sâu hơn cho text cấp 4 */
#menu_mobile .menu_site li .sub-menu > li .sub-menu > li .sub-menu > li > a {
    padding: 10px 30px 10px 75px !important; /* Thụt vào 75px */
    font-size: 14px !important;
    color: var(--Greyscale-500) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

/* Tùy chỉnh mũi tên thả xuống cho cấp 3 trên mobile để nó thẳng hàng */
#menu_mobile .menu_site li .sub-menu > li .sub-menu > li.menu-item-has-children > a::after {
    right: 20px !important;
}
/* =========================================
   3. CỘT BA: Dành cho Menu con cấp 3
========================================= */
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-col-3 {
    position: relative;
    width: 0;
    opacity: 0;
    background: #F5F5F5; 
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent; 
    border-radius: 0 2px 2px 2px; 
    margin-left: -1px; 
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    z-index: 0;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-col-3 .mega-col-3 {
    width: 220px;
    opacity: 1;
    /* padding: 16px 0 !important; */
    border-color: #E5E5E5; 
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-col-3 .mega-right {
    border-radius: 0;
}

/* Panel và Item của Cột 3 */
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel.active {
    display: block;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px !important; /* Thêm !important */
    color: #333;
    font-size: 14px !important; /* Đổi từ 15px về 14px cho bằng Cột 1 & 2 */
    font-weight: 400;
    transition: background 0.2s;
    border-radius: 0;
    white-space: nowrap;
    background: transparent;
}

#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel ul li a:hover {
    background: #E9E9E9;
    color: #000;
}

/* Highlight item khi đang hover mở cột 3 */
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a.active {
    background: #D9D9D9; 
    color: #000;
}

/* Responsive Mobile cho Cột 3 */
@media (max-width: 991px) {
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-col-3 {
        border-radius: 0 0 8px 8px;
        margin-left: 0;
        margin-top: -1px;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-col-3 .mega-col-3 {
        width: 100%;
    }
    #header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu.show-col-3 .mega-right {
        border-radius: 0;
    }
}
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-nav-item,
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-panel ul li a,
#header_site .menu_site li.menu-item-has-children .sub-menu.custom-mega-menu .mega-sub-panel ul li a {
    line-height: 24px !important; /* Ép chung 1 line-height */
    box-sizing: border-box !important;
    margin: 0 !important;
}



/* ================= ROOM GALLERY COMPONENT ================= */
.room-gallery-section .filter-wrap .room-filter-select {
    width: auto;
    min-width: 160px;
    border-radius: 6px;
    border: 1px solid var(--Greyscale-300, #A3A3A3);
    color: var(--Greyscale-900, #0A0A0A);
    font-size: 14px;
    padding: 8px 36px 8px 16px;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

.room-gallery-section .filter-wrap .room-filter-select:focus {
    border-color: var(--Greyscale-900, #0A0A0A);
}

.room-gallery-section .gallery-grid .gallery-item-fig {
    position: relative;
    padding-bottom: 100%; 
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 12px; 
    background-color: var(--Greyscale-50, #F5F5F5); 
}

.room-gallery-section .gallery-grid .gallery-item-fig img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.room-gallery-section .gallery-grid a:hover .gallery-item-fig img {
    transform: scale(1.08);
}

.j_paging .wp-pagenavi a svg {
    vertical-align: middle;
    margin-top: -2px;
}


/* ================= TÙY CHỈNH FANCYBOX (CHỈ DÀNH CHO ROOM GALLERY) ================= */
.custom-room-gallery-popup {
    --fancybox-bg: #000000;
}

.custom-room-gallery-popup .f-button{
border-radius: 50% !important; 
}



.custom-room-gallery-popup .fancybox__toolbar {
    background: transparent !important;
    text-shadow: none !important;
    padding: 20px 30px !important; 
    display: flex !important;
    align-items: center !important; 
}

.custom-room-gallery-popup .fancybox__infobar {
    display: flex !important; 
    align-items: center !important; 
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 0 !important;
    height: 44px !important;
    text-shadow: none !important;
    position: static !important; 
}
.custom-room-gallery-popup .fancybox__infobar span {
    padding: 0 !important;
}

/* 3. Nút Đóng (X) */
.custom-room-gallery-popup .f-button.is-close-btn {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    color: white !important;
    backdrop-filter: blur(4px);
}
.custom-room-gallery-popup .f-button.is-close-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2 !important;
}
.custom-room-gallery-popup .f-button.is-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.custom-room-gallery-popup .fancybox__nav .f-button svg {
    display: none !important;
}

.custom-room-gallery-popup .fancybox__nav .f-button {
    background-color: #fff !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    opacity: 1 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    margin: 0 20px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 20px !important; 
}

.custom-room-gallery-popup .fancybox__nav .f-button:hover {
    background-color: #f5f5f5 !important;
}

.custom-room-gallery-popup .fancybox__nav .f-button.is-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.custom-room-gallery-popup .fancybox__nav .f-button.is-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.custom-room-gallery-popup .fancybox__slide {
    padding-bottom: 20px !important; 
}
.custom-room-gallery-popup .fancybox__caption {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
    padding: 160px 40px 20px 40px !important;  
    color: #fff !important;
    z-index: 99996 !important; 
    pointer-events: none; 
}

.custom-room-gallery-popup .custom-fancybox-info {
    pointer-events: auto; 
}

.custom-room-gallery-popup .fancybox__caption * {
    color: #ffffff !important;
}

.custom-room-gallery-popup .custom-fancybox-info p {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.custom-room-gallery-popup .custom-fancybox-info strong {
    color: #ffffff !important;
}

.custom-room-gallery-popup .custom-fancybox-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: calc(70vw - 120px); 
    margin: 0 auto;
}
.custom-room-gallery-popup .info-col {
    flex: 1;
    min-width: 250px;
    padding-right: 20px;
}
.custom-room-gallery-popup .info-col p {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}
.custom-room-gallery-popup strong {
    font-weight: 700;
    margin-right: 5px;
}
.custom-room-gallery-popup .dot {
    display: inline-block;
    /* width: 4px;
    height: 4px; */
    background-color: #fff;
    border-radius: 50%;
    margin-top: 9px;
    margin-right: 12px;
    flex-shrink: 0;
}

.custom-room-gallery-popup .fancybox__thumbs {
    position: relative !important;
    z-index: 99997 !important; 
    background: #000 !important;
    padding: 0px 140px !important;
}

.custom-room-gallery-popup .fancybox__thumb {
    border-radius: 4px !important;
}

/* ================= TÙY CHỈNH FANCYBOX MOBILE ================= */
@media (max-width: 767px) {

  .room-gallery-section .gallery-grid > div:nth-child(n+11) {
        display: none !important;
    }
  .custom-room-gallery-popup .fancybox__toolbar {
        padding: 15px 20px !important; 
    }
    
    .custom-room-gallery-popup .f-button.is-close-btn {
        width: 38px !important;
        height: 38px !important;
    }
    .custom-room-gallery-popup .fancybox__infobar {
        height: 38px !important; 
        font-size: 15px !important;
    }
    .custom-room-gallery-popup .fancybox__nav .f-button {
        width: 36px !important;
        height: 36px !important;
        margin: 0 10px !important;
    }

    .custom-room-gallery-popup .fancybox__thumbs {
      padding: 0px 10px !important;
    }

    .custom-room-gallery-popup .fancybox__nav .f-button {
        width: 36px !important;
        height: 36px !important;
        margin: 0 10px !important;
    }

    .custom-room-gallery-popup .fancybox__caption {
        padding: 60px 15px 0px 15px !important; 
        background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.9) 30%,
        rgba(0, 0, 0, 0.7) 60%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
    }

    .custom-room-gallery-popup .custom-fancybox-info {
       margin-bottom: 130px;   
        max-width: 100%;
    }

    .custom-room-gallery-popup .info-col {
        display: contents; 
    }

    .custom-room-gallery-popup .info-col p {
        width: 50%;
        font-size: 10px !important; 
        margin-bottom: 6px;
        padding-right: 5px;
        word-break: break-word;
    }
    .custom-room-gallery-popup .dot {
        width: 3px;
        height: 3px;
        margin-top: 5px;
        margin-right: 6px;
    }
}

/* ================= TÙY CHỈNH ROOM GALLERY GIỐNG BẢN THIẾT KẾ ================= */
.room-gallery-section {
    padding: 40px 0;
}

/* 1. Phần Filter Tags */
.room-filter-tags ul {
    gap: 4px;
}
.room-filter-tags ul li a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    color: var(--Greyscale-600, #404040);
    background: var(--Greyscale-0, #FFFFFF);
    border: 1px solid var(--Greyscale-100, #E5E5E5);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.room-filter-tags ul li a.active,
.room-filter-tags ul li a:hover {
    background: var(--Greyscale-900, #0A0A0A);
    color: var(--Greyscale-0, #FFFFFF);
    border-color: var(--Greyscale-900, #0A0A0A);
}

/* 2. Phần lưới hình ảnh */
.room-gallery-section .gallery-grid .gallery-item-fig {
    position: relative;
    padding-bottom: 66%;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--Greyscale-50, #F5F5F5); 
}
.room-gallery-section .gallery-grid .gallery-item-fig img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 0;
}

/* Phóng to ảnh khi hover (KHÔNG làm đen ảnh) */
.room-gallery-section .gallery-grid a:hover .gallery-item-fig img {
    transform: scale(1.08);
}

/* 3. Thẻ tag & Lượt xem (Ẩn mặc định, hiện khi hover) */
.room-gallery-section .room-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    color: #000;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    z-index: 2;
    opacity: 0; 
    transform: translateY(-10px); 
    transition: all 0.4s ease;
}

.room-gallery-section .view-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0; 
    transform: translateY(10px); 
    transition: all 0.4s ease;
    text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.8); 
}

.room-gallery-section .view-count svg {
    filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.8));
}

.room-gallery-section .gallery-grid a:hover .room-badge,
.room-gallery-section .gallery-grid a:hover .view-count {
    opacity: 1;
    transform: translateY(0); 
}

/* 4. Nút Xem Thêm */
.btn-load-more {
    border: 1px solid var(--Greyscale-300, #A3A3A3);
    background: #fff;
    color: #000;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.btn-load-more:hover {
    background: var(--Greyscale-50, #F5F5F5);
    color: #000;
}

/* Override tỉ lệ ảnh cho room gallery dùng item_post */
.room-gallery-section .item_post figure {
    padding-bottom: 66%; /* Tỉ lệ landscape */
    border-radius: 8px;
}

/* Đảm bảo link bên trong figure fill full */
.room-gallery-section .item_post figure > a.d-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== FIX: Room gallery - ẩn badge & view, chỉ hiện khi hover ===== */

/* Ẩn badge danh mục mặc định */
.room-gallery-section .item_post .post_cate {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s ease !important;
}

/* Hiện badge khi hover */
.room-gallery-section .item_post:hover .post_cate {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ẩn meta-bottom-left (view count + nút) mặc định */
.room-gallery-section .item_post .meta-bottom-left {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s ease !important;
}

/* Hiện meta-bottom-left khi hover */
.room-gallery-section .item_post:hover .meta-bottom-left {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ẩn mũi tên góc phải dưới (::before và ::after của figure) */
.room-gallery-section .item_post figure::before,
.room-gallery-section .item_post figure::after {
    opacity: 0 !important;
    transition: all 0.4s ease !important;
}

.room-gallery-section .item_post:hover figure::before,
.room-gallery-section .item_post:hover figure::after {
    opacity: 1 !important;
}

/* ===== Mobile: Room gallery 2 cột ===== */
@media (max-width: 767px) {
    .room-gallery-section .gallery-grid .col-12 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    
    .room-gallery-section .gallery-grid {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }
}

.fancybox__container {
    z-index: 9999999 !important;
}
 
/* Khi fancybox đang mở, hạ header xuống */
body:has(.fancybox__container) #header_site {
    z-index: 1 !important;
}
 
/* Fallback cho trình duyệt không hỗ trợ :has() */
#header_site.fancybox-open {
    z-index: 1 !important;
}
 
@media (max-width: 991px) {
    /* 1. Mặc định ẨN tên phòng trên Mobile */
    body.tax-project_room .item_post figure .post_cate,
    body.page-template-room-page .item_post figure .post_cate,
    body.page-template-page-phong-du-an .item_post figure .post_cate {
        display: flex !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: all 0.3s ease !important;
    }

    /* 2. CHỈ hiện tên phòng khi Hover/Active (Chạm vào trên Mobile) */
    body.tax-project_room .item_post:hover figure .post_cate,
    body.tax-project_room .item_post:active figure .post_cate,
    body.page-template-room-page .item_post:hover figure .post_cate,
    body.page-template-room-page .item_post:active figure .post_cate,
    body.page-template-page-phong-du-an .item_post:hover figure .post_cate,
    body.page-template-page-phong-du-an .item_post:active figure .post_cate {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* 3. Chỉnh lại size chữ cho gọn trên Mobile */
    body.tax-project_room .item_post figure .post_cate a, 
    body.tax-project_room .item_post figure .post_cate span,
    body.page-template-room-page .item_post figure .post_cate a, 
    body.page-template-room-page .item_post figure .post_cate span,
    body.page-template-page-phong-du-an .item_post figure .post_cate a, 
    body.page-template-page-phong-du-an .item_post figure .post_cate span {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

/* Trả lại 100% chiều rộng cho cục Loading và thông báo lỗi trên Mobile để canh giữa */
@media (max-width: 767px) {
    .room-gallery-section .gallery-grid #room-loading,
    .room-gallery-section .gallery-grid > .col-12.text-center {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
.select2-container--bootstrap-5 .select2-selection{
    border: 1px solid var(--Greyscale-900) !important;
    border-radius: 8px !important;
}