/* RHW Hauptmenü + Produkte Mega-Menu */

.rhw-main-nav,
.rhw-produkte-megamenu {
    --rhw-mm-accent: #870C25;
    --rhw-mm-title: #1B1B1B;
    --rhw-mm-muted: #6B6B6B;
    --rhw-mm-radius: 16px;
    font-family: "Manrope", sans-serif;
}

.rhw-main-nav *,
.rhw-main-nav *::before,
.rhw-main-nav *::after,
.rhw-produkte-megamenu *,
.rhw-produkte-megamenu *::before,
.rhw-produkte-megamenu *::after {
    box-sizing: border-box;
}

/* -------------------------------------------------------------------------
 * Hauptmenü-Leiste
 * ------------------------------------------------------------------------- */

.rhw-main-nav {
    --rhw-nav-ink: #ffffff;
    position: relative;
    width: 100%;
    z-index: 20;
    color: var(--rhw-nav-ink);
}

.rhw-main-nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rhw-main-nav__item {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent !important;
}

.elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__link,
.elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__trigger,
.ekit-template-content-header .rhw-main-nav .rhw-main-nav__link,
.ekit-template-content-header .rhw-main-nav .rhw-main-nav__trigger,
.rhw-main-nav a.rhw-main-nav__link,
.rhw-main-nav span.rhw-main-nav__link,
.rhw-main-nav .rhw-main-nav__link,
.rhw-main-nav .rhw-main-nav__link:visited,
.rhw-main-nav .rhw-main-nav__link:hover,
.rhw-main-nav .rhw-main-nav__link:focus,
.rhw-main-nav .rhw-main-nav__link:focus-visible,
.rhw-main-nav .rhw-main-nav__link:active,
.rhw-main-nav .rhw-main-nav__item.is-active > .rhw-main-nav__link,
.rhw-main-nav .rhw-main-nav__item.is-open > .rhw-main-nav__trigger {
    all: unset;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 7px 20px;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
    font-family: "Manrope", sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal;
    cursor: pointer;
    white-space: nowrap;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.rhw-main-nav .rhw-main-nav__link:hover,
.rhw-main-nav .rhw-main-nav__link:focus-visible {
    opacity: 0.82;
}

@media (min-width: 1025px) {
    .elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__link,
    .elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__trigger,
    .ekit-template-content-header .rhw-main-nav .rhw-main-nav__link,
    .ekit-template-content-header .rhw-main-nav .rhw-main-nav__trigger,
    .rhw-main-nav a.rhw-main-nav__link,
    .rhw-main-nav span.rhw-main-nav__link,
    .rhw-main-nav .rhw-main-nav__link {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
}

.rhw-main-nav__caret {
    display: block;
    width: 10px;
    height: 6px;
    color: inherit;
    transition: transform 0.18s ease;
}

.rhw-main-nav__item.is-open > .rhw-main-nav__trigger .rhw-main-nav__caret {
    transform: rotate(180deg);
}

.rhw-main-nav__overlay,
.rhw-main-nav__close,
.rhw-main-nav__item--close {
    display: none;
}

.rhw-main-nav__burger,
.rhw-main-nav__burger:hover,
.rhw-main-nav__burger:focus,
.rhw-main-nav__burger:active {
    display: none;
    appearance: none !important;
    -webkit-appearance: none !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 8px !important;
    margin: 0 0 0 auto !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    cursor: pointer;
}

.rhw-main-nav__burger-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}

.rhw-main-nav__burger-box span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff !important;
    border-radius: 1px;
}

html.rhw-main-nav-lock,
html.rhw-main-nav-lock body {
    overflow: hidden;
}

.rhw-main-nav .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Shortcode ersetzt das ElementsKit-Hauptmenü im Header. */
.ekit-template-content-header:has(.rhw-main-nav) .elementor-widget-ekit-nav-menu {
    display: none !important;
}

.ekit-template-content-header .elementor-widget-text-editor:has(.rhw-main-nav),
.ekit-template-content-header .elementor-element:has(> .rhw-main-nav),
.ekit-template-content-header .elementor-element:has(.rhw-main-nav) {
    overflow: visible !important;
}

.ekit-template-content-header .elementor-widget-text-editor:has(.rhw-main-nav) {
    width: 100%;
    flex: 1 1 auto;
}

.ekit-template-content-header .elementor-widget-text-editor:has(.rhw-main-nav) p {
    margin: 0;
}

/* -------------------------------------------------------------------------
 * Mega-Panel
 * ------------------------------------------------------------------------- */

