/* EP Mega Menu — Hero | Linkgruppen | Bestseller-Karte (ab 1500 px)
   Theme-Resistance-Regeln aus dem Bohnen-Menü: <img> statt background-image, doppelte
   Klassen-Spezifität gegen Uncode-Hover, pointer-events:none auf Overlays, keine
   transform/min-height auf Layout-Containern (Uncode misst die Menühöhe selbst). */

/* Uncode-Wrapper um den Block ohne Abstände */
li.megamenu-block-wrapper:has(.epmm-root),
li.megamenu-block-wrapper:has(.epmm-root) > .vc_row,
li.megamenu-block-wrapper:has(.epmm-root) .row,
li.megamenu-block-wrapper:has(.epmm-root) .row-parent,
li.megamenu-block-wrapper:has(.epmm-root) .row-inner,
li.megamenu-block-wrapper:has(.epmm-root) .wpb_column,
li.megamenu-block-wrapper:has(.epmm-root) .uncol,
li.megamenu-block-wrapper:has(.epmm-root) .uncoltable,
li.megamenu-block-wrapper:has(.epmm-root) .uncell,
li.megamenu-block-wrapper:has(.epmm-root) .uncont,
li.megamenu-block-wrapper:has(.epmm-root) .wpb_raw_code,
li.megamenu-block-wrapper:has(.epmm-root) .wpb_text_column,
li.megamenu-block-wrapper:has(.epmm-root) .wpb_wrapper,
.epmm-shell > .vc_row,
.epmm-shell .row,
.epmm-shell .row-parent,
.epmm-shell .row-inner,
.epmm-shell .wpb_column,
.epmm-shell .uncol,
.epmm-shell .uncoltable,
.epmm-shell .uncell,
.epmm-shell .uncont,
.epmm-shell .wpb_raw_code,
.epmm-shell .wpb_text_column,
.epmm-shell .wpb_wrapper {
  margin: 0 !important;
  padding: 0 !important;
}
.epmm-shell {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.epmm-root {
  --acc: #c3580c;
  --acc-h: #e06a10;
  --bg: #141618;
  --bd: rgba(255,255,255,0.12);
  --bd-strong: rgba(255,255,255,0.35);
  background: var(--bg);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  display: block;
  width: 100%;
  margin: 0 auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  text-align: left;
}
.epmm-root *, .epmm-root *::before, .epmm-root *::after {
  box-sizing: border-box;
  font-family: inherit;
}
.epmm-root a, .epmm-root a:link, .epmm-root a:visited {
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: none !important;
}

.epmm-grid {
  display: grid;
  grid-template-columns: 1fr;
  height: auto !important;
  max-height: none !important;
}
@media (min-width: 700px) {
  .epmm-grid { grid-template-columns: 1fr 2fr; }
}
@media (min-width: 1500px) {
  .epmm-grid { grid-template-columns: 1fr 2.2fr 0.8fr; }
}

/* HERO: klickbares Bild, wechselt beim Hover über die Links */
.epmm-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 340px;
  display: block;
  background-color: #1f1410;
}
.epmm-hero-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  pointer-events: none !important;
  z-index: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  max-width: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 220ms ease;
}
.epmm-hero-img.epmm-hero-img--contain {
  object-fit: contain !important;
  padding: 36px !important;
  box-sizing: border-box !important;
  background: #141618;
}
.epmm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,22,24,0.15) 0%, rgba(20,22,24,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

/* LINKGRUPPEN */
.epmm-lists {
  padding: clamp(28px, 3vw, 48px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px 32px;
  align-content: start;
  position: relative;
  z-index: 3;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
}
.epmm-group, .epmm-list, .epmm-item {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  display: block !important;
  height: auto !important;
  max-height: none !important;
}
.epmm-heading {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1;
}
.epmm-list {
  border-top: 1px solid var(--bd);
  margin: 0 !important;
  padding: 0 !important;
}
.epmm-item {
  border-bottom: 1px solid var(--bd);
  margin: 0 !important;
  padding: 0 !important;
}
.epmm-root .epmm-link.epmm-link {
  display: block !important;
  padding: 9px 0 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 2 !important;
  transform: none !important;
  pointer-events: auto !important;
  white-space: nowrap;
  transition: color 180ms ease !important;
}
.epmm-root .epmm-link.epmm-link::before {
  content: "→ ";
  color: var(--bd-strong);
  font-weight: 700;
  margin-right: 10px;
  display: inline-block;
  transition: color 180ms ease, transform 220ms ease;
}
.epmm-root .epmm-link.epmm-link:hover,
.epmm-root .epmm-link.epmm-link:focus,
.epmm-root .epmm-link.epmm-link:active {
  color: var(--acc-h) !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
}
.epmm-root .epmm-link.epmm-link:hover::before,
.epmm-root .epmm-link.epmm-link:focus::before {
  color: var(--acc-h);
  transform: translateX(3px);
}
.epmm-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px 1px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
  background: var(--acc);
  border-radius: 2px;
  vertical-align: 2px;
}

/* Zweispaltige Liste (Marken): spaltenweise befüllt, --epmm-rows aus dem Template */
.epmm-list--cols2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--epmm-rows, 7), auto);
  column-gap: 28px;
}

