/* Loaded only for the mobile WordPress navigation breakpoint. */
.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) {
    --mayii-nav-control: 44px;
    grid-template-columns: repeat(2, var(--mayii-nav-control)) minmax(0, 1fr) repeat(2, var(--mayii-nav-control)) !important;
    column-gap: clamp(4px, 1.1vw, 8px);
    padding-inline: clamp(9px, 2.5vw, 24px) !important;
}

.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) :is(.mayii-header-tool, .wp-block-navigation__responsive-container-open) {
    width: var(--mayii-nav-control);
    height: var(--mayii-nav-control);
    min-width: 0;
}

.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) .mayii-account-tool { display: none !important; }
.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) .mayii-search-toggle { grid-area: 1 / 2; }
.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) .mayii-wishlist-nav { grid-area: 1 / 4; }
.mayii-header.mayii-mobile-nav-ready:has(.mayii-wishlist-nav) .mayii-header-basket { grid-area: 1 / 5; }

.mayii-header.mayii-mobile-nav-ready > .mayii-brand {
    grid-area: 1 / 3;
    max-width: 136px;
    margin-inline: auto !important;
}

.mayii-header.mayii-mobile-nav-ready > .mayii-product-search {
    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 6px;
}

.mayii-header.mayii-mobile-nav-ready > .mayii-product-search input[type=search] { min-width: 0; }
.mayii-header.mayii-mobile-nav-ready > .mayii-product-search button { flex: none; }

.mayii-header.mayii-mobile-nav-ready .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    inset: var(--mayii-menu-top, 0px) 0 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: rgb(28 23 21 / 46%) !important;
}

.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-close,
.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-dialog {
    height: 100%;
    max-height: none !important;
    margin: 0 !important;
}

.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-dialog {
    display: grid !important;
    grid-template-rows: 60px minmax(0, 1fr);
    width: min(100%, 460px) !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    background: #fff !important;
}

.mayii-header.mayii-mobile-nav-ready .is-menu-open .mayii-mobile-menu-masthead {
    display: flex !important;
    align-items: center;
    padding-inline: 18px 68px;
    border-bottom: 1px solid var(--mayii-line, #e9e1da);
    background: #fff;
}

.mayii-mobile-menu-masthead img { display: block; width: 112px; max-height: 49px; object-fit: contain; }

.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    inset: 8px 14px auto auto !important;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-container-content {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    max-height: none !important;
    margin: 0 !important;
    padding: 14px clamp(12px, 4vw, 20px) max(20px, env(safe-area-inset-bottom)) !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}
.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-container-content::before { content: none !important; }


.mayii-header.mayii-mobile-nav-ready .is-menu-open .wp-block-navigation__responsive-container-content > .wp-block-navigation__container {
    display: none !important;
}

.mayii-header.mayii-mobile-nav-ready .is-menu-open .mayii-mobile-menu-panel {
    display: grid !important;
    gap: 15px;
    color: var(--mayii-ink, #24211e);
}

.mayii-mobile-menu-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin: 0;
}

.mayii-mobile-menu-search input[type=search] {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--mayii-line, #e9e1da);
    border-radius: 7px;
    background: #faf8f5;
    font: inherit;
    font-size: 16px;
}

.mayii-mobile-menu-search button {
    padding-inline: 12px;
    border-radius: 7px;
    min-height: 44px;
}

.mayii-mobile-menu-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.mayii-mobile-menu-panel a {
    text-decoration: none !important;
    line-height: 1.22;
}

.mayii-mobile-menu-panel .mayii-mobile-menu-shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 46px;
    padding: 6px 4px;
    border: 1px solid #eedcdb;
    border-radius: 8px;
    background: #fbf0ef;
    color: #911a24;
    font-size: .78rem;
    font-weight: 650;
    text-align: center;
}
.mayii-mobile-menu-shortcut svg { width: 16px; height: 16px; flex: none; }

.mayii-mobile-menu-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 7px;
}

.mayii-mobile-menu-section-title h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: -.015em;
}

.mayii-mobile-menu-panel .mayii-mobile-menu-all {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding-inline: 4px;
    color: var(--mayii-red, #a60f1c);
    font-size: .85rem;
    font-weight: 650;
    white-space: nowrap;
}

.mayii-mobile-menu-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.mayii-mobile-menu-panel :is(.mayii-mobile-menu-category, .mayii-mobile-menu-more-link) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-height: 44px;
    padding: 7px 9px;
    color: var(--mayii-ink, #24211e);
    font-size: .86rem;
    font-weight: 550;
}

.mayii-mobile-menu-panel .mayii-mobile-menu-category {
    border: 1px solid var(--mayii-line, #e9e1da);
    border-radius: 8px;
    background: #faf8f5;
}

.mayii-mobile-menu-panel :is(.mayii-mobile-menu-category, .mayii-mobile-menu-more-link)::after {
    content: '';
    width: 5px;
    height: 5px;
    margin-right: 2px;
    border-right: 1.5px solid currentColor;
    border-top: 1.5px solid currentColor;
    transform: rotate(45deg);
    flex: none;
}

.mayii-mobile-menu-more { border-top: 1px solid var(--mayii-line, #e9e1da); }
.mayii-mobile-menu-more-link + .mayii-mobile-menu-more-link { border-top: 1px solid var(--mayii-line, #e9e1da); }
.mayii-mobile-menu-panel :is(a, button, input):focus-visible { outline: 2px solid var(--mayii-red, #a60f1c) !important; outline-offset: -2px; }
@media (max-width: 360px) {
    .mayii-mobile-menu-panel .mayii-mobile-menu-shortcut { flex-direction: column; }
}
