/* Membership promo — same visual as menu3; height follows dynamic content */
html.menu2-member-banner-hidden .menu2-member-banner,
.menu2-member-banner.is-hidden {
    display: none !important;
}

.menu2-member-banner {
    position: relative;
    z-index: 1030;
    width: 100%;
    height: auto;
    background-color: #000;
    color: #ffffff;
    border-bottom: 1px solid #000;
    flex-shrink: 0;
}

/* Keep banner under Bootstrap modal + backdrop (1050 / 1040) */
body.menu2-theme.modal-open .menu2-member-banner {
    z-index: 1;
}

.menu2-member-banner__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "copy actions close";
    align-items: center;
    column-gap: 12px;
    height: auto;
    min-height: 0;
    padding: 6px 10px 6px 16px;
    box-sizing: border-box;
}

.menu2-member-banner__copy {
    grid-area: copy;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.menu2-member-banner__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.menu2-member-banner p.menu2-member-banner__title,
.menu2-member-banner__title {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    font-family: "Open Sans", sans-serif;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 0;
    color: #fff !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.menu2-member-banner p.menu2-member-banner__desc,
.menu2-member-banner__desc {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    font-family: "Open Sans", sans-serif;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.menu2-member-banner__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-sizing: border-box;
}

.menu2-member-banner__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 26px;
    height: 26px;
    padding: 0 14px;
    border: 0 !important;
    border-radius: 999px !important;
    font-family: "Open Sans", sans-serif;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: none;
    transform: none;
}

.menu2-member-banner__btn--primary {
    color: #3e2a1f !important;
    background: #ffffff !important;
}

.menu2-member-banner__btn--ghost {
    color: #ffffff !important;
    background: transparent !important;
}

.menu2-member-banner__btn--primary:hover,
.menu2-member-banner__btn--primary:focus,
.menu2-member-banner__btn--primary:focus-visible {
    background: #fffaf2 !important;
    color: #3e2a1f !important;
    outline: none;
}

.menu2-member-banner__btn--ghost:hover,
.menu2-member-banner__btn--ghost:focus,
.menu2-member-banner__btn--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    outline: none;
}

.menu2-member-banner__close {
    grid-area: close;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #fff !important;
    opacity: 0.9;
    box-shadow: none !important;
    cursor: pointer;
}

.menu2-member-banner__close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.menu2-member-banner__close:hover,
.menu2-member-banner__close:focus,
.menu2-member-banner__close:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14) !important;
    outline: none;
}

/*
 * Menu2 header is position:fixed and would overlay a tall banner.
 * While the banner is open, keep the header in normal flow (sticky)
 * so it always sits below the banner's real content height.
 */
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .nav-header,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .main-wrapper > .nav-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
}

/*
 * Banner is in-flow and scrolls away. Pin listing chrome under the header only
 * (do not add banner height or a gap stays after the banner leaves).
 */
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .theme_2 .menu-list-wrapper,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .theme_2 .fixed_menu,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .menu-list-wrapper {
    top: var(--menu2-nav-header-height, 65px) !important;
}

html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .theme_2 .sticky_part,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .sticky_head_div,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .main_sticky_search,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .theme_2 .order-summery-section.sticky-top {
    top: var(--menu2-nav-header-height, 65px) !important;
}

html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .cart_Wrapp .menu-list-web {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .cart_Wrapp {
    height: auto !important;
}

html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) #menu-categories-products .category-items {
    scroll-margin-top: calc(var(--menu2-nav-header-height, 65px) + 16px);
}

/*
 * Banner puts the header in-flow. The old page-wrapper padding was for a
 * position:fixed header / coupon slider and leaves a blank gap when coupons
 * are not rendered.
 */
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .page-wrapper,
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .page-wrapper.theme_2 {
    padding-top: 8px !important;
}

html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .page-wrapper:not(:has(.theme_cupoun_row)),
html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .page-wrapper.theme_2:not(:has(.theme_cupoun_row)) {
    padding-top: 0 !important;
}

@media (min-width: 768px) {
    html:not(.menu2-member-banner-hidden) body.menu2-theme:has(#menu2-member-banner:not(.is-hidden)) .preorder_note_wrap {
        padding-top: 8px;
    }
}

@media (max-width: 767px) {
    .menu2-member-banner__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "copy close"
            "actions actions";
        row-gap: 8px;
        column-gap: 4px;
        min-height: 0;
        padding: 8px 8px 10px 12px;
    }

    .menu2-member-banner__actions {
        justify-self: center;
    }

    .menu2-member-banner__close {
        justify-self: end;
        align-self: start;
    }

    .menu2-member-banner p.menu2-member-banner__title,
    .menu2-member-banner__title {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    .menu2-member-banner p.menu2-member-banner__desc,
    .menu2-member-banner__desc {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .menu2-member-banner__btn {
        min-height: 28px;
        height: 28px;
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu2-member-banner {
        animation: none;
    }
}