/* Button „Alle …“ */
.epmm-all {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  justify-self: start;
  align-self: end;
  margin-top: 6px;
  padding: 14px 20px !important;
  background: var(--acc) !important;
  border: 1px solid var(--acc) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  line-height: 1;
  text-decoration: none !important;
  transition: background 220ms ease, border-color 220ms ease;
}
.epmm-all:hover, .epmm-all:focus {
  background: var(--acc-h) !important;
  border-color: var(--acc-h) !important;
  color: #fff !important;
}

/* Layout mit Rollen: [col1a über col1b] [wide (2-spaltige Liste)] [col3] – gilt für alle Menüs mit vier Gruppen */
@media (min-width: 700px) {
  .epmm-lists { grid-template-columns: 1fr 1.7fr; }
  .epmm-role--col1a { grid-column: 1; grid-row: 1; }
  .epmm-role--col1b { grid-column: 1; grid-row: 2; }
  .epmm-role--col3  { grid-column: 1; grid-row: 3; }
  .epmm-role--wide  { grid-column: 2; grid-row: 1 / span 3; }
  .epmm-all         { grid-column: 1 / -1; grid-row: 4; }
}
@media (min-width: 1100px) {
  .epmm-lists { grid-template-columns: 1fr 1.05fr 1.05fr 1fr; }
  .epmm-role--col1a { grid-column: 1; grid-row: 1; }
  .epmm-role--col1b { grid-column: 1; grid-row: 2; }
  .epmm-role--wide  { grid-column: 2 / span 2; grid-row: 1 / span 2; }
  .epmm-role--col3  { grid-column: 4; grid-row: 1; }
  .epmm-all         { grid-column: 1 / -1; grid-row: 3; }
}


/* Layout „three“: drei gleich breite Gruppen nebeneinander (col1a | col2 | col3), Button darunter */
@media (min-width: 700px) {
  .epmm-layout--three .epmm-lists { grid-template-columns: 1fr 1fr 1fr; }
  .epmm-layout--three .epmm-role--col1a { grid-column: 1; grid-row: 1; }
  .epmm-layout--three .epmm-role--col2  { grid-column: 2; grid-row: 1; }
  .epmm-layout--three .epmm-role--col3  { grid-column: 3; grid-row: 1; }
  .epmm-layout--three .epmm-all         { grid-column: 1 / -1; grid-row: 2; }
}

/* BESTSELLER-KARTE (nur ab 1500 px): Packshot auf dunklem Verlauf, Text darunter */
.epmm-side {
  display: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(24px, 2.5vw, 40px);
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  background: radial-gradient(120% 70% at 50% 15%, #2b2f34 0%, #17191c 60%, var(--bg) 100%);
  border-left: 1px solid var(--bd);
}
@media (min-width: 1500px) {
  .epmm-side { display: flex; }
}
.epmm-side-media {
  display: block !important;
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 200px;
  margin: 0 0 18px;
}
.epmm-side-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  pointer-events: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 6px !important;
  border: 0 !important;
  max-width: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.45));
  transition: transform 300ms ease;
}
.epmm-side:hover .epmm-side-img { transform: translateY(-4px); }
.epmm-side > *:not(.epmm-side-media) {
  position: relative;
  z-index: 2;
  align-self: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
}
.epmm-side-tag {
  display: inline-block !important;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
  font-weight: 700;
  margin: 0 0 8px;
}
.epmm-side-title {
  display: block !important;
  font-size: clamp(18px, 1.3vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px;
  color: #fff;
}
.epmm-side-price {
  display: block !important;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin: 0 0 14px;
}
.epmm-side-price del { color: rgba(255,255,255,0.45); font-weight: 400; margin-right: 6px; }
.epmm-side-price ins { text-decoration: none; }
.epmm-side-cta {
  display: inline-block !important;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff !important;
  border-bottom: 1px solid var(--acc);
  padding-bottom: 4px;
}

@media (max-width: 699px) {
  .epmm-lists { gap: 22px; }
  .epmm-hero { min-height: 220px; }
  .epmm-root .epmm-link.epmm-link { white-space: normal; }
}
