/* Menu page editorial polish — loaded only by Views/Menu/Index.cshtml. */

/* ============================================================
   Hero — black canvas with bagel bleed (mirrors home hero so the
   two pages feel like one editorial system).
   ============================================================ */

.menu-hero {
    position: relative;
    overflow: hidden;
    background: var(--ink) url("../images/hero-bagel.png") no-repeat right center;
    background-size: cover;
    color: var(--cream);
    /* sticky header offset (~80px) + section padding */
    padding-top: calc(80px + var(--section-py));
    padding-bottom: var(--section-py);
    min-height: clamp(360px, 48vw, 560px);
}

.menu-hero .hero-text {
    max-width: 56%;
}

.menu-hero .eyebrow {
    color: color-mix(in oklch, var(--cream) 70%, transparent);
    margin-bottom: var(--sp-3);
}

.menu-hero .hero-stack {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-5);
    font-size: clamp(3rem, 11vw, 7.5rem);
}

.menu-hero .hero-stack > span { display: block; }
.menu-hero .hero-stack .line-1 { color: var(--cream); }
.menu-hero .hero-stack .line-2 { color: var(--ember); }

.menu-hero .hero-lede {
    max-width: 48ch;
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    color: color-mix(in oklch, var(--cream) 85%, transparent);
    margin: 0;
}

@media (max-width: 900px) {
    .menu-hero {
        background-size: cover;
        background-position: 65% center;
        padding-bottom: var(--section-py);
    }
    .menu-hero .hero-text { max-width: 100%; }
    .menu-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            115deg,
            var(--ink) 0%,
            color-mix(in oklch, var(--ink) 70%, transparent) 55%,
            color-mix(in oklch, var(--ink) 30%, transparent) 100%
        );
        pointer-events: none;
        z-index: 0;
    }
    .menu-hero > .container { position: relative; z-index: 1; }
}

@media (max-width: 600px) {
    .menu-hero { background-position: 70% center; }
}

/* ============================================================
   Sub-nav strip — anchor-link tiles to each category section
   ============================================================ */

.menu-subnav {
    background: var(--ink);
    padding-block: var(--sp-6);
    /* Account for sticky header when jump-scrolling to anchored sections. */
    scroll-margin-top: 96px;
}

.subnav-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* Auto-fit so all tiles share the same width and wrap evenly */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--sp-3);
    max-width: 980px;
    margin-inline: auto;
}

.subnav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-2);
    border: 1px solid color-mix(in oklch, var(--stone) 22%, transparent);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--cream);
    text-decoration: none;
    text-align: center;
    min-height: 100px;
    transition:
        transform var(--dur-base) var(--ease-out),
        border-color var(--dur-base) var(--ease-out),
        background-color var(--dur-base) var(--ease-out),
        color var(--dur-base) var(--ease-out);
}

.subnav-tile:hover,
.subnav-tile:focus-visible {
    transform: translateY(-3px);
    border-color: var(--ember);
    background: color-mix(in oklch, var(--ember) 12%, transparent);
    color: var(--cream);
    text-decoration: none;
}

.subnav-tile:hover .subnav-icon,
.subnav-tile:focus-visible .subnav-icon {
    color: var(--ember);
}

/* Icon is now an inline SVG — fixed visual size, currentColor stroke so the
   tile's hover state cascades cleanly. */
.subnav-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--cream);
    transition: color var(--dur-base) var(--ease-out);
}

.subnav-label {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8125rem;
    line-height: 1.25;
    /* Allow up to two lines on narrow tiles without breaking the row */
    word-break: break-word;
    hyphens: auto;
}

@media (max-width: 640px) {
    .menu-subnav { padding-block: var(--sp-4); }
    .subnav-tiles {
        /* On phones use a 3-up grid with smaller tiles so they all fit nicely */
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-2);
        max-width: none;
    }
    .subnav-tile {
        padding: var(--sp-3) var(--sp-1);
        gap: var(--sp-1);
        min-height: 84px;
    }
    .subnav-icon { width: 28px; height: 28px; }
    .subnav-label {
        font-size: 0.6875rem;
        letter-spacing: 0.06em;
    }
}

