﻿:root {
    --mhg-red: #ed1c24;
    --mhg-dark: #071527;
    --mhg-light: #f6f6f6;
    --mhg-border: #e5e5e5;
}

/* Important: the parent header/container must control the absolute menu position */
header,
.header,
.mhg-header,
.border-bottom {
    position: relative;
    z-index: 3000;
}

/* Main nav */
.mhg-nav-only {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    min-height: 72px;
    background: #ffffff;
    position: relative;
    z-index: 3100;
}

    .mhg-nav-only a,
    .mhg-products-trigger {
        border: 0;
        background: transparent;
        color: var(--mhg-dark);
        text-decoration: none;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        padding: 8px 0;
    }

.mhg-products-trigger {
    color: var(--mhg-red);
}

    .mhg-products-trigger span {
        margin-left: 4px;
        font-size: 14px;
    }

/* Mega menu */
.mhg-mega-menu {
    position: absolute;
    /* KEY FIX: start below the header/nav instead of overlapping it */
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2500;
    background: #f4f4f4;
    padding: 24px 24px 30px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

body.mhg-mega-open .mhg-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mhg-mega-menu__panel {
    position: relative;
    max-width: 1180px;
    min-height: 486px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.14);
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.mhg-mega-menu__close {
    position: absolute;
    top: 24px;
    right: 26px;
    z-index: 5;
    border: 0;
    background: transparent;
    color: #9a9a9a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mhg-mega-menu__categories {
    background: #f5f5f5;
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
}

.mhg-mega-menu__category {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--mhg-dark);
    text-align: left;
    font-size: 16px;
    line-height: 1.35;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

    .mhg-mega-menu__category.is-active,
    .mhg-mega-menu__category:hover,
    .mhg-mega-menu__category:focus {
        color: var(--mhg-red);
        text-decoration: underline;
        text-underline-offset: 4px;
    }

.mhg-mega-menu__content {
    position: relative;
}

.mhg-mega-menu__content-item {
    display: none;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 70px;
    padding: 38px 32px 30px 40px;
    min-height: 486px;
}

    .mhg-mega-menu__content-item.is-active {
        display: grid;
    }

.mhg-mega-menu__text h2 {
    margin: 0 0 30px;
    color: var(--mhg-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.mhg-mega-menu__text ul {
    margin: 0;
    padding-left: 18px;
}

.mhg-mega-menu__text li {
    margin-bottom: 20px;
    color: #9a9a9a;
}

    .mhg-mega-menu__text li a {
        color: var(--mhg-dark);
        text-decoration: none;
        font-size: 15px;
    }

        .mhg-mega-menu__text li a:hover {
            color: var(--mhg-red);
            text-decoration: underline;
        }

.mhg-mega-menu__divider {
    height: 1px;
    background: var(--mhg-border);
    margin: 30px 0 24px;
}

.mhg-mega-menu__text h3 {
    margin: 0 0 24px;
    color: var(--mhg-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
}

.mhg-mega-menu__cta {
    color: var(--mhg-red);
    text-decoration: none;
    font-size: 15px;
}

    .mhg-mega-menu__cta:hover {
        text-decoration: underline;
    }

.mhg-mega-menu__image {
    align-self: center;
}

    .mhg-mega-menu__image img {
        display: block;
        width: 235px;
        height: 420px;
        object-fit: cover;
    }

/* Mobile */
@media (max-width: 991px) {
    .mhg-nav-only {
        justify-content: flex-start;
        overflow-x: auto;
        gap: 22px;
        padding: 0 20px;
    }

    .mhg-mega-menu {
        position: static;
        padding: 16px;
    }

    .mhg-mega-menu__panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .mhg-mega-menu__categories {
        padding: 24px;
        gap: 18px;
    }

    .mhg-mega-menu__content-item,
    .mhg-mega-menu__content-item.is-active {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 24px;
        min-height: auto;
    }

    .mhg-mega-menu__image img {
        width: 100%;
        height: 260px;
    }
}