.rhw-produkte-megamenu {
    box-sizing: border-box;
    width: max-content;
    min-width: 780px;
    max-width: min(1100px, calc(100vw - 48px));
    margin: 0;
    padding: 40px;
    background: #ffffff;
    border-radius: var(--rhw-mm-radius);
    box-shadow: 0 18px 50px rgba(27, 27, 27, 0.12), 0 2px 8px rgba(27, 27, 27, 0.06);
    color: var(--rhw-mm-title);
    text-align: left;
    line-height: 1.4;
}

.rhw-main-nav__item--dropdown > .rhw-produkte-megamenu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.rhw-main-nav__item--dropdown > .rhw-produkte-megamenu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.rhw-main-nav__item--dropdown:hover > .rhw-produkte-megamenu,
.rhw-main-nav__item--dropdown:focus-within > .rhw-produkte-megamenu,
.rhw-main-nav__item--dropdown.is-open > .rhw-produkte-megamenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.rhw-produkte-megamenu__inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 40px;
}

.rhw-produkte-megamenu__cols {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    gap: 40px;
    min-width: 0;
}

.rhw-produkte-megamenu__col {
    flex: 1 1 0;
    min-width: 0;
}

.rhw-produkte-megamenu__eyebrow {
    margin: 0 0 12px;
    padding: 0 12px;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rhw-mm-accent);
    line-height: 1.3;
}

.rhw-produkte-megamenu__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 12px;
    margin: 0 -12px;
    border-radius: 12px;
    text-decoration: none !important;
    color: inherit;
    transition: background-color 0.18s ease;
}

.rhw-produkte-megamenu__item:hover,
.rhw-produkte-megamenu__item:focus-visible {
    background-color: #f7f1f3;
    outline: none;
}

.rhw-produkte-megamenu__item--soon {
    cursor: default;
    opacity: 0.72;
}

.rhw-produkte-megamenu__item--soon:hover,
.rhw-produkte-megamenu__item--soon:focus-visible {
    background-color: transparent;
}

.rhw-produkte-megamenu__soon {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f7f1f3;
    color: var(--rhw-mm-accent);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

.rhw-produkte-megamenu__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    color: var(--rhw-mm-accent);
    line-height: 0;
}

.rhw-produkte-megamenu__icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

.rhw-produkte-megamenu__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rhw-produkte-megamenu__title {
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--rhw-mm-title);
    line-height: 1.3;
}