@media (max-width: 380px) {
    .subnav-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Category section separator — thin ember rule between categories.
   scroll-margin-top keeps subnav jump-links from tucking the title
   under the sticky header. */
.menu-category {
    position: relative;
    scroll-margin-top: 96px;
}

.menu-category + .menu-category::before {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--ember);
    margin: 0 auto var(--sp-8);
}

/* Section heading (BAGELS, SCHMEARS, etc.) with flanking ember marks.
   max-width + word-break let long Toast category names like
   "BAGELS/BUNDLES/DOZENS" wrap on narrow viewports instead of overflowing. */
.menu-category > .page-section-pt > .container > h2 {
    position: relative;
    display: table;
    padding-inline: var(--sp-6);
    margin: 0 auto var(--sp-6);
    font-size: clamp(2rem, 5vw, 3.25rem);
    max-width: 100%;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.menu-category > .page-section-pt > .container > h2::before,
.menu-category > .page-section-pt > .container > h2::after {
    content: "";
    position: absolute;
    top: 50%;
    width: var(--sp-4);
    height: 1px;
    background: color-mix(in oklch, var(--ember) 70%, transparent);
}

.menu-category > .page-section-pt > .container > h2::before { left: 0; }
.menu-category > .page-section-pt > .container > h2::after  { right: 0; }

/* Sub-category label — richer typography */
.menu-category .menu-sub-category-name {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream);
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-4);
}

/* Two-price banner row (Schmears "Bagel / 8oz") */
.menu-category .menu-box > .d-flex.align-items-center {
    border-bottom: 1px solid color-mix(in oklch, var(--stone) 40%, transparent);
    padding-bottom: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.menu-category .menu-box > .d-flex .menu-item-price {
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: var(--fs-sm);
    color: var(--ember);
}

/* Bottom CTA band */
.menu-order-cta {
    border-top: 1px solid color-mix(in oklch, var(--stone) 25%, transparent);
}

/* Center the bottom CTA cluster regardless of which markup the deployed
   Razor view ships with (legacy `.cluster` vs newer `.menu-order-cta__row`). */
.menu-order-cta .cluster,
.menu-order-cta__row {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    gap: var(--sp-4);
}

@media (max-width: 480px) {
    .menu-order-cta .cluster,
    .menu-order-cta__row {
        flex-direction: column;
        align-items: stretch;
    }
    .menu-order-cta .cluster > .btn-ib,
    .menu-order-cta__row > .btn-ib {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Menu rows — compact thumbnail-on-left layout used by the
   _MenuItemWithImage partial. Mobile-first: tight rows that show
   a lot of items per screen without ever rendering full-bleed
   400px photos for every single item.
   ============================================================ */

.menu-row {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    padding-block: var(--sp-3);
    border-bottom: 1px solid color-mix(in oklch, var(--stone) 14%, transparent);
}

.menu-row-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: color-mix(in oklch, var(--ink) 86%, var(--stone));
    border-radius: var(--radius-sm);
    padding: 4px;
}

.menu-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.menu-row-head {
    display: flex;
    gap: var(--sp-3);
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.menu-row-name {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1rem;
    line-height: 1.25;
    color: var(--cream);
    margin: 0;
}

.menu-row-new {
    display: inline-block;
    margin-left: var(--sp-2);
    background: var(--ember);
    color: var(--cream);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.menu-row-price {
    font-family: var(--font-display);
    color: var(--ember);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-row-desc {
    color: color-mix(in oklch, var(--cream) 65%, transparent);
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 0;
}

@media (min-width: 768px) {
    .menu-row { padding-block: var(--sp-4); gap: var(--sp-4); }
    .menu-row-thumb { width: 96px; height: 96px; }
    .menu-row-name { font-size: 1.0625rem; }
    .menu-row-price { font-size: 1rem; }
}

/* The category container wraps rows in `.grid grid-cols-1 grid-cols-lg-2`.
   Drop the bottom border on the last row of each grid column so the divider
   doesn't dangle below the section. */
.menu-category .grid > .menu-row:last-child {
    border-bottom: 0;
}

.menu-category .menu-item > .flex-shrink-0,
.menu-category .menu-item > .flex-grow-1 {
    min-width: 0;
}

.menu-category .menu-item > .flex-shrink-0.ms-3 {
    margin-inline-start: var(--sp-4);
    white-space: nowrap;
}
