/* ==========================================================================
   Conte D'Rei — menu pages (food, drinks, wines). Loaded after style.css / ementa.css.
   Header and footer follow contedrei.com; the menu is built for scanning on a phone:
   sticky section tabs, big serif section titles, dotted leaders from dish to price.
   ========================================================================== */

:root {
    --door:       #073c25;   /* the green door, brand green */
    --door-deep:  #052a1a;
    --brass:      #f2b97b;   /* brand dourado: accents and focus only */
    --paper:      #ffffff;
    --ink:        #17241c;
    --muted:      #5b6a60;
    --hair:       rgba(7, 60, 37, .14);

    --serif: "Abhaya Libre", Georgia, "Times New Roman", serif;
    --cream: #ffffff;        /* style.css uses --cream for page and hero text */
    --line:  var(--hair);
}

body { background: var(--paper); color: var(--ink); }

/* ---- Header: solid brand green like the homepage, so the white logo shows ---- */
#navbar, #navbar.scrolled {
    background: var(--door);
    border-bottom: 1px solid rgba(242, 185, 123, .22);
    backdrop-filter: none;
    box-shadow: none;
}
.nav-link { color: #fff; font-weight: 500; letter-spacing: .14em; }
.nav-link::after { background: var(--brass); }
.nav-link:hover { color: var(--brass); }
.nav-dropdown-item:hover { color: var(--door); }
.hamburger span { background: #fff; }
.lang-btn { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
/* Invisible bridge over the gap between the menu link and its dropdown */
.nav-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 1.6rem; }
/* Hidden side panels only cast a shadow when open */
.lang-panel:not(.open), .mobile-menu:not(.open) { box-shadow: none; }

/* ---- Title band: compact, so the menu starts on the first screen ---- */
.page-hero {
    background: var(--door);
    padding: calc(var(--nav-h, 64px) + 2.4rem) 1.5rem 2.6rem;
}
.page-hero-bg, .hero-badge { display: none; }
.page-hero h1 {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1;
    letter-spacing: -.01em;
    margin: 0 0 .6rem;
}
.page-hero p {
    font-family: var(--sans);
    font-size: .95rem;
    color: rgba(255, 255, 255, .78);
    max-width: 34rem;
    margin: 0 auto;
}

/* ---- Section tabs (built by contedrei-menu.js) ---- */
.section-tabs {
    position: sticky;
    top: var(--nav-h, 64px);
    z-index: 900;
    background: var(--paper);
    border-bottom: 1px solid var(--hair);
}
.section-tabs-list {
    display: flex;
    gap: .5rem;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: .75rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.section-tabs-list::-webkit-scrollbar { display: none; }
/* Centred when the tabs fit; when they overflow (phones) the auto margins collapse and the row scrolls from the first tab */
.section-tabs a:first-child { margin-left: auto; }
.section-tabs a:last-child { margin-right: auto; }
.section-tabs a {
    flex: 0 0 auto;
    font-family: var(--sans);
    font-size: .84rem;
    font-weight: 500;
    color: var(--door);
    padding: .45rem 1rem;
    border: 1px solid rgba(7, 60, 37, .25);
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.section-tabs a:hover { border-color: var(--door); }
.section-tabs a.is-active { background: var(--door); border-color: var(--door); color: #fff; }
.section-tabs a:focus-visible, .menu-item a:focus-visible, .footer a:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* ---- Page body ---- */
.ementa-main, .bebidas-main, .carta-vinhos-main { background: var(--paper); padding: 2rem 0 1rem; }
.container { max-width: 1100px; }
.divider-ornament, .ementa-intro > p, .bebidas-intro > p { display: none; }
.ementa-intro, .bebidas-intro { margin: 0 auto 2.4rem; text-align: center; }
.allergen-note {
    display: inline-block;
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--sans);
    font-size: .8rem;
    color: var(--muted);
}
.allergen-note i { display: none; }

/* Sections: a big serif title does the structuring; no rules, no ornaments */
.menu-section, .wine-section {
    margin: 0 0 3.6rem;
    padding: 0;
    border: 0;
    scroll-margin-top: calc(var(--nav-h, 64px) + 4.2rem);
}
.menu-section-header { text-align: left; margin: 0 0 1.3rem; padding: 0; border: 0; }
.section-label, .title-underline { display: none; }
.menu-section-title {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.4vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--door);
    margin: 0;
}

/* Items: name ····· price, description underneath */
.menu-grid, .menu-grid-4 { gap: 1.15rem 4rem; }
.menu-item {
    gap: .55rem;
    padding: 0;
    border: 0;
}
.menu-item::before { display: none; }
.menu-item-info h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: .4rem;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.16rem;
    line-height: 1.3;
    color: var(--ink);
    margin: 0 0 .15rem;
}
.menu-item-info h3::after, .wine-name::after {
    content: "";
    flex: 1 1 1.5rem;
    min-width: 1.5rem;
    border-bottom: 1.5px dotted rgba(23, 36, 28, .32);
    transform: translateY(-.28em);
}
/* No price (e.g. market price): no leader running into empty space */
.menu-item:not(:has(.menu-price-row)) .menu-item-info h3::after { display: none; }
.menu-item-info p {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 34em;
}
.menu-price { align-self: flex-start; gap: .2rem; }
.menu-price-row {
    font-family: var(--sans);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    color: var(--door);
    gap: .2rem;
}
.currency { font-size: .85em; color: var(--door); font-weight: 600; }
.menu-price-row i { color: var(--muted); }
.menu-tag {
    background: none;
    border: 1px solid var(--hair);
    color: var(--muted);
    font-family: var(--sans);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: .72rem;
}
.menu-item.compact .menu-item-info h3 { font-size: 1.08rem; }
/* Short lists (spirits, beers, coffee): tighter rows */
.menu-item.compact { padding-bottom: 0; }
.menu-grid:has(.menu-item.compact) { row-gap: .5rem; }

/* Gluten-free icon (the printed menu's crossed wheat) and its legend */
.gf-icon { display: inline-flex; flex: 0 0 auto; width: 1.05em; height: 1.05em; color: var(--door); transform: translateY(.12em); }
.gf-icon svg { width: 100%; height: 100%; stroke-width: 1.05; }
.gf-legend {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--sans); font-size: .85rem; color: var(--muted);
    margin: 0 0 3rem;
}
.gf-legend .gf-icon { width: 1.4em; height: 1.4em; transform: none; }

/* Wine list: region as a quiet label, wine ····· price */
.wine-region-group { margin-bottom: 1.6rem; }
.wine-region-heading {
    font-family: var(--sans);
    font-style: normal;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--muted);
    border-bottom: 1px solid var(--hair);
    padding-bottom: .35rem;
    margin-bottom: .9rem;
}
.wine-grid { gap: .9rem 4rem; }
.wine-card {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: .55rem;
    align-items: baseline;
    padding: 0;
    border: 0;
    background: none;
}
.wine-card::before { display: none; }
.wine-card > * { grid-column: 1; }
.wine-card > .wine-prices { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; padding: 0; gap: .3rem; min-width: 0; }
.wine-name {
    display: flex; align-items: baseline; gap: .4rem;
    font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--ink); margin: 0;
}
.wine-description, .wine-details { font-family: var(--serif); font-size: .98rem; color: var(--muted); margin: .1rem 0 0; }
.wine-price-glass, .wine-price-bottle {
    font-family: var(--sans); font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; color: var(--door);
}

/* Footer stays brand green like the homepage footer */
.footer { background: var(--door); }

@media (max-width: 760px) {
    .page-hero { padding-bottom: 2rem; }
    .section-tabs-list { padding: .65rem 1.1rem; }
    .menu-grid, .menu-grid-4, .wine-grid { grid-template-columns: 1fr; gap: 1.05rem; }
    .menu-section, .wine-section { margin-bottom: 2.8rem; }
    .menu-item-info h3, .wine-name { font-size: 1.08rem; }
    .menu-item-info p { font-size: .96rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .section-tabs a { transition: none; }
}
