/* Menu styles use the same warm, bold system as home, orders, and checkout. */
.menu-page-shell {
    --menu-cream: #fffaf1;
    --menu-ink: #151311;
    min-height: 100vh;
    background: var(--menu-cream);
}

.menu-page-shell .navbar { z-index: 20; }

.menu-page {
    width: 100%;
    max-width: none;
    min-height: 70vh;
    margin: 0;
    padding: clamp(26px, 4vw, 48px) clamp(12px, 2.5vw, 40px) clamp(56px, 8vw, 96px);
}

.menu-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto clamp(24px, 4vw, 38px);
}

.menu-header .section-tag { margin-bottom: 13px; }

.menu-header h1 {
    margin: 0 0 12px;
    color: var(--menu-ink);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 950;
    line-height: .92;
    letter-spacing: -.075em;
    text-transform: uppercase;
}

.menu-header h1 span { color: var(--food-red); }
.menu-header > div > p:last-child { margin: 0; color: #6b645c; font-size: 15px; line-height: 1.7; }
.menu-cart-link { flex: 0 0 auto; border-radius: 2px; }
.menu-cart-link span { margin-left: 8px; font-size: 18px; }

.menu-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(22px, 3vw, 32px);
}

.menu-search {
    display: flex;
    flex: 1 1 320px;
    gap: 8px;
    min-width: min(100%, 280px);
}

.menu-search input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid #d8d0c5;
    border-radius: 2px;
    outline: none;
    color: var(--menu-ink);
    background: #fff;
    font-size: 14px;
}

.menu-search input:focus { border-color: var(--food-red); box-shadow: 0 0 0 3px rgba(215, 25, 32, .12); }
.menu-search .btn { min-height: 50px; padding-inline: 18px; border-radius: 2px; font-size: 10px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }

.category-list {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px;
}

.category-list button {
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #d8d0c5;
    border-radius: 2px;
    color: #514a42;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.category-list button:hover { border-color: var(--menu-ink); color: var(--menu-ink); }
.category-list button.active { border-color: var(--menu-ink); color: #fff; background: var(--menu-ink); }
.category-list button:focus-visible, .menu-card a:focus-visible, .menu-card button:focus-visible, .menu-search button:focus-visible { outline: 3px solid var(--food-yellow); outline-offset: 3px; }

.menu-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 20px;
    padding: 17px 19px;
    border: 1px solid rgba(21, 19, 17, .08);
    border-left: 5px solid var(--food-yellow);
    color: #514a42;
    background: #fff;
    box-shadow: 0 13px 38px rgba(47, 32, 17, .075);
    font-size: 14px;
    line-height: 1.55;
}

.menu-message::before {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 50%;
    content: "i";
    color: #151311;
    background: var(--food-yellow);
    font-size: 12px;
    font-weight: 950;
}

.menu-message.is-error { border-left-color: var(--food-red); color: #7c171b; background: #fff7f5; }
.menu-message.is-error::before { content: "!"; color: #fff; background: var(--food-red); }
.menu-message[hidden] { display: none !important; }

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: clamp(14px, 1.8vw, 24px);
}

.menu-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(21, 19, 17, .08);
    color: var(--menu-ink);
    background: #fff;
    box-shadow: 0 13px 38px rgba(47, 32, 17, .075);
    transition: transform .2s ease, box-shadow .2s ease;
}

.menu-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(47, 32, 17, .13); }
.menu-card-detail-link { display: block; color: inherit; }
.menu-card-image { width: 100%; height: clamp(190px, 23vw, 310px); object-fit: cover; background: #eee7dc; }
.menu-card-image.menu-image-placeholder { display: grid; place-items: center; color: #6b645c; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.menu-card-body { display: flex; flex: 1; flex-direction: column; padding: clamp(16px, 2vw, 22px); }
.menu-card-body h2 { margin: 0 0 8px; color: var(--menu-ink); font-size: clamp(1.15rem, 1.7vw, 1.35rem); font-weight: 950; line-height: 1.15; letter-spacing: -.035em; text-transform: uppercase; }
.menu-card-title-link { color: inherit; text-decoration: none; }
.menu-card-title-link:hover { color: var(--food-red); }
.menu-card-body p { margin: 0 0 18px; color: #6b645c; font-size: 13px; line-height: 1.65; }
.menu-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid #eee8df; }
.menu-price { color: var(--menu-ink); font-size: 17px; font-weight: 950; white-space: nowrap; }
.menu-card-footer .add-to-cart { min-height: 42px; padding: 11px 14px; border-radius: 2px; font-size: 9px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.menu-card-footer .add-to-cart:disabled { cursor: wait; opacity: .7; }
.menu-card-support-link { align-self: flex-start; margin-top: 12px; color: #8a4325; font-size: 11px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.cart-notification {
    position: fixed;
    z-index: 1100;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(400px, calc(100vw - 32px));
    padding: 16px 18px;
    border-left: 5px solid var(--food-yellow);
    color: #fff;
    background: #151311;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .2s ease, transform .2s ease;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.cart-notification::before { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; content: "✓"; color: #151311; background: var(--food-yellow); font-size: 12px; font-weight: 950; }
.cart-notification.is-visible { opacity: 1; transform: translateY(0); }

.order-thanks { position: fixed; inset: 0; width: min(360px, calc(100vw - 32px)); max-width: none; max-height: min(78vh, 520px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 2px; color: #151311; background: #fffaf1; box-shadow: 0 28px 90px rgba(0,0,0,.38); }
.order-thanks::backdrop { background: rgba(13,11,9,.78); backdrop-filter: blur(4px); }
.order-thanks-content { position: relative; padding: clamp(26px, 6vw, 38px) 24px; text-align: center; }
.order-thanks-content::before { position: absolute; inset: 0 0 auto; height: 8px; content: ""; background: var(--food-yellow); }
.order-thanks-kicker { margin: 0 0 14px; color: var(--food-red); font-size: 10px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.order-thanks h2 { margin: 0 0 12px; color: #151311; font-size: clamp(1.7rem, 7vw, 2.5rem); font-weight: 950; line-height: .95; letter-spacing: -.065em; text-transform: uppercase; }
.order-thanks p:not(.order-thanks-kicker) { margin-bottom: 22px; color: #625b54; }
.order-thanks-close { margin-left: 10px; padding: 11px 16px; border: 1px solid #cfc7bc; background: transparent; font-weight: 800; cursor: pointer; }

@media (max-width: 640px) {
    .menu-header { align-items: flex-start; flex-direction: column; }
    .menu-cart-link { align-self: stretch; text-align: center; }
    .menu-toolbar { gap: 14px; margin-bottom: 22px; }
    .menu-search { flex-basis: 100%; }
    .category-list { flex-wrap: nowrap; width: 100%; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; }
    .category-list button { flex: 0 0 auto; }
    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .category-list button, .menu-card, .cart-notification { transition: none; }
}
