/* ==========================================================================
   Mega Menu  (inc/mega-menu.php)
   ========================================================================== */
.site-header .header-wrapper { position: relative; }
.mega-menu-panel { display: none; }
.site-header .menu li.has-mega-menu > .caret-arrow svg { transition: var(--transition); }
.site-header .menu li.has-mega-menu.mega-open > .caret-arrow{ transform: rotate(180deg); top: 1px;}

/* Shortcode markup */
.eyezone-mega {
    display: flex;
    gap: 30px 40px;
    text-align: left;
}
.eyezone-mega .mm-col { flex: 1 1 0; min-width: 0; }
.eyezone-mega .mm-col--split { flex-grow: 2;}
.eyezone-mega .mm-heading {
    line-height: 1.3;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 0 18px;
    font-style: normal;
    font-size: 16px;
    color: var(--black);
    font-family: "Lexend", sans-serif;
}
.eyezone-mega .mm-heading a { color: var(--black);font: inherit; }
.eyezone-mega .mm-heading a:hover { color: var(--purple); }

/* Overrides (the header .menu li styles also apply to descendant li elements) */
.site-header .menu .mega-menu-panel .mm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}
.site-header .menu .mega-menu-panel .mm-list > li {
    display: block;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    line-height: normal;
    break-inside: avoid;
}
.site-header .menu .mega-menu-panel .mm-list > li:last-child{
    margin-bottom: 0;
}
.site-header .menu .mega-menu-panel .mm-list a {
    color: var(--grey);
    text-transform: none;
    transition: var(--transition);
    padding: 0;
}
.site-header .menu .mega-menu-panel .mm-list a:hover,
.site-header .menu .mega-menu-panel .mm-list .current-menu-item a { color: var(--black); }
.site-header .menu .mega-menu-panel .mm-list--split { column-count: 2; column-gap: 30px; }

/* Colour swatch */
.site-header .menu .mega-menu-panel .mm-item--swatch a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.mm-swatch {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background-color: #D9D9D9; /* fallback when no image is set */
}
.mm-swatch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Close button */
.mega-menu-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--black);
    cursor: pointer;
    transition: var(--transition);
}
.mega-menu-close:hover { color: var(--purple); }

/* Desktop */
@media only screen and (min-width: 992px) {
    .site-header .menu > li.has-mega-menu { position: static; }
    .site-header .menu .mega-menu-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 40px 0 44px;
        background-color: var(--white);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 24px 30px rgba(0, 0, 0, .06);
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        text-align: left;
    }
    .site-header .menu li.has-mega-menu.mega-open > .mega-menu-panel { display: block; }
    html:has(.menu-item.mega-open){
        overflow: hidden;
    }
}
@media only screen and (min-width: 1200px) {
    .eyezone-mega .mm-col--split { flex-grow: 2;flex: 15%;}
}
@media only screen and (max-width: 1280px) {
    .mega-menu-close{
        right: 10px;
    }
}
/* Mobile / Tablet (drawer) */
@media only screen and (max-width: 991px) {
    .site-header .menu > li.has-mega-menu { flex-wrap: wrap; }
    .site-header .menu .mega-menu-panel {
        position: static;
        flex: 0 0 100%;
        width: 100%;
        padding: 20px 0 0;
        text-align: left;
    }
    .site-header .menu li.has-mega-menu.mega-open > .mega-menu-panel { display: block; }
    .site-header .menu .mega-menu-panel .container { padding-left: 0; padding-right: 0; }
    .mega-menu-close { display: none; }
    .eyezone-mega { flex-direction: column; gap: 24px; }
    .site-header .menu .mega-menu-panel .mm-list--split { column-gap: 20px; }
    .eyezone-mega .mm-heading {
        font-size: 14px;
    }
}
@media only screen and (max-width: 767px) {
    .site-header .menu .mega-menu-panel .mm-list--split{
        column-count: 1;
    }
}