/* =================================================================
   BC MEGA MENU – VOLLSTÄNDIGES CSS (Smart Layout)
   ================================================================= */

/* --- BASIS & TYPOGRAFIE --- */
.bc-mega-menu { width: 100%; display: block !important; box-sizing: border-box; }
.bc-mega-column { text-align: left; font-size: 14px; }
.bc-mega-thumb { display: block; overflow: hidden; border-radius: 12px; }
.bc-mega-thumb img { width: 100%; height: auto; display: block; transition: transform 0.25s ease; border-radius: 12px; }
.bc-mega-thumb:hover img { transform: scale(1.03); }

.bc-mega-title { font-size: 15px; margin: 0 0 6px; font-weight: 700 !important; }
.bc-mega-title a { text-decoration: none; color: inherit; display: block; }

.bc-mega-links { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bc-mega-links li { margin-bottom: 3px; position: relative !important; list-style: none !important; }
.bc-mega-links li > a { text-decoration: none; font-size: 13px; display: block; }

.bc-mega-menu a.lv1 { font-weight: 700 !important; }
.bc-mega-menu a.lv2 { font-weight: 600 !important; }
.bc-mega-menu a.lv3 { font-weight: 200 !important; margin-left: 0.3em !important; }
.bc-mega-menu a.lv4 { font-weight: 100 !important; margin-left: 0.32em !important; }

/* --- MEHR / WENIGER LOGIK --- */
ul.bc-mega-links > li.bc-extra-subcat { display: none !important; }
ul.bc-mega-links.bc-open > li.bc-extra-subcat { display: block !important; }
.bc-more-toggle-wrap { margin-top: 4px; padding-bottom: 10px; }
.bc-more-toggle { border: none; background: none; padding: 0; font-size: 13px; cursor: pointer; text-decoration: underline; color: inherit; }

/* --- ACCORDION PFEILE (Universal) --- */
.bc-mega-nested-links { display: none !important; list-style: none !important; margin: 5px 0 10px 15px !important; padding: 0 !important; }
li.bc-nested-open > .bc-mega-nested-links { display: block !important; }
.bc-mega-nested-links li > a { font-size: 13px; padding: 5px 0; display: inline-block; }

li.has-nested-toggle > a { padding-right: 44px !important; box-sizing: border-box !important; }
.bc-nested-toggle {
  position: absolute !important; right: 0 !important; top: 0 !important;
  width: 44px !important; height: 100% !important; min-height: 40px !important;
  border: none !important; background: transparent !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important; z-index: 2;
}
.bc-nested-toggle::before { content: "▸"; font-size: 16px; }
li.bc-nested-open > .bc-nested-toggle::before { content: "▾"; }


/* =================================================================
   LAYOUT 1: DESKTOP GRID (Nur wenn viel Platz ist!)
   ================================================================= */
.bc-mega-menu.bc-is-desktop-view.bc-mega-tiles {
  display: grid !important; 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; 
  gap: 26px !important; 
  padding: 20px !important; 
  background: #fff !important; 
  box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important; 
  border-radius: 10px !important; 
}
.bc-mega-menu.bc-is-desktop-view .bc-mega-row { 
  display: flex !important; 
  flex-direction: row !important; /* BILD LINKS, TEXT RECHTS */
  align-items: flex-start !important; 
  gap: 15px !important; 
}
.bc-mega-menu.bc-is-desktop-view .bc-mega-thumb { 
  flex: 0 0 110px !important; 
  width: 110px !important; 
  margin: 0 !important; 
}


/* =================================================================
   LAYOUT 2: SIDEBAR & MOBILE STACK (Wenn der Platz < 600px ist)
   ================================================================= */
.bc-mega-menu.bc-is-mobile-view.bc-mega-tiles {
  display: block !important;
  padding: 10px 5px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.bc-mega-menu.bc-is-mobile-view .bc-mega-row {
  display: flex !important;
  flex-direction: column !important; /* BILD OBEN, TEXT UNTEN */
  gap: 15px !important;
  margin-bottom: 25px !important;
}
.bc-mega-menu.bc-is-mobile-view .bc-mega-thumb {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}
.bc-mega-menu.bc-is-mobile-view .bc-mega-links > li {
  border-bottom: 1px solid #f0f0f0 !important;
}
.bc-mega-menu.bc-is-mobile-view .bc-mega-links > li > a {
  padding: 15px 0 !important;
  font-size: 15px !important;
}
.bc-mega-menu.bc-is-mobile-view .bc-nested-toggle {
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 50px !important;
}

/* Auf Mobile alle Items anzeigen, "Mehr" verstecken */
.bc-mega-menu.bc-is-mobile-view ul.bc-mega-links > li.bc-extra-subcat { display: list-item !important; }
.bc-mega-menu.bc-is-mobile-view .bc-more-toggle-wrap { display: none !important; }