/* Native Products disclosure used until the interactive menu is available. */
.mt-product-fallback {
    position: relative;
}

.mt-product-fallback > summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    padding: 12px;
    white-space: nowrap;
}

.mt-product-fallback[open] > .mt-product-fallback-links {
    background: #fff;
    border-top: 3px solid #f08441;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
    display: grid;
    inset: 100% auto auto 0;
    min-width: 240px;
    position: absolute;
    z-index: 56;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-product-fallback-links > a {
    color: #242424 !important;
    display: block;
    padding: 10px 14px;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-product-fallback-links > a:is(:hover, :focus-visible) {
    color: #9c3f08 !important;
}

@media (max-width: 980px) {
    .mt-product-fallback {
        color: #555;
        width: 100%;
    }

    .mt-product-fallback > summary {
        padding: 14px 18px;
    }

    .mt-product-fallback[open] > .mt-product-fallback-links {
        box-shadow: none;
        position: static;
    }
}

.mt-mega {
    --mt-orange: #f08441;
    --mt-ink: #242424;
    --mt-line: #d7d5d3;
    --mt-selected: #ffe0c8;
    --mt-gutter: clamp(18px, 2vw, 30px);
    color: var(--mt-ink);
    flex: 0 0 auto;
    line-height: 1.4;
}

.mt-mega-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 2px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    gap: 9px;
    min-height: 40px;
    padding: 0 12px;
}

.mt-mega-trigger:hover,
.mt-mega-trigger[aria-expanded="true"] {
    background: var(--mt-orange);
    color: var(--mt-ink);
}

.mt-mega-trigger:focus-visible,
.mt-mega-panel :is(a, button, input, select, h2):focus-visible {
    outline: 2px solid #9c3f08;
    outline-offset: 2px;
}

.mt-mega-trigger:focus-visible {
    outline-color: var(--mt-orange);
}

.mt-mega-down,
.mt-mega-row::after {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    display: block;
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
}

.mt-mega-down {
    margin-top: -3px;
    transform: rotate(45deg);
}

[aria-expanded="true"] > .mt-mega-down {
    margin-top: 3px;
    transform: rotate(225deg);
}

.mt-menu-shell .mt-mega-panel {
    background: #fff;
    border-top: 4px solid var(--mt-orange);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
    display: grid;
    grid-template-areas:
        "categories search feature"
        "categories results feature";
    grid-template-columns: 25% 41% 34%;
    inset: 100% 0 auto;
    position: absolute;
    z-index: 55;
}

.mt-menu-shell .mt-mega-panel[hidden],
.mt-menu-shell .mt-mega-panel [hidden] {
    display: none;
}

.mt-mega-categories,
.mt-mega-models,
.mt-mega-shelf {
    min-width: 0;
    padding: var(--mt-gutter);
}

.mt-mega-categories {
    background: #f1f1f1;
    grid-area: categories;
}

.mt-mega-category-picker {
    display: none;
}

.mt-mega-search {
    align-items: end;
    display: flex;
    gap: 8px;
    grid-area: search;
    min-width: 0;
    padding: var(--mt-gutter) var(--mt-gutter) 0;
}

.mt-mega-search label {
    display: block;
    flex: 1;
    min-width: 0;
}

.mt-mega-search-input,
.mt-mega-select {
    background: #fff;
    border: 1px solid #817e7b;
    border-radius: 5px;
    color: var(--mt-ink);
    display: block;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: normal;
    margin-top: 6px;
    min-height: 44px;
    padding: 7px 11px;
    text-transform: none;
    width: 100%;
}

.mt-mega-search-input::-webkit-search-cancel-button {
    display: none;
}

.mt-mega-search-clear {
    background: #f1f1f1;
    border: 0;
    border-radius: 5px;
    color: var(--mt-ink);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    padding-inline: 12px;
}

.mt-menu-shell .mt-mega-panel .mt-mega-empty {
    color: #494949;
    margin-top: 18px;
}

.mt-mega-models {
    background: #fff;
    display: flex;
    flex-direction: column;
    grid-area: results;
    min-height: 0;
    padding-top: 18px;
}

.mt-mega-shelf {
    background: #ebe9e7;
    grid-area: feature;
}

.mt-menu-shell .mt-mega-panel p {
    margin: 0;
    padding: 0;
}

.mt-mega-heading {
    color: #545454;
    font-size: clamp(13px, 1.15vw, 17px);
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.mt-mega-shelf .mt-mega-heading,
.mt-mega-quick .mt-mega-heading {
    color: #9c3f08;
}

.mt-mega-results-heading {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: space-between;
}

.mt-mega-count {
    color: #545454;
    font-size: 13px;
}

.mt-menu-shell .mt-mega-product-list {
    list-style: none;
    margin: 12px 0 0;
    max-height: 420px;
    overflow-y: auto;
    padding: 3px 6px;
    scrollbar-color: #b6b2ae #f3f2f1;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

/* Match Divi's ID-scoped header rules while also supporting the shortcode outside Divi. */
:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega :is(.mt-mega-row, .mt-mega-cta) {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--mt-ink) !important;
    display: flex;
    font: inherit;
    font-size: clamp(15px, 1.32vw, 19px);
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
    min-height: 46px;
    padding: 8px 0;
    text-align: left;
    white-space: normal;
    width: 100%;
}

.mt-mega-row::after {
    content: "";
    margin-right: 3px;
    transform: rotate(-45deg);
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-categories .mt-mega-row {
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    padding-inline: 11px;
}

.mt-mega-heading + .mt-mega-row {
    margin-top: 15px;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-categories .mt-mega-row:hover,
:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-row[aria-pressed="true"] {
    background: var(--mt-selected);
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-row.mt-mega-shop {
    border-radius: 0;
    border-top: 1px solid var(--mt-line);
    margin-top: 12px;
    padding-top: 13px;
}

.mt-mega-result-row {
    align-items: stretch;
    border-bottom: 1px solid var(--mt-line);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-result-row .mt-mega-row {
    font-size: clamp(15px, 1.14vw, 17px);
}

.mt-mega-result-row .mt-mega-row::after {
    content: none;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-result-row .mt-mega-row:hover {
    color: #9c3f08 !important;
    text-decoration: underline;
}

.mt-mega-quick-trigger,
.mt-mega-quick-close {
    align-self: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #80410d;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    min-height: 44px;
    padding: 0 7px;
    white-space: nowrap;
}

.mt-mega-quick-trigger:hover,
.mt-mega-quick-trigger[aria-expanded="true"],
.mt-mega-quick-close:hover {
    background: var(--mt-selected);
}

.mt-mega-quick {
    min-width: 0;
}

.mt-mega-quick-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.mt-menu-shell .mt-mega-quick h2 {
    color: var(--mt-ink);
    margin: 0;
    padding: 0;
}

.mt-mega-image {
    display: block;
    height: clamp(155px, 19vw, 252px);
    margin: 8px auto 10px;
    object-fit: contain;
    width: 100%;
}

.mt-mega-feature-name {
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 900;
    line-height: 1.15;
}

.mt-menu-shell .mt-mega-panel .mt-mega-heading + .mt-mega-feature-name {
    margin-top: 16px;
}

.mt-menu-shell .mt-mega-panel .mt-mega-summary {
    color: #494949;
    font-size: clamp(14px, 1.15vw, 17px);
    margin-top: 5px;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega .mt-mega-cta {
    background: var(--mt-orange);
    border-radius: 3px;
    display: inline-flex;
    gap: 14px;
    margin-top: 18px;
    padding: 8px 16px;
    width: auto;
}

:is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega .mt-mega-cta:hover {
    background: #f69f68;
}

@media (min-width: 981px) {
    .mt-menu-shell.mt-mega-ready .mt-menu-main-inner {
        position: relative;
    }

    .mt-menu-shell .mt-mega-panel {
        grid-template-rows: auto minmax(0, 1fr);
        max-height: calc(100dvh - 125px);
    }

    .mt-mega-categories,
    .mt-mega-shelf {
        overflow-y: auto;
    }

    .mt-menu-shell .mt-mega-panel[data-mt-searching]:not([data-mt-quick-open]) {
        grid-template-areas:
            "categories search search"
            "categories results results";
    }
}

@media (min-width: 981px) and (max-width: 1360px) {
    :is(#page-container, body) .mt-menu-shell.mt-mega-ready .mt-primary-nav {
        gap: clamp(8px, calc(2vw - 12px), 17px);
    }

    :is(#page-container, body) .mt-menu-shell.mt-mega-ready .mt-brand {
        min-width: 0;
    }

    :is(#page-container, body) .mt-menu-shell.mt-mega-ready .mt-brand-logo {
        max-width: clamp(170px, 17vw, 220px);
    }
}

.mt-mega-panel[data-mt-searching]:not([data-mt-quick-open]) .mt-mega-shelf {
    display: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    .mt-menu-shell .mt-mega-panel {
        grid-template-areas:
            "categories search search"
            "categories results results";
    }

    .mt-mega-quick-trigger,
    .mt-mega-shelf {
        display: none;
    }

    .mt-mega-result-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    .mt-mega {
        width: 100%;
    }

    .mt-mega-trigger {
        background: #fff;
        border-bottom: 1px solid var(--mt-line);
        color: #555;
        font-size: 16px;
        justify-content: space-between;
        min-height: 50px;
        padding-inline: 18px 25px;
        text-align: left;
        width: 100%;
    }

    .mt-mega-trigger:hover,
    .mt-mega-trigger[aria-expanded="true"] {
        background: var(--mt-selected);
    }

    .mt-menu-shell .mt-mega-panel {
        border-top-width: 2px;
        box-shadow: none;
        grid-template-areas: "search" "categories" "results";
        grid-template-columns: minmax(0, 1fr);
        position: static;
    }

    .mt-mega-category-buttons {
        display: none;
    }

    .mt-mega-category-picker {
        display: block;
    }

    .mt-mega-categories {
        background: #fff;
        padding-block: 12px 0;
    }

    :is(#page-container, body) .mt-menu-shell .mt-primary-nav .mt-mega-categories a.mt-mega-row {
        border: 0;
        display: inline-flex;
        font-size: 14px;
        gap: 8px;
        margin-top: 4px;
        min-height: 40px;
        padding: 6px 10px 6px 0;
        width: auto;
    }

    .mt-menu-shell .mt-mega-product-list {
        max-height: min(380px, 48vh);
    }
}
