/*#######################################################################
# MEGA-MENU.CSS
# ----------------------------------------------------------------------
# WEBASMEDIA | Andreas Schoene
# 
# KONFIGURATION
# --------------------------------------
# * Layout für WAM Mega-Menü (Desktop + Offcanvas)
# * Hover- und Layer-Effekte für Mega-Menü-Content
#
# AENDERUNGEN
# --------------------------------------
# * 25.02.2026 - letzte Optimierung
#
#######################################################################*/

/***********************************************************************
 ***  BASIS: MENU / LINKS / LAYOUT
 ***********************************************************************/

.wam-mega-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wam-mega-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wam-mega-menu a:hover {
  color: var(--e-global-color-primary, #212529);
}

.wam-mega-menu--open {
  display: block;
}

/* Layout: Horizontal */
.wam-mega-menu.layout-horizontal {
  display: flex;
  gap: 20px;
}

.wam-mega-menu.layout-horizontal li.si-menu-item {
  display: inline-block;
}

/* Layout: Vertikal */
.wam-mega-menu.layout-vertical li {
  display: block;
}

/* Offcanvas Wrapper Abstand */
.wam-offcanvas-inner {
  margin-top: 4rem;
}

/* Elementor ID – nur relevant, wenn dieses Element existiert */
.elementor-element-9c1993d {
  padding-left: 10px !important;
}


/***********************************************************************
 ***  DESKTOP: MEGA CONTENT (HOVER) + ANIMATIONEN
 ***********************************************************************/

@media (min-width: 1025px) {
  .mega-menu-wam-li {
    position: static !important;
  }
}

/* Base Mega Content (Hover-Varianten) */
.mega-menu-wam-li .wam-mega-menu-content {
  position: fixed;
  /* top: 80px; */
  left: 50%;
  width: 100vw;
  max-width: 100vw;

  background: #fff;
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 24px;

  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mega-menu-wam-li:hover > .wam-mega-menu-content,
.mega-menu-wam-li:focus-within > .wam-mega-menu-content {
  opacity: 1;
  pointer-events: auto;
}

/* Fade Up */
.mega-menu-wam-li.animation-fade-up .wam-mega-menu-content {
  transform: translateX(-50%) translateY(50px);
}

.mega-menu-wam-li.animation-fade-up:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-up:focus-within > .wam-mega-menu-content {
  transform: translateX(-50%) translateY(0);
}

/* Fade Down */
.mega-menu-wam-li.animation-fade-down .wam-mega-menu-content {
  transform: translateX(-50%) translateY(-50px);
}

.mega-menu-wam-li.animation-fade-down:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-down:focus-within > .wam-mega-menu-content {
  transform: translateX(-50%) translateY(0);
}

/* Slide In (Left) */
.mega-menu-wam-li.animation-slide-in .wam-mega-menu-content {
  left: 0;
  transform: translateX(-100%);
}

.mega-menu-wam-li.animation-slide-in:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-slide-in:focus-within > .wam-mega-menu-content {
  transform: translateX(0);
}

/* None */
.mega-menu-wam-li.animation-none .wam-mega-menu-content {
  transition: none;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-wam-li.animation-none:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-none:focus-within > .wam-mega-menu-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}


/***********************************************************************
 ***  MEGA CONTENT: ELEMENTOR-INHALTE
 ***********************************************************************/

.wam-mega-menu-content .elementor-container,
.wam-mega-menu-content .e-con {
  gap: 10px;
}

.wam-mega-menu-content h2.elementor-heading-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.wam-mega-menu-content .elementor-icon-list-items a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wam-mega-menu-content .elementor-icon-list-items a:hover {
  color: var(--e-global-color-primary, #212529);
}

/***********************************************************************
 ***  CLICK-ANIMATIONEN (HOVER DEAKTIVIERT)
 ***********************************************************************/

/* Base Mega Content (Click-Varianten) */
.mega-menu-wam-li.animation-fade-up-click .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-down-click .wam-mega-menu-content {
  position: fixed;
  /* top: 80px; */
  left: 50%;
  width: 100vw;
  max-width: 100vw;

  background: #fff;
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  padding: 0;

  z-index: 999;
  opacity: 0;
  pointer-events: none;

  transition: none !important;
}

/* Hover/Focus neutralisieren */
.mega-menu-wam-li.animation-fade-up-click:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-up-click:focus-within > .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-down-click:hover > .wam-mega-menu-content,
.mega-menu-wam-li.animation-fade-down-click:focus-within > .wam-mega-menu-content {
  opacity: 0;
  pointer-events: none;
}

/* Fade Up (Click) */
.mega-menu-wam-li.animation-fade-up-click .wam-mega-menu-content {
  transform: translateX(-50%) translateY(50px);
}

.mega-menu-wam-li.animation-fade-up-click.mega-menu-active > .wam-mega-menu-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Fade Down (Click) */
.mega-menu-wam-li.animation-fade-down-click .wam-mega-menu-content {
  transform: translateX(-50%);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.mega-menu-wam-li.animation-fade-down-click.mega-menu-active > .wam-mega-menu-content {
  max-height: 4000px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}

.mega-menu-wam-li.animation-fade-up-click > .wam-menu-item-link,
.mega-menu-wam-li.animation-fade-down-click > .wam-menu-item-link {
  cursor: pointer;
}

.mega-menu-wam-li.animation-fade-up-click.mega-menu-active > .wam-menu-item-link,
.mega-menu-wam-li.animation-fade-down-click.mega-menu-active > .wam-menu-item-link {
  color: var(--e-global-color-primary, #212529);
}


/***********************************************************************
 ***  ICON / ARROW LOGIK
 ***********************************************************************/

.wam-menu-item-link.icon svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.mega-menu-wam-li:not(.has-mega) .wam-menu-item-link:hover svg,
.animation-fade-down .wam-menu-item-link:hover svg,
.animation-fade-up .wam-menu-item-link:hover svg {
  transform: rotate(180deg);
}

/***********************************************************************
 ***  CART / BADGE
 ***********************************************************************/

.hc-item.cart {
  cursor: pointer;
  position: relative;
}

.hc-item.cart span {
  border-radius: 100%;
  display: block;
  font-size: 10px;
  height: 1.6em;
  inset-inline-end: -0.7em;
  line-height: 1.5em;
  min-width: 1.6em;
  position: absolute;
  text-align: center;
  top: -0.7em;
  right: -1.5em;
}

/***********************************************************************
 ***  ACCOUNT DROPDOWN
 ***********************************************************************/

.account-dropdown {
  position: relative;
  cursor: pointer;
}

.account-dropdown .account-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;

  background: #fff;
  min-width: 220px;
  display: none;
  z-index: 999;

  border: 1px solid #eee;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.account-dropdown:hover .account-menu {
  display: block;
}

.account-dropdown .account-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.account-dropdown .account-menu li {
  border-bottom: 1px solid #f1f1f1;
}

.account-dropdown .account-menu li:last-child {
  border-bottom: none;
}

.account-dropdown .account-menu a,
.account-dropdown .account-menu li {
  display: block;
  padding: 8px 12px;
  font-size: 16px;
  color: #333;
  text-decoration: none;
}

.account-dropdown .account-menu a:hover {
  background: #f7f7f7;
}

.account-dropdown .account-menu::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
}

/***********************************************************************
 ***  OFFCANVAS PANEL (GLOBAL)
 ***********************************************************************/

.wam-offcanvas-panel {
  position: fixed;
  top: 0;
  left: 0;

  width: 80%;
  height: 100%;
  padding: 20px 0;

  background: #fff;
  z-index: 9999;

  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.wam-offcanvas-panel.open {
  transform: translateX(0);
  box-shadow: rgba(17, 17, 26, 0.1) 0 0 16px;
}

.wam-offcanvas-close {
  position: absolute;
  top: 0;
  right: 0;

  border: none;
  padding: 10px;

  font-size: 25px;
  font-weight: 400;
  cursor: pointer;

  z-index: 999999999;
  color: #666;

  transition: transform 0.3s;
  display: inline-block;
}

.wam-offcanvas-close:hover {
  transform: rotate(90deg);
}

.wam-offcanvas-toggle {
  display: none;
}

.wam-offcanvas-toggle i {
  cursor: pointer;
}

/***********************************************************************
 ***  FIXES / LISTEN
 ***********************************************************************/

ul.mega-menu-wam-ul li {
  list-style: none;
}

.wam-mega-menu .mega-menu-wam-li:not(.has-mega) {
  position: relative !important;
}

/***********************************************************************
 ***  DESKTOP: SUBMENÜS (>= 1025px)
 ***********************************************************************/

@media (min-width: 1025px) {
  .wam-mega-menu .submenu-level {
    position: absolute;
    top: calc(100% + 40px);
    left: 0;

    background: #fff;
    min-width: 210px;
    width: max-content;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border-radius: 1px;

    padding: 15px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: transform 0.3s, opacity 0.3s;

    z-index: 9999;
    margin-left: 0;
  }

  .wam-mega-menu .mega-menu-wam-li:hover > .submenu-level,
  .wam-mega-menu .submenu-level li:hover > .submenu-level {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: calc(100% - 8px);
  }

  .wam-mega-menu .submenu-level .submenu-level {
    top: 0;
    left: 100%;
    margin-left: 1px;
    border-radius: 1px;
  }

  .wam-mega-menu li a i.wam-nav-arrow {
    font-size: 11px;
    color: #181818;
    margin-left: 6px;
  }

  .wam-mega-menu .submenu-level li a {
    padding: 8px 16px;
    color: #212529;
    text-decoration: none;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .submenu-level li {
    padding: 6px 24px;
  }

  .submenu-level li a {
    padding: 0.3125rem 0 !important;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .wam-mega-menu .submenu-level li a:hover {
    color: var(--e-global-color-primary, #212529);
  }

  .mega-menu-wam-ul li.trigger-hover a.wam-menu-item-link:first-child {
    height: 100px;
    display: flex;
    align-items: center;
  }

  .mega-menu-wam-ul li.trigger-hover ul.submenu-level li.trigger-hover a {
    height: auto;
  }
}

/***********************************************************************
 ***  OFFCANVAS UI-DETAILS (GLOBAL)
 ***********************************************************************/

.wam-offcanvas-panel .submenu-back {
  background: transparent;
  border: none;
  font-size: 13px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0;
  width: 100%;
  text-transform: uppercase;
}

.wam-offcanvas-panel .submenu-back:hover {
  color: #FFA832 !important;
}

.wam-offcanvas-panel .mega-menu-wam-li > a i.wam-nav-arrow {
  transition: transform 0.25s ease;
}

.wam-offcanvas-panel .mega-menu-wam-li.open > a i.wam-nav-arrow,
.wam-offcanvas-panel .mega-menu-wam-li > .submenu-level.layer-open ~ a i.wam-nav-arrow {
  transform: rotate(180deg);
}

.wam-offcanvas-panel.layer-has-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.03);
  pointer-events: none;
  z-index: 15;
}

/***********************************************************************
 ***  MOBILE / TABLET (<= 1024px)
 ***********************************************************************/

@media (max-width: 1024px) {
  .elementor-element-9c1993d {
    padding-left: 0 !important;
  }

  .wam-offcanvas-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 10000;
  }

  /* Variante A: Fullscreen Menü (über .wam-mega-menu.active) */
  .wam-mega-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100% !important;
    height: 100vh;

    background: #fff;
    transition: left 0.3s ease;
    z-index: 99999;

    flex-direction: column;
    padding: 20px;
  }

  .wam-mega-menu.active {
    left: 0;
    display: block;
  }

  .wam-mega-menu.active .mega-menu-wam-li .wam-mega-menu-content {
    position: static;
    transform: none;
    max-width: none;
    width: 100%;

    box-shadow: none;
    border: 0;

    opacity: 1;
    pointer-events: auto;

    padding: 16px;
    margin-top: 40px;
  }

  /* Variante B: Offcanvas Panel + Layer (über .wam-offcanvas-panel) */
  .wam-offcanvas-panel {
    width: 100%;
    max-width: 300px;

    max-height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto;
  }

  .wam-offcanvas-panel .wam-mega-menu {
    position: relative !important;
    display: block !important;

    width: 100% !important;
    height: calc(100vh - 9rem) !important;

    overflow: hidden;
    padding: 0;

    left: auto;
    top: auto;
    z-index: auto;
  }

  .wam-offcanvas-panel.open .wam-mega-menu .mega-menu-wam-li::before,
  .submenu-back-wrap::before {
    content: "";
    border-bottom: 1px solid rgba(102, 102, 102, 0.15);
    display: block;
    margin: 0 1.25rem;
  }

  .wam-offcanvas-panel .wam-mega-menu .mega-menu-wam-li a {
    padding: 0 22px !important;
    font-size: 13px !important;
    line-height: 1.4em;
    min-height: 3.5em;
    font-weight: 500;
    color: #000;
    font-family: var(--site-main-font) !important;
    font-weight: var(--site-font-weight);
  }

  .wam-offcanvas-panel .submenu-back {
    font-size: 14px;
    line-height: 1.4em;
    min-height: 3.1em;
    font-weight: 500;
    font-family: var(--site-main-font) !important;
    font-weight: var(--site-font-weight);
  }

  .wam-offcanvas-panel .submenu-level,
  .wam-offcanvas-panel .wam-mega-menu-content {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    min-height: 100%;
    margin: 0;

    background: #fff !important;
    display: block;

    transform: translateX(100%);
    opacity: 1;
    visibility: hidden;

    transition: transform 0.35s cubic-bezier(0.25, 0.9, 0.25, 1);
    will-change: transform;

    z-index: 100002;
    overflow: visible;
  }

  .wam-offcanvas-panel .layer-open {
    transform: translateX(0);
    visibility: visible;
  }

  .wam-offcanvas-panel.has-layer-open .wam-mega-menu {
    opacity: 0.8;
  }

  .wam-offcanvas-panel .submenu-level.active {
    display: block;
    left: 0;
    background: #fff !important;
    z-index: 100002;
  }

  .wam-offcanvas-panel .submenu-level.layer-open,
  .wam-offcanvas-panel .wam-mega-menu-content.layer-open {
    pointer-events: auto;
    opacity: 1;
    padding: 0 22px;
    transform: translateX(0);
    visibility: visible;
    background: #fff !important;
  }

  .wam-offcanvas-panel .submenu-level.layer-open a,
  .wam-offcanvas-panel .wam-mega-menu-content.layer-open a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .wam-offcanvas-panel .submenu-level.layer-open .mega-menu-wam-li::before,
  .wam-offcanvas-panel .wam-mega-menu-content.layer-open .elementor-icon-list-item::before,
  .submenu-back-wrap::before {
    content: "";
    border-bottom: 1px solid rgba(102, 102, 102, 0.15);
    display: block;
    margin: 0;
  }

  .wam-offcanvas-panel .novaicon-down-arrow::before {
    content: "\ea12";
  }

  .wam-offcanvas-panel .layer-open {
    z-index: 100002 !important;
  }
}