/* =========================================================
   DHHD Desktop Menu Pro v1.0.0
   Flatsome desktop only — >= 850px
   ========================================================= */

@media(min-width:850px){

  body.dhhd-desktop-menu-pro-active #header,
  body.dhhd-desktop-menu-pro-active #header .header-wrapper,
  body.dhhd-desktop-menu-pro-active #header .header-main{
    overflow:visible!important;
  }

  /* Chỉ áp font cho chữ menu, KHÔNG áp vào icon font của Flatsome */
  body.dhhd-desktop-menu-pro-active #header .nav > li > a,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a{
    font-family:"Be Vietnam Pro",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
  }

  /* Header polish */
  body.dhhd-desktop-menu-pro-active #header .header-main{
    background:#fff!important;
    border-bottom:1px solid rgba(203,216,229,.72)!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-wrapper.stuck,
  body.dhhd-desktop-menu-pro-active #header .stuck .header-main{
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 8px 28px rgba(8,46,141,.10)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
  }

  /* Top-level navigation */
  body.dhhd-desktop-menu-pro-active #header .header-nav > li,
  body.dhhd-desktop-menu-pro-active #header .nav > li{
    position:relative!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a,
  body.dhhd-desktop-menu-pro-active #header .nav > li > a{
    position:relative!important;
    min-height:54px!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    padding:0 15px!important;
    color:var(--dmp-blue)!important;
    font-size:var(--dmp-nav-size)!important;
    font-weight:700!important;
    line-height:1.2!important;
    letter-spacing:-.012em!important;
    opacity:1!important;
    transition:color .2s ease,transform .2s ease!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a:hover,
  body.dhhd-desktop-menu-pro-active #header .nav > li > a:hover,
  body.dhhd-desktop-menu-pro-active #header .header-nav > li.active > a,
  body.dhhd-desktop-menu-pro-active #header .header-nav > li.current-menu-item > a,
  body.dhhd-desktop-menu-pro-active #header .header-nav > li.current-menu-ancestor > a,
  body.dhhd-desktop-menu-pro-active #header .nav > li.active > a,
  body.dhhd-desktop-menu-pro-active #header .nav > li.current-menu-item > a,
  body.dhhd-desktop-menu-pro-active #header .nav > li.current-menu-ancestor > a{
    color:var(--dmp-red)!important;
  }

  /* Active / hover underline */
  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a:after,
  body.dhhd-desktop-menu-pro-active #header .nav > li > a:after{
    content:""!important;
    position:absolute!important;
    left:15px!important;
    right:15px!important;
    bottom:4px!important;
    height:3px!important;
    border:0!important;
    border-radius:99px!important;
    background:var(--dmp-red)!important;
    transform:scaleX(0)!important;
    transform-origin:center!important;
    opacity:0!important;
    transition:transform .22s ease,opacity .22s ease!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-nav > li:hover > a:after,
  body.dhhd-desktop-menu-pro-active #header .header-nav > li.current-menu-item > a:after,
  body.dhhd-desktop-menu-pro-active #header .header-nav > li.current-menu-ancestor > a:after,
  body.dhhd-desktop-menu-pro-active #header .nav > li:hover > a:after,
  body.dhhd-desktop-menu-pro-active #header .nav > li.current-menu-item > a:after,
  body.dhhd-desktop-menu-pro-active #header .nav > li.current-menu-ancestor > a:after{
    transform:scaleX(1)!important;
    opacity:1!important;
  }

  /* Flatsome caret */
  body.dhhd-desktop-menu-pro-active #header .icon-angle-down{
    color:currentColor!important;
    opacity:.8!important;
    margin-left:2px!important;
    transition:transform .2s ease!important;
  }
  body.dhhd-desktop-menu-pro-active #header li:hover > a .icon-angle-down{
    transform:rotate(180deg)!important;
  }

  /* Dropdown shell */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown,
  body.dhhd-desktop-menu-pro-active #header .sub-menu{
    min-width:var(--dmp-drop-width)!important;
    padding:10px!important;
    border:1px solid var(--dmp-line)!important;
    border-radius:var(--dmp-radius)!important;
    background:#fff!important;
    box-shadow:0 18px 48px rgba(8,46,141,.16)!important;
    overflow:visible!important;
  }

  body.dhhd-desktop-menu-pro-active #header .nav-dropdown{
    margin-top:8px!important;
  }

  /* Kill old red backgrounds from theme/menu settings */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown-default,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown-default .nav-column,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown-default .nav-column li,
  body.dhhd-desktop-menu-pro-active #header .sub-menu,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li{
    background-color:#fff!important;
  }

  /* Arrow on top of dropdown */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown:before{
    content:""!important;
    position:absolute!important;
    top:-7px!important;
    left:32px!important;
    width:14px!important;
    height:14px!important;
    background:#fff!important;
    border-top:1px solid var(--dmp-line)!important;
    border-left:1px solid var(--dmp-line)!important;
    transform:rotate(45deg)!important;
    z-index:0!important;
  }

  /* Dropdown items */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li{
    margin:0!important;
    border:0!important;
  }

  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a{
    position:relative!important;
    min-height:var(--dmp-item-height)!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    margin:2px 0!important;
    padding:8px 34px 8px 14px!important;
    border:0!important;
    border-radius:11px!important;
    background:#fff!important;
    color:var(--dmp-ink)!important;
    font-size:var(--dmp-drop-size)!important;
    font-weight:600!important;
    line-height:1.35!important;
    white-space:normal!important;
    opacity:1!important;
    transition:background .18s ease,color .18s ease,transform .18s ease!important;
  }

  /* red dot */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a:before,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a:before{
    content:""!important;
    flex:0 0 auto!important;
    width:7px!important;
    height:7px!important;
    margin:0!important;
    border:0!important;
    border-radius:50%!important;
    background:var(--dmp-red)!important;
    opacity:.8!important;
  }

  /* arrow right */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a:after,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a:after{
    content:"→"!important;
    position:absolute!important;
    right:13px!important;
    top:50%!important;
    width:auto!important;
    height:auto!important;
    border:0!important;
    background:none!important;
    color:var(--dmp-blue)!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1!important;
    opacity:.55!important;
    transform:translateY(-50%) translateX(-2px)!important;
    transition:opacity .18s ease,transform .18s ease!important;
  }

  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a:hover,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li.active > a,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li.current-menu-item > a,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a:hover,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li.current-menu-item > a{
    background:var(--dmp-soft)!important;
    color:var(--dmp-blue)!important;
    transform:translateX(3px)!important;
  }

  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a:hover:after,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a:hover:after{
    opacity:1!important;
    transform:translateY(-50%) translateX(2px)!important;
  }

  /* Nested dropdown */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown .sub-menu,
  body.dhhd-desktop-menu-pro-active #header .sub-menu .sub-menu{
    top:-10px!important;
    left:calc(100% + 8px)!important;
  }

  /* Mega menu auto */
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega{
    position:static!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .nav-dropdown,
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .sub-menu{
    left:50%!important;
    right:auto!important;
    width:min(720px,calc(100vw - 80px))!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:repeat(var(--dmp-mega-cols,2),minmax(0,1fr))!important;
    gap:4px 12px!important;
    transform:translateX(-50%)!important;
    padding:14px!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .nav-dropdown:before{
    left:50%!important;
    transform:translateX(-50%) rotate(45deg)!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .nav-dropdown > li,
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .sub-menu > li{
    min-width:0!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .nav-dropdown > li > a,
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-mega > .sub-menu > li > a{
    height:100%!important;
  }

  /* Optional Contact CTA */
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a{
    min-height:40px!important;
    margin:7px 0!important;
    padding:0 15px!important;
    border:1.5px solid var(--dmp-red)!important;
    border-radius:11px!important;
    color:var(--dmp-red)!important;
  }
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a:after{
    display:none!important;
  }
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a:hover{
    background:var(--dmp-red)!important;
    color:#fff!important;
    box-shadow:0 8px 18px rgba(231,11,26,.16)!important;
  }

  /* Search icon */
  body.dhhd-desktop-menu-pro-active #header a.header-search,
  body.dhhd-desktop-menu-pro-active #header .icon-search,
  body.dhhd-desktop-menu-pro-active #header .search-icon{
    color:var(--dmp-blue)!important;
  }

  /* Prevent red inherited text */
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown *{
    text-shadow:none!important;
  }
}

/* Never touch tablet/mobile menu */
@media(max-width:849px){
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown,
  body.dhhd-desktop-menu-pro-active #header .sub-menu{
    all:revert-layer;
  }
}

/* =========================================================
   DHHD Desktop Menu Pro v1.0.1 — Header layout/icon fix
   ========================================================= */
@media(min-width:850px){

  /* 1. Không cho menu desktop rớt xuống hàng */
  body.dhhd-desktop-menu-pro-active #header .header-nav,
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav,
  body.dhhd-desktop-menu-pro-active #header .header-inner .nav{
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-nav > li,
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav > li{
    flex:0 0 auto!important;
  }

  /* 2. Thu padding vừa đủ để giữ logo + menu + search trên một hàng */
  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a,
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav > li > a{
    min-height:52px!important;
    padding-left:11px!important;
    padding-right:11px!important;
  }

  /* 3. Contact CTA không được tự tạo chiều cao / margin làm wrap */
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact{
    display:flex!important;
    align-items:center!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a{
    min-height:38px!important;
    height:38px!important;
    margin:0!important;
    padding:0 13px!important;
    border-radius:10px!important;
  }

  /* 4. Trả lại font icon Flatsome — không cho Be Vietnam Pro ghi đè */
  body.dhhd-desktop-menu-pro-active #header i,
  body.dhhd-desktop-menu-pro-active #header [class^="icon-"],
  body.dhhd-desktop-menu-pro-active #header [class*=" icon-"],
  body.dhhd-desktop-menu-pro-active #header .icon-angle-down,
  body.dhhd-desktop-menu-pro-active #header .icon-search,
  body.dhhd-desktop-menu-pro-active #header .icon-menu,
  body.dhhd-desktop-menu-pro-active #header .icon-phone{
    font-family:"fl-icons"!important;
    font-style:normal!important;
    speak:none!important;
  }

  /* Không ép font cho pseudo icon do Flatsome tạo */
  body.dhhd-desktop-menu-pro-active #header .icon-search:before,
  body.dhhd-desktop-menu-pro-active #header .icon-angle-down:before,
  body.dhhd-desktop-menu-pro-active #header [class^="icon-"]:before,
  body.dhhd-desktop-menu-pro-active #header [class*=" icon-"]:before{
    font-family:"fl-icons"!important;
  }

  /* 5. Search item luôn giữ chỗ và hiển thị */
  body.dhhd-desktop-menu-pro-active #header li.header-search,
  body.dhhd-desktop-menu-pro-active #header li.search-item,
  body.dhhd-desktop-menu-pro-active #header .header-search-form-wrapper{
    flex:0 0 auto!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search > a,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a,
  body.dhhd-desktop-menu-pro-active #header a.header-search{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:42px!important;
    width:42px!important;
    min-height:52px!important;
    padding:0!important;
    color:var(--dmp-blue)!important;
    opacity:1!important;
    visibility:visible!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search > a:after,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a:after,
  body.dhhd-desktop-menu-pro-active #header a.header-search:after{
    display:none!important;
  }

  /* 6. Chỉ chữ mới dùng Be Vietnam Pro */
  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a{
    font-family:"Be Vietnam Pro",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
  }

  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a i,
  body.dhhd-desktop-menu-pro-active #header .nav-dropdown li > a i,
  body.dhhd-desktop-menu-pro-active #header .sub-menu li > a i{
    font-family:"fl-icons"!important;
  }

  /* 7. Không làm top bar icon bị ảnh hưởng */
  body.dhhd-desktop-menu-pro-active #header .header-top i,
  body.dhhd-desktop-menu-pro-active #header .header-top [class^="icon-"],
  body.dhhd-desktop-menu-pro-active #header .header-top [class*=" icon-"]{
    font-family:"fl-icons"!important;
  }
}

