/* Elementor patches */
.sub-menu.gssmg-submenu.gssmg-has-mega .gssmg-pane__col {
    position: relative;
    width: auto !important;
    display: block !important;
    top: unset !important;
}
.sub-menu.gssmg-submenu.gssmg-has-mega .gssmg-mega-panel {
    position: absolute;
    top: 0;
    left: 100%;
    height: 100%;
}
.sub-menu.gssmg-submenu.gssmg-has-mega ul.gssmg-pane__col {
    position: relative !important;
    transform: none !important;
    top: unset !important;
}

/* Mega layout only on desktop; mobile/tablet keeps Elementor behavior */
@media (min-width: 1200.5px) {

  /* Root dropdown becomes 2 columns: left list + right panel */
  .gssmg-submenu.gssmg-has-mega {
    display: grid;
    grid-template-columns: 360px minmax(640px, 1fr);
    column-gap: 0;
    row-gap: 0;
    align-items: start;
  }

  /* Header row spans both columns */
  .gssmg-submenu.gssmg-has-mega > li.gssmg-submenu-header {
    grid-column: 1 / -1;
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  /* Default placement for all regular left items */
  .gssmg-submenu.gssmg-has-mega > li {
    grid-column: 1;
  }

  /* Right column: our panel placeholder */
  .gssmg-submenu.gssmg-has-mega > li.gssmg-mega-panel {
    grid-column: 2;
    grid-row: 2 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-left: 1px solid rgba(0,0,0,.08);
  }

  /* Panel container */
  .gssmg-mega__panel {
    height: 100%;
  }

  /* The set of panes we toggle between */
  .gssmg-mega__panes {
    position: relative;
    min-height: 120px; /* avoid jump when switching panes */
    height: 100%;
  }

  /* Each pane becomes a 2–3 column list grid */
  .gssmg-pane {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
  }

  /* When JS decides there are 3 columns it simply appends a 3rd .gssmg-pane__col */
  .gssmg-pane__col {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .gssmg-pane__col li {
    margin: 0;
    padding: 6px 0;
    line-height: 1.4;
  }

  .gssmg-pane__col a {
    display: inline-block;
    text-decoration: none;
  }

  /* Hide arrows and any native nested ULs under left items — we replace flyouts */
  .gssmg-submenu.gssmg-has-mega > li > a .sub-arrow { display: none !important; }
  .gssmg-submenu.gssmg-has-mega > li > ul.sub-menu { display: none !important; }

  /* Visual cue for the active left item */
  .gssmg-left-active > a,
  .gssmg-submenu.gssmg-has-mega > li:hover > a {
    background: rgba(0,0,0,.04);
  }
}
