/* A single, calm navigation row across the storefront. */
.fp-refreshed #jws_header .top-bar { display: none; }
.fp-refreshed #jws_header.zadora-header-v2 { border-bottom: 1px solid #dde0e9 !important; box-shadow: 0 4px 24px #1b2a6b08; }
.fp-refreshed #jws_header.zadora-header-v2 .mainmenu-area { border: 0; }
.fp-refreshed #jws_header.zadora-header-v2 .menu_nav #nav > li:not(.trp-language-switcher-container) > a { font-size: 14px; font-weight: 600; }

/* The full desktop navigation already provides the menu links. */
@media (min-width: 992px) {
  .fp-refreshed #jws_header.zadora-header-v2 .right-header .menu-sidebar { display: none !important; }
}

@media (min-width: 1200px) {
  .fp-refreshed #jws_header.zadora-header-v2 .menu_nav #nav > li.trp-language-switcher-container {
    right: calc(clamp(24px, 3vw, 60px) + 152px);
  }
}

/* "สั่งสินค้า" dropdown (inc/fixes-header.php): category rows with icon and starting price. */
.fp26h-shop .sub-menu-dropdown { min-width: 0 !important; padding: 0 !important; }
.fp26h-shop .sub-menu { margin: 0 !important; padding: 0 !important; list-style: none; }
.fp26h-shop .sub-menu > li { width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.fp26h-shop .sub-menu > li > a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 10px;
  color: #1b2a6b !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease;
}
.fp26h-shop .sub-menu > li > a::before, .fp26h-shop .sub-menu > li > a::after { display: none !important; }
.fp26h-shop .sub-menu > li > a { border: 0 !important; box-shadow: none !important; }
@media (max-width: 991px) {
  .fp26h-shop .sub-menu-dropdown { padding: 6px !important; }
  .fp26h-shop .sub-menu > li > a, .fp26h-item__name, .fp26h-item__desc { white-space: normal !important; }
  .fp26h-shop .sub-menu > li > a { gap: 10px; padding: 9px 10px !important; }
  .fp26h-item__text { flex: 1; }
}
.fp26h-shop .sub-menu > li > a:hover,
.fp26h-shop .sub-menu > li > a:focus-visible,
.fp26h-shop .sub-menu > li.current-menu-item > a { background: #f3f4f8; }
.fp26h-shop .sub-menu > li > a:focus-visible { outline: 2px solid #2148b0; outline-offset: -2px; }
.fp26h-icon { flex: none; width: 20px; height: 20px; }
.fp26h-item__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #2148b0;
  background: #e8ebf6;
  transition: background-color .15s ease, color .15s ease;
}
.fp26h-shop .sub-menu > li > a:hover .fp26h-item__icon,
.fp26h-shop .sub-menu > li.current-menu-item > a .fp26h-item__icon { color: #fff; background: #2148b0; }
.fp26h-item__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fp26h-item__name { color: #1b2a6b; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.fp26h-item__desc { color: #6b7280; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.fp26h-shop .sub-menu > li > a:hover .fp26h-item__name { color: #2148b0; }

/* Last row: "ดูสินค้าทั้งหมด" as a quiet link under a divider */
.fp26h-shop .sub-menu > li.fp26h-all { margin-top: 6px !important; padding-top: 6px !important; border-top: 1px solid #e3e6ee !important; }
.fp26h-shop .sub-menu > li.fp26h-all > a { justify-content: space-between; }
.fp26h-shop .sub-menu > li.fp26h-all .fp26h-item__name { color: #2148b0; font-size: 14px; }
.fp26h-shop .sub-menu > li.fp26h-all .fp26h-icon { width: 18px; height: 18px; color: #2148b0; transition: transform .15s ease; }
.fp26h-shop .sub-menu > li.fp26h-all > a:hover .fp26h-icon { transform: translateX(3px); }

@media (min-width: 992px) {
  .fp-refreshed #jws_header .fp26h-shop > .sub-menu-dropdown {
    width: 330px !important;
    margin-top: 0 !important;
    padding: 8px !important;
    border: 1px solid #dfe2ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 44px -12px rgba(27, 42, 107, .22);
  }
}
@media (min-width: 992px) {
  /* Invisible bridge over any gap between the menu link and the dropdown,
     so moving the mouse down keeps the menu open. */
  .fp-refreshed #jws_header .fp26h-shop > .sub-menu-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fp26h-shop .sub-menu a, .fp26h-item__icon, .fp26h-all .fp26h-icon { transition: none !important; }
}

/* Mobile navigation drawer: replace the narrow legacy list with the same
   hierarchy, wording and visual language as the desktop header. */
@media (max-width: 991px) {
  body.open-mobile-menu { overflow: hidden; }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu {
    width: min(88vw, 360px);
    padding: 0;
    justify-content: flex-start;
    overflow-x: hidden;
    color: #1b2a6b;
    background: #f7f8fc;
    box-shadow: none;
    /* The theme hides a 260px drawer with translateX(-300px); this one is wider. */
    transform: translateX(-100%);
    visibility: hidden;
  }
  .fp-refreshed.open-mobile-menu .mobile_menu.fp26h-mobile-menu,
  .open-mobile-menu .fp-refreshed .mobile_menu.fp26h-mobile-menu {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 18px 0 52px rgba(15, 39, 94, .22);
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .mobile_inner {
    width: 100%;
    padding: 0 18px 20px;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .logo-center {
    position: relative;
    display: flex;
    min-height: 92px;
    padding: 16px 50px 16px 4px;
    align-items: center;
    border-bottom: 1px solid #e0e5ef;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .logo-center .zadora-branding {
    width: auto;
    margin: 0 !important;
    padding: 0;
    text-align: left;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .logo-center img {
    display: block;
    width: auto;
    max-width: 142px;
    max-height: 54px;
  }

  .fp26h-mobile-close {
    position: absolute;
    top: 50%;
    right: 0;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid #dbe1ee;
    border-radius: 12px;
    color: #1b2a6b;
    background: #fff;
    transform: translateY(-50%);
    box-shadow: 0 5px 14px rgba(15, 39, 94, .08);
  }

  .fp26h-mobile-close > span,
  .fp26h-mobile-close > span::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
  }

  .fp26h-mobile-close > span::after {
    content: "";
    transform: rotate(90deg);
  }

  .fp26h-mobile-close:hover,
  .fp26h-mobile-close:focus-visible {
    border-color: #2148b0;
    color: #fff;
    background: #2148b0;
    outline: 0;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav {
    display: flex;
    float: none;
    width: 100%;
    margin: 16px 0 0;
    flex-direction: column;
    gap: 7px;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav > li {
    overflow: hidden;
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    background: #fff;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav > li > a {
    display: flex;
    min-height: 52px;
    padding: 12px 16px !important;
    align-items: center;
    border: 0 !important;
    color: #1b2a6b;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav > li.menu-item-has-children > a {
    padding-right: 54px !important;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav > li:is(.current-menu-item, .current_page_item, .current-menu-ancestor) {
    border-color: #b9c8ec;
    background: #f3f6ff;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .navbar-nav > li:is(.current-menu-item, .current_page_item, .current-menu-ancestor) > a {
    color: #2148b0;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .icon-sub-menu {
    top: 5px;
    right: 5px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef2fb;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .icon-sub-menu::before,
  .fp-refreshed .mobile_menu.fp26h-mobile-menu .icon-sub-menu::after {
    width: 12px;
    height: 2px;
    margin-right: -6px;
    background: #2148b0;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .sub-menu-dropdown {
    position: static !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .sub-menu-dropdown > .sub-menu {
    margin: 0 !important;
    padding: 7px !important;
    border-top: 1px solid #e1e5ee;
    background: #f8f9fc !important;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .sub-menu-dropdown > .sub-menu > li > a {
    min-height: 44px;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 9px;
    color: #1b2a6b;
    font-family: inherit;
    line-height: 1.35;
    text-transform: none;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .trp-language-switcher-container > a {
    gap: 9px;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .trp-language-switcher-container img {
    width: 22px;
    height: auto;
    border-radius: 2px;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .list-sidebar {
    display: grid;
    width: calc(100% - 36px);
    margin: auto 18px 18px;
    padding: 14px 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-top: 1px solid #e0e5ef;
    list-style: none;
    text-transform: none;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .list-sidebar li {
    border: 0;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .list-sidebar a {
    display: flex;
    min-height: 44px;
    padding: 8px 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe4ee;
    border-radius: 10px;
    color: #1b2a6b;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
  }

  .fp-refreshed .mobile_menu.fp26h-mobile-menu .list-sidebar i {
    padding-right: 6px;
    color: #2148b0;
    font-size: 16px;
  }

  .fp-refreshed .mobile-overplay {
    z-index: 999998;
    background: #071531;
  }
}