/* Màn laptop nhỏ: compact thêm một chút nhưng vẫn rõ */
@media(min-width:850px) and (max-width:1199px){
  body.dhhd-desktop-menu-pro-active #header .header-nav > li > a,
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav > li > a{
    padding-left:8px!important;
    padding-right:8px!important;
    font-size:14px!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a{
    padding-left:11px!important;
    padding-right:11px!important;
  }
}

/* =========================================================
   DHHD Desktop Menu Pro v1.0.2 — Contact / Search separation
   ========================================================= */
@media(min-width:850px){

  /* Giữ các item cuối menu có khoảng cách thực, không dùng vị trí chồng lấn */
  body.dhhd-desktop-menu-pro-active #header .header-nav,
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
  }

  /* CONTACT BUTTON */
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact{
    position:relative!important;
    flex:0 0 auto!important;
    margin-left:4px!important;
    margin-right:8px!important;
    z-index:2!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a{
    position:relative!important;
    width:auto!important;
    min-width:0!important;
    min-height:38px!important;
    height:38px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    padding:0 14px!important;
    border:1.5px solid var(--dmp-red)!important;
    border-radius:11px!important;
    background:#fff!important;
    color:var(--dmp-red)!important;
    line-height:1!important;
    overflow:visible!important;
  }

  /* Contact không chứa/giả icon search */
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a:after{
    display:none!important;
    content:none!important;
  }

  /* SEARCH: luôn là item riêng */
  body.dhhd-desktop-menu-pro-active #header li.header-search,
  body.dhhd-desktop-menu-pro-active #header li.search-item,
  body.dhhd-desktop-menu-pro-active #header .header-search{
    position:relative!important;
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    margin:0 0 0 2px!important;
    padding:0!important;
    z-index:3!important;
    transform:none!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search > a,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a,
  body.dhhd-desktop-menu-pro-active #header a.header-search{
    position:relative!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #D4DFEA!important;
    border-radius:50%!important;
    background:#F6F9FD!important;
    color:var(--dmp-blue)!important;
    box-shadow:none!important;
    transform:none!important;
    overflow:visible!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search > a:hover,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a:hover,
  body.dhhd-desktop-menu-pro-active #header a.header-search:hover{
    border-color:var(--dmp-blue)!important;
    background:#EAF2FF!important;
    color:var(--dmp-blue)!important;
  }

  /* Không cho underline của menu chạy dưới search */
  body.dhhd-desktop-menu-pro-active #header li.header-search > a:after,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a:after,
  body.dhhd-desktop-menu-pro-active #header a.header-search:after{
    display:none!important;
    content:none!important;
  }

  /* Search icon ở giữa nút tròn */
  body.dhhd-desktop-menu-pro-active #header li.header-search .icon-search,
  body.dhhd-desktop-menu-pro-active #header li.search-item .icon-search,
  body.dhhd-desktop-menu-pro-active #header a.header-search .icon-search{
    position:static!important;
    display:inline-block!important;
    margin:0!important;
    padding:0!important;
    color:var(--dmp-blue)!important;
    font-family:"fl-icons"!important;
    font-size:18px!important;
    line-height:1!important;
    transform:none!important;
  }

  /* Flatsome đôi khi có text/icon wrapper rộng: ép về kích thước nội dung */
  body.dhhd-desktop-menu-pro-active #header li.header-search > a > span,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a > span{
    width:auto!important;
    max-width:22px!important;
    margin:0!important;
    padding:0!important;
  }

  /* Nếu header search đang dùng absolute từ theme/custom CSS thì trả về flow */
  body.dhhd-desktop-menu-pro-active #header .header-search-form-wrapper{
    left:auto!important;
    right:0!important;
  }

  /* Không cho item trước search lấn vùng search */
  body.dhhd-desktop-menu-pro-active #header .header-nav > li:nth-last-child(2),
  body.dhhd-desktop-menu-pro-active #header .nav.header-nav > li:nth-last-child(2){
    margin-right:0!important;
  }
}

/* Laptop nhỏ: contact gọn, search vẫn tách riêng */
@media(min-width:850px) and (max-width:1199px){
  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact{
    margin-right:6px!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.dhhd-dmp-contact > a{
    padding:0 11px!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search,
  body.dhhd-desktop-menu-pro-active #header li.search-item{
    flex-basis:38px!important;
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
  }

  body.dhhd-desktop-menu-pro-active #header li.header-search > a,
  body.dhhd-desktop-menu-pro-active #header li.search-item > a{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
  }
}
