/* --- Menu Page Styles --- */
/* Categories are parchment cards like the printed menu. With JavaScript the
   tabs show one category at a time; without it all categories are listed. */

.menu-page {
    --paper: #efe3c8;
    --paper-line: rgba(43, 36, 24, 0.22);
    --ink: #2b2418;
    --ink-soft: #5b5040;
    --menu-width: 960px; /* tabs and card share this width and are centred */
}

/* --- Category tabs --- */
.menu-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    max-width: var(--menu-width);
    margin: 0 auto 1.5rem;
}

.menu-tabs a {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--foam);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    white-space: nowrap;
}

.menu-tabs a:hover {
    border-color: var(--mustard);
    color: var(--foam);
    text-decoration: none;
}

.menu-tabs a[aria-current="true"] {
    background: var(--mustard);
    border-color: var(--mustard);
    color: var(--abyss);
}

/* Phones: one scrollable row of tabs instead of several lines */
@media (max-width: 640px) {
    .menu-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start; /* centring would cut off the first tabs when scrolling */
        overflow-x: auto;
        padding-bottom: 0.4rem;
        margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
        margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
        scrollbar-width: thin;
    }
}

/* --- Parchment category card --- */
.menu-categories {
    display: grid;
    gap: 1.5rem;
}

.menu-category {
    width: 100%;
    max-width: var(--menu-width);
    margin: 0 auto;
    background: var(--paper);
    color: var(--ink);
    border-radius: 16px;
    padding: 1.75rem 2rem 2rem;
    box-shadow: var(--shadow);
}

.menu-categories.has-tabs .menu-category:not(.is-active) {
    display: none;
}

.menu-category h2 {
    color: var(--ink);
    font-size: clamp(1.6rem, 4vw, 2rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.menu-note {
    color: var(--ink-soft);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.menu-section + .menu-section {
    margin-top: 1.5rem;
}

.menu-section h3 {
    color: var(--ink);
    font-size: 1.15rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--ink);
    margin: 1.25rem 0 0.25rem;
}

/* Every item: name and price on the first line (price always on the right),
   description underneath. */
.menu-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name prices"
        "desc .";
    column-gap: 1.25rem;
    row-gap: 0.15rem;
    align-items: baseline;
    padding: 0.7rem 0;
    border-bottom: 1px dotted var(--paper-line);
}

.menu-item:last-child { border-bottom: 0; }

.menu-item-main { display: contents; }

.menu-item-name {
    grid-area: name;
    font-weight: 700;
}

.menu-item-desc {
    grid-area: desc;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.menu-item-prices {
    grid-area: prices;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}

.menu-item-volume {
    font-weight: 500;
    color: var(--ink-soft);
}

@media (max-width: 560px) {
    .menu-category { padding: 1.25rem 1.1rem 1.5rem; border-radius: 12px; }

    /* Description may use the full width under the price */
    .menu-item {
        column-gap: 0.75rem;
        grid-template-areas:
            "name prices"
            "desc desc";
    }

    /* Two prices (0,3 l and 0,5 l) stack on the right */
    .menu-item-prices {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.1rem;
    }
}
