.primary-navigation{display:flex;gap:24px;align-items:center}
.primary-navigation .menu{list-style:none;margin:0;padding:0;display:flex;gap:24px}
.primary-navigation .menu>li{position:relative}
.primary-navigation .menu a.menu-link{display:inline-block;padding:12px 8px;text-decoration:none;color:inherit;background:transparent}
.primary-navigation .sub-menu a.menu-link:focus{background:transparent!important;color:var(--primary-color)}
.primary-navigation .menu>li.open>.sub-menu{opacity:1;transform:translateY(0);pointer-events:auto}
.primary-navigation .sub-menu{position:absolute;left:0;top:100%;min-width:240px;background:#fff;border:1px solid #eee;border-radius:4px;opacity:0;transform:translateY(8px);transition:opacity .15s ease,transform .15s ease;pointer-events:none;z-index:1000}
.primary-navigation .sub-menu .sub-menu{top:0;left:100%;min-width:220px;transform:translateX(8px);z-index:1001}
.primary-navigation .sub-menu.mega{width:1200px;max-width:92vw;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:24px;padding:16px}
.primary-navigation .sub-menu.mega>li.mega-section>a.section-title{display:block;font-weight:700;padding:6px 8px 10px}
.primary-navigation .sub-menu.mega>li.mega-section>ul.mega-links{list-style:none;margin:0;padding:0}
.primary-navigation .sub-menu.mega>li.mega-section>ul.mega-links li a.menu-link{display:block;padding:6px 8px}
/* Safety: if grandchildren keep default sub-menu class, treat as mega-links */
.primary-navigation .sub-menu.mega .sub-menu{list-style:none;margin:0;padding:0;display:block;position:static;opacity:1;transform:none;border:0}
.primary-navigation .sub-menu.mega .sub-menu li a.menu-link{display:block;padding:6px 8px}
.primary-navigation .sub-menu li{white-space:nowrap;width:100%;position:relative}
.primary-navigation .sub-menu a.menu-link{padding:10px 12px;display:block;width:100%}
/* Neutralize any theme-provided caret on anchors to avoid double arrows */
.primary-navigation .sub-menu a.menu-link:after{content:none!important}
/* Add spacing and arrow for items with children to avoid overlap */
.primary-navigation .sub-menu li.menu-item-has-children{padding-right:36px}
.primary-navigation .sub-menu li.menu-item-has-children:after{content:">";position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:16px;color:#9aa0a6}
.primary-navigation .sub-menu li.menu-item-has-children.open:after{color:var(--primary-color)}
/* Remove any default caret/down icons inside dropdown items */
.primary-navigation .sub-menu .submenu-toggle,
.primary-navigation .sub-menu .dropdown-toggle,
.primary-navigation .sub-menu .tm-submenu-icon,
.primary-navigation .sub-menu .menu-item-has-children> a.menu-link i,
.primary-navigation .sub-menu .menu-item-has-children> a.menu-link svg{display:none!important}
/* Nested submenus only open via .open class */
.primary-navigation .sub-menu li.open> .sub-menu{opacity:1;transform:translateX(0);pointer-events:auto}

/* COMPLETE OVERRIDE: Disable ALL parent theme hover behavior */
.primary-navigation ul li:hover .sub-menu,
.sticky-holder .primary-navigation ul li:hover .sub-menu,
.nav-menu li:hover .sub-menu,
.primary-navigation ul li.focus .sub-menu,
.sticky-holder .primary-navigation ul li.focus .sub-menu{
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
}

/* ONLY .open class shows menus */
.primary-navigation ul li.open .sub-menu,
.sticky-holder .primary-navigation ul li.open .sub-menu,
.nav-menu li.open .sub-menu{
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
@media (max-width: 1024px){
    .primary-navigation{display:block;width:100%;max-height:80vh;overflow:auto;-webkit-overflow-scrolling:touch;background:transparent;padding:0}
    .primary-navigation .menu{display:block;flex-direction:column;gap:0;width:100%}
    .primary-navigation .menu>li{display:block;width:100%;border-bottom:1px solid #eee}
    .primary-navigation .menu>li:last-child{border-bottom:0}
    .primary-navigation .menu a.menu-link{padding:14px 16px}
    .primary-navigation .sub-menu{position:static;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none;opacity:0;max-height:0;overflow:hidden;transform:none;pointer-events:none;transition:opacity .15s ease,max-height .2s ease;margin:0}
    .primary-navigation .sub-menu .sub-menu{left:auto}
    .primary-navigation li.open> .sub-menu{opacity:1;max-height:1000px;pointer-events:auto}
    /* Arrow indicator and spacing */
    .primary-navigation .menu>li>a.menu-link{display:flex;justify-content:space-between;align-items:center}
    .primary-navigation .menu>li>a.menu-link:after{content:'+';font-weight:700;font-size:18px;line-height:1;transform:rotate(0deg);transition:transform .2s ease;color:#9aa0a6}
    .primary-navigation .menu>li.open>a.menu-link:after{content:'–';transform:none;color:var(--primary-color)}
    .primary-navigation .sub-menu{padding-left:12px}
    /* Collapse mega layout to a simple list on mobile to avoid empty columns */
    .primary-navigation .sub-menu.mega{width:100%;max-width:none;display:block;gap:0;padding:0;background:transparent;box-shadow:none}
    .primary-navigation .sub-menu.mega>li.mega-section>a.section-title{padding:12px 16px;font-weight:700}
    .primary-navigation .sub-menu.mega>li.mega-section>ul.mega-links{padding:0 0 8px 0}
    .primary-navigation .sub-menu.mega>li.mega-section>ul.mega-links li a.menu-link{padding:10px 20px}
}

