/* DWG Smart Menu Pro - Flatsome desktop mega menu */
@media (min-width: 850px) {
  .dwg-smart-mega-menu { position: static !important; }
  .dwg-smart-mega-menu > .sub-menu {
    display: grid !important;
    grid-template-columns: repeat(var(--dwg-smp-columns, 5), minmax(0, 1fr));
    grid-auto-flow: row;
    gap: var(--dwg-smp-gap, 10px);
    width: min(var(--dwg-smp-width, 1200px), calc(100vw - 30px)) !important;
    max-width: calc(100vw - 30px) !important;
    box-sizing: border-box;
    padding: 22px 24px !important;
    background: var(--dwg-smp-bg, #666) !important;
    border: 0 !important;
    border-radius: var(--dwg-smp-radius, 5px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    z-index: 9999;
  }
  .dwg-smart-mega-menu > .sub-menu > li {
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }
  .dwg-smart-mega-menu > .sub-menu > li > a {
    display: block;
    padding: 5px 6px !important;
    color: var(--dwg-smp-color, #f5f5f5) !important;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    border: 0 !important;
    background: transparent !important;
    transition: opacity .18s ease, padding-left .18s ease;
  }
  .dwg-smart-mega-menu > .sub-menu > li > a:hover {
    color: var(--dwg-smp-color, #fff) !important;
    opacity: .78;
    padding-left: 10px !important;
  }
  .dwg-smart-mega-menu > .sub-menu > li.menu-item-has-children > a { font-weight: 700; }
  .dwg-smart-mega-menu > .sub-menu > li > .sub-menu {
    display: block;
    position: static;
    min-width: 0;
    padding: 0 0 0 8px;
    background: transparent;
    box-shadow: none;
  }
}

/* Mobile: retain a conventional nested dropdown instead of a cramped grid. */
@media (max-width: 849px) {
  .dwg-smart-mega-menu > .sub-menu {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    left: auto !important;
    padding: 8px 0 !important;
  }
}


/* DWG Smart Menu Pro 1.0.2: remove the Flatsome dropdown pointer.
   Flatsome can attach the pointer to the menu item, its anchor, or the dropdown UL. */
@media (min-width: 850px) {
  li.dwg-smart-mega-menu::before,
  li.dwg-smart-mega-menu::after,
  li.dwg-smart-mega-menu > a::before,
  li.dwg-smart-mega-menu > a::after,
  li.dwg-smart-mega-menu > .sub-menu::before,
  li.dwg-smart-mega-menu > .sub-menu::after,
  li.dwg-smart-mega-menu > .nav-dropdown::before,
  li.dwg-smart-mega-menu > .nav-dropdown::after,
  li.dwg-smart-mega-menu.nav-dropdown-has-arrow::before,
  li.dwg-smart-mega-menu.nav-dropdown-has-arrow::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}


/* DWG Smart Menu Pro 1.0.3: typography and parent/child spacing controls */
@media (min-width: 850px) {
  li.dwg-smart-mega-menu > a {
    font-size: var(--dwg-smp-parent-font-size, inherit) !important;
  }
  li.dwg-smart-mega-menu > .sub-menu {
    margin-top: var(--dwg-smp-parent-child-gap, 0px) !important;
    row-gap: var(--dwg-smp-child-item-gap, 8px) !important;
  }
  li.dwg-smart-mega-menu > .sub-menu > li > a {
    font-size: var(--dwg-smp-child-font-size, 14px) !important;
  }
}