.rhw-produkte-megamenu__desc {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--rhw-mm-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rhw-produkte-megamenu__promo {
    flex: 0 0 240px;
    width: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    background: var(--rhw-mm-accent);
    border-radius: var(--rhw-mm-radius);
    color: #ffffff;
}

.rhw-produkte-megamenu__promo-title {
    margin: 0 0 10px;
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.rhw-produkte-megamenu__promo-text {
    margin: 0 0 22px;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.rhw-produkte-megamenu__promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 11px 18px;
    background: #ffffff;
    color: var(--rhw-mm-accent) !important;
    border-radius: 10px;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rhw-produkte-megamenu__promo-btn:hover,
.rhw-produkte-megamenu__promo-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    outline: none;
}

@media (max-width: 1024px) {
    .ekit-template-content-header .elementor-widget-text-editor:has(.rhw-main-nav) {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        width: auto !important;
        min-width: 44px;
        flex: 0 0 auto;
    }

    .rhw-main-nav {
        display: flex;
        justify-content: flex-end;
        overflow: visible;
    }

    .rhw-main-nav__burger,
    .rhw-main-nav__burger:hover,
    .rhw-main-nav__burger:focus,
    .rhw-main-nav__burger:active {
        display: inline-flex !important;
        position: relative;
        z-index: 100002;
    }

    .rhw-main-nav__overlay,
    body > .rhw-main-nav__overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 2147483000;
        background: rgba(15, 15, 15, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .rhw-main-nav.is-open > .rhw-main-nav__overlay,
    body > .rhw-main-nav__overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .rhw-main-nav__overlay[hidden] {
        display: none;
    }

    .rhw-main-nav.is-open > .rhw-main-nav__overlay[hidden],
    body > .rhw-main-nav__overlay.is-open[hidden] {
        display: block;
    }

    .rhw-main-nav,
    .rhw-main-nav.is-open,
    body > .rhw-main-nav__list {
        --rhw-nav-ink: #1b1b1b;
    }

    .rhw-main-nav__list,
    body > .rhw-main-nav__list {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(400px, 100vw);
        min-width: 0;
        max-width: 100vw;
        margin: 0;
        padding: 72px 20px 24px;
        background: #ffffff;
        border-radius: 0;
        box-shadow: -16px 0 40px rgba(27, 27, 27, 0.18);
        z-index: 2147483001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(110%);
        transition: transform 0.28s ease;
        color: #1b1b1b;
    }

    .rhw-main-nav.is-open > .rhw-main-nav__list,
    body > .rhw-main-nav__list.is-open {
        transform: translateX(0);
    }

    .elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__link,
    .elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__trigger,
    .ekit-template-content-header .rhw-main-nav .rhw-main-nav__link,
    .ekit-template-content-header .rhw-main-nav .rhw-main-nav__trigger,
    .rhw-main-nav__list .rhw-main-nav__link,
    .rhw-main-nav__list .rhw-main-nav__trigger,
    body > .rhw-main-nav__list .rhw-main-nav__link,
    body > .rhw-main-nav__list .rhw-main-nav__trigger,
    .rhw-main-nav .rhw-main-nav__link,
    .rhw-main-nav .rhw-main-nav__link:visited,
    .rhw-main-nav .rhw-main-nav__link:hover,
    .rhw-main-nav .rhw-main-nav__link:focus,
    .rhw-main-nav .rhw-main-nav__link:active,
    .rhw-main-nav .rhw-main-nav__item.is-active > .rhw-main-nav__link,
    .rhw-main-nav .rhw-main-nav__item.is-open > .rhw-main-nav__trigger {
        color: #1b1b1b !important;
        -webkit-text-fill-color: #1b1b1b !important;
        width: 100%;
        justify-content: space-between;
        padding: 14px 8px;
        opacity: 1;
        border-bottom: 1px solid #e8e8ea !important;
    }

    html.rhw-main-nav-lock .rhw-main-nav__list,
    html.rhw-main-nav-lock .rhw-main-nav__list a,
    html.rhw-main-nav-lock .rhw-main-nav__list a:link,
    html.rhw-main-nav-lock .rhw-main-nav__list a:visited,
    html.rhw-main-nav-lock .rhw-main-nav__list a span,
    html.rhw-main-nav-lock .rhw-main-nav__list .rhw-main-nav__link,
    html.rhw-main-nav-lock .rhw-main-nav__list .rhw-main-nav__link *,
    html.rhw-main-nav-lock .rhw-main-nav__list .rhw-main-nav__trigger,
    html.rhw-main-nav-lock .rhw-main-nav__list .rhw-main-nav__trigger * {
        color: #1b1b1b !important;
        -webkit-text-fill-color: #1b1b1b !important;
    }

    .elementor-widget-text-editor .rhw-main-nav .rhw-main-nav__link:hover,
    .ekit-template-content-header .rhw-main-nav .rhw-main-nav__link:hover,
    .rhw-main-nav__list .rhw-main-nav__link:hover,
    body > .rhw-main-nav__list .rhw-main-nav__link:hover,
    .rhw-main-nav .rhw-main-nav__item.is-active > .rhw-main-nav__link,
    .rhw-main-nav .rhw-main-nav__item.is-open > .rhw-main-nav__trigger,
    body > .rhw-main-nav__list .rhw-main-nav__item.is-active > .rhw-main-nav__link,
    body > .rhw-main-nav__list .rhw-main-nav__item.is-open > .rhw-main-nav__trigger {
        color: #870c25 !important;
    }

    .rhw-main-nav__item--close,
    body > .rhw-main-nav__list .rhw-main-nav__item--close {
        display: block !important;
        position: static;
        height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
        border: 0 !important;
        background: transparent !important;
    }

    .rhw-main-nav__close {
        display: flex !important;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        background: #f4f4f5 !important;
        color: #1b1b1b !important;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    .rhw-main-nav__item--dropdown > .rhw-produkte-megamenu,
    .rhw-main-nav__item--dropdown:hover > .rhw-produkte-megamenu,
    .rhw-main-nav__item--dropdown:focus-within > .rhw-produkte-megamenu {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: 8px;
        padding: 16px 8px 8px;
        transform: none;
        box-shadow: none;
        border-radius: 12px;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .rhw-main-nav__item--dropdown.is-open > .rhw-produkte-megamenu {
        display: block;
    }

    .rhw-produkte-megamenu__inner,
    .rhw-produkte-megamenu__cols {
        flex-direction: column;
        gap: 20px;
    }

    .rhw-produkte-megamenu__promo {
        flex: 0 0 auto;
        width: 100%;
    }

    .rhw-produkte-megamenu__desc {
        white-space: normal;
    }
}
