/* Original menu slots stay in the DOM with their animation hooks. Webflow may
   change tabindex during initialization; display:none keeps unused slots out
   of the visual layout, accessibility tree and keyboard order regardless. */
.navbar-main [data-sansong-nav-unused][hidden] {
  display: none !important;
}

/* Retain the template capsule and dropdown animation while giving the three
   equipment groups equal columns, aligned labels and comfortable hit areas. */
.navbar-main [data-sansong-product-menu] .megamenu-dropdown-wrap {
  min-width: 0;
}

.navbar-main [data-sansong-nav-heading] {
  margin: 0 0 8px;
  padding: 0;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}

.navbar-main [data-sansong-product-menu] .nav-dropdown-link-wrapper {
  gap: 0;
}

.navbar-main [data-sansong-product-menu] .nav-link-item:not([hidden]) {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  white-space: nowrap;
}

.navbar-main [data-sansong-product-menu] .button-text-pre,
.navbar-main [data-sansong-product-menu] .button-text-post {
  line-height: 24px;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .navbar-main [data-sansong-product-menu] > .nav-dropdown-list-item.megamenu {
    width: 700px;
    left: 0;
    right: auto;
  }

  .navbar-main [data-sansong-product-menu] .megamenu-dropdown-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 24px;
  }

  .navbar-main .nav-menu-links-wrap > a,
  .navbar-main .dropdown-nav-item {
    white-space: nowrap;
  }
}

/* Fill the desktop space already reserved between the brand and contact
   controls, so the six primary destinations share one generous capsule. */
@media (min-width: 992px) {
  .navbar-main .right-nav-wrap {
    gap: 24px;
  }

  .navbar-main .mobile-menu-wrapper,
  .navbar-main .nav-menu-desktop-wrapper {
    min-width: 0;
    flex: 1;
  }

  .navbar-main .nav-desktop-menu {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .navbar-main .nav-menu-links-wrap {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }

  .navbar-main .nav-menu-links-wrap > .hero-nav-dropdown {
    margin-left: 0;
    margin-right: 0;
  }
}

/* At small desktop widths the extra Home link shares the original capsule,
   while the separate language/contact controls keep their existing space. */
@media (min-width: 992px) and (max-width: 1199px) {
  .navbar-main .nav-menu-links-wrap {
    gap: 4px;
  }

  .navbar-main .nav-desktop-menu {
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar-main .nav-menu-links-wrap > a,
  .navbar-main .dropdown-nav-item {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 991px) {
  .navbar-main .nav-desktop-menu {
    max-height: calc(100vh - 110px);
    max-height: calc(100svh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .navbar-main [data-sansong-product-menu] > .nav-dropdown-list-item.megamenu.w--open {
    height: auto;
    max-height: none;
    padding-right: 0;
    overflow: visible;
  }

  .navbar-main [data-sansong-product-menu] .megamenu-dropdown-wrapper {
    gap: 20px;
    padding: 12px 10px 16px;
  }

  .navbar-main [data-sansong-product-menu] .nav-link-item:not([hidden]) {
    padding-left: 0;
    padding-right: 0;
  }
}
