/* Production responsive guardrails for Bluefish. */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
}

.bottom-nav {
    display: flex !important;
}

.sticky-cart-bar {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
}

@media (min-width: 1200px) {
    .bottom-nav {
        display: none !important;
    }

    .sticky-cart-bar {
        bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    }
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1200;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu:not(.is-open) .mobile-menu__panel {
    transform: translateX(0) !important;
}

.mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 18, 32, 0.58);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.mobile-menu__panel {
    position: absolute;
    inset: 0;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card);
    color: var(--text);
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.24s ease;
}

.mobile-menu.is-open .mobile-menu__panel {
    transform: translateX(0);
}

.mobile-menu__top {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
}

.mobile-menu__brand {
    min-width: 0;
    color: var(--primary);
    font-family: var(--display-font);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.05;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.mobile-menu__close {
    background: rgba(21, 58, 99, 0.08) !important;
    color: var(--primary) !important;
}

.mobile-menu__nav {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-auto-rows: minmax(54px, 1fr);
    gap: 8px;
    padding: 14px 0 0;
    overflow-y: auto;
}

.mobile-menu__link {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 850;
    letter-spacing: 0;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mobile-menu__link:active {
    transform: scale(0.98);
}

.mobile-menu__link.is-active {
    color: var(--primary);
    background: rgba(21, 58, 99, 0.08);
    border-color: rgba(21, 58, 99, 0.12);
}

.mobile-menu__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(21, 58, 99, 0.08);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.mobile-menu__support {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin-top: 14px;
    padding: 16px 4px 2px;
    border-top: 1px solid rgba(21, 58, 99, 0.10);
}

.mobile-menu__support a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
}

body.mobile-menu-open .cookie-consent-banner {
    display: none !important;
}

@media (max-width: 767px) and (max-height: 640px) {
    .mobile-menu__panel {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .mobile-menu__top {
        min-height: 48px;
    }

    .mobile-menu__brand {
        font-size: 22px;
    }

    .mobile-menu__nav {
        flex: 0 0 auto;
        grid-auto-rows: minmax(48px, auto);
        gap: 6px;
        padding-top: 8px;
        overflow: visible;
    }

    .mobile-menu__link {
        min-height: 48px;
        justify-content: flex-start;
        font-size: 17px;
    }

    .mobile-menu__icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .mobile-menu__support {
        margin-top: 8px;
        padding-top: 12px;
        padding-bottom: 2px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .mobile-menu__panel {
        left: auto;
        width: min(420px, calc(100vw - 64px));
        padding-left: 22px;
        padding-right: 22px;
    }

    .mobile-menu__nav {
        flex: 0 1 auto;
        grid-auto-rows: minmax(60px, auto);
        align-content: start;
        gap: 10px;
        padding-top: 20px;
    }

    .mobile-menu__link {
        justify-content: flex-start;
        font-size: 20px;
        padding: 0 16px;
    }

    .mobile-menu__support {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .header-menu-toggle,
    .mobile-menu {
        display: none !important;
    }
}

.app,
.customer-shell,
.content,
.desktop-site-container,
.desktop-page-shell,
.desktop-page-card,
.desktop-checkout-grid,
.desktop-checkout-form-stack,
.desktop-checkout-summary,
.desktop-menu-page,
.desktop-menu-layout,
.desktop-menu-main,
.desktop-menu-items-grid,
.menu-list,
.menu-item,
.item-content,
.checkout-stack,
.checkout-summary-card,
.checkout-details-card,
.checkout-payment-card,
.checkout-notes-card {
    min-width: 0;
}

.desktop-category-filter,
.categories,
.quick-actions,
.home-offers {
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

.menu-list.is-loaded > .skeleton-cards,
.desktop-menu-items-grid.is-loaded > .skeleton-cards {
    display: none !important;
}

.menu-list.is-loaded > .menu-items-real {
    display: contents;
}

@media (min-width: 1200px) {
    .desktop-menu-items-grid.is-loaded > .menu-items-real {
        display: grid;
    }
}

.logo,
.hero-title,
.hero-subtitle,
.quick-label,
.item-name,
.item-desc,
.desktop-popular-card__title,
.desktop-popular-card__description,
.checkout-item-name,
.checkout-item-customizations,
.desktop-checkout-item__body,
.desktop-checkout-item__customizations,
.desktop-form-error,
.alert {
    overflow-wrap: anywhere;
}

.modal-content,
.cart-modal-content,
.item-modal-content {
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .quick-actions {
        padding-inline: 12px;
        gap: 8px;
    }

    .quick-btn {
        min-width: 74px;
        padding-inline: 12px;
    }

    .quick-label {
        max-width: 64px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .home-promo-topline,
    .home-promo-actions,
    .checkout-item-topline,
    .desktop-checkout-item__topline {
        flex-wrap: wrap;
    }

    .checkout-btn,
    .desktop-checkout-submit {
        width: 100%;
        margin-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .app {
        max-width: 760px;
    }

    .header {
        gap: 12px;
    }

    .header-nav,
    .header-cart-summary {
        display: none !important;
    }

    .header .header-menu-toggle,
    .header .header-cart-toggle {
        display: flex !important;
    }

    .header-actions {
        flex-shrink: 0;
        margin-left: 0;
    }

    .logo {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .customer-shell,
    .desktop-page-shell {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .app-page-menu .customer-shell,
    .app-page-menu .customer-shell--with-cart,
    .app-page-menu .content {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .app-page-menu .customer-basket-region {
        position: static;
        align-self: start;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .app-page-menu .large-cart-panel {
        position: fixed;
        top: calc(var(--header-sticky-top, 182px) + 24px);
        right: max(32px, calc((100vw - 1280px) / 2));
        width: 360px;
        height: auto;
        max-height: calc(100dvh - var(--header-sticky-top, 182px) - 48px);
        overflow: hidden;
        z-index: 250;
    }
}
