:root {
    --ink: #1f2121;
    --ink-soft: #2a2928;
    --paper: #1f2121;
    --panel: #353535;
    --muted: #7b7168;
    --line: #e3d7c8;
    --gold: #b7976f;
    --gold-dark: #8f704b;
    --danger: #b84431;
    --shadow: 0 18px 44px rgba(24, 22, 20, .18);
    --topbar-height: 116px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: #f7f1ea;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button {
    font: inherit;
}

.menu-shell {
    min-height: 100vh;
    padding-bottom: 80px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(31, 33, 33, .96);
    border-bottom: 1px solid rgba(183, 151, 111, .28);
    backdrop-filter: blur(18px);
}

.topbar.hidden,
.home-screen.hidden,
.catalog.hidden,
.hidden,
.state-panel.hidden {
    display: none;
}

.topbar-inner,
.menu-content {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.topbar-inner {
    padding: 14px 16px 10px;
    transition: padding .2s ease;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-height: 52px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .22s ease, opacity .18s ease, transform .22s ease;
}

.topbar.compact .topbar-inner {
    padding-top: 8px;
    padding-bottom: 8px;
}

.topbar.compact .brand-row {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.home-screen {
    min-height: 100vh;
    padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
}

.home-hero {
    display: grid;
    place-items: center;
    min-height: min(52svh, 480px);
    margin: -18px -16px 16px;
    padding: 42px 18px 34px;
    align-content: end;
    background: linear-gradient(transparent 20%, rgba(16, 19, 20, .88)),
        var(--ink) url("../assets/sirius-courtyard.jpg") center 40% / cover no-repeat;
    color: #fff;
    text-align: center;
}

.home-title {
    margin: 0;
    font: 500 76px/.95 Georgia, serif;
}

.category-heading h3 {
    font-family: Georgia, serif;
}

.home-logo {
    width: min(270px, 72vw);
    height: auto;
    display: block;
}

.home-hero p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    font-weight: 650;
}

.language-switcher,
.home-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(183, 151, 111, .38);
    border-radius: 8px;
    background: #353535;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.home-language-switcher {
    flex: 0 0 auto;
}

.home-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.service-charge-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(183, 151, 111, .46);
    border-radius: 8px;
    background: rgba(183, 151, 111, .12);
    color: var(--gold);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    white-space: nowrap;
}

.service-charge-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-size: 11px;
    font-weight: 950;
}

.language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 32px;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: rgba(247, 241, 234, .7);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
}

.language-link.active {
    background: var(--gold);
    color: #1f2121;
    box-shadow: 0 6px 14px rgba(183, 151, 111, .24);
}

.group-picker {
    display: grid;
    gap: 12px;
}

.group-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 210px;
    overflow: hidden;
    border: 8px solid #343434;
    border-radius: 18px;
    background: #343434;
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}

.group-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .9;
}

.group-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(31, 33, 33, .04) 0%, rgba(31, 33, 33, .12) 58%, rgba(31, 33, 33, .7) 100%);
}

.group-card-body {
    position: relative;
    z-index: 1;
    width: calc(100% + 16px);
    margin: 0 -8px -8px;
    padding: 14px 15px 18px;
    background: rgba(49, 49, 49, .82);
    text-align: center;
    backdrop-filter: blur(8px);
}

.group-card-title {
    display: block;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 850;
}

.group-card-count {
    display: none;
    margin-top: 7px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.group-tabs,
.category-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.group-tabs::-webkit-scrollbar,
.category-rail::-webkit-scrollbar {
    display: none;
}

.group-tabs {
    margin-top: 14px;
    padding-bottom: 2px;
    transition: margin .2s ease;
}

.topbar.compact .group-tabs {
    margin-top: 0;
}

.group-tab,
.category-tab {
    border: 1px solid rgba(183, 151, 111, .28);
    border-radius: 8px;
    background: #353535;
    color: rgba(247, 241, 234, .72);
    cursor: pointer;
    white-space: nowrap;
    transition: .18s ease;
}

.group-tab {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 850;
}

.group-tab.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 9px 22px rgba(32, 32, 32, .18);
}

.catalog {
    padding: 0 16px;
}

.group-section {
    display: none;
}

.group-section.active {
    display: block;
}

.category-overview {
    padding: 18px 0 24px;
}

.category-overview-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.category-overview-heading h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.12;
}

.category-overview-heading .heading-note {
    color: rgba(247, 241, 234, .66);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.category-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 170px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #353535;
    color: #fff;
    cursor: pointer;
    text-align: left;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .78;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(53, 53, 53, .06) 0%, rgba(53, 53, 53, .16) 46%, rgba(31, 33, 33, .88) 100%);
}

.category-card-body {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 12px;
}

.category-card-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.16;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category-card-count {
    display: block;
    margin-top: 6px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 850;
}

.category-sticky {
    position: sticky;
    top: var(--topbar-height);
    z-index: 10;
    margin: 0 -16px;
    padding: 10px 16px;
    background: rgba(31, 33, 33, .96);
    border-bottom: 1px solid rgba(183, 151, 111, .28);
    backdrop-filter: blur(16px);
}

.category-tab {
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 800;
}

.category-tab.active {
    background: rgba(183, 151, 111, .16);
    border-color: rgba(183, 151, 111, .6);
    color: var(--gold);
}

.category-block {
    padding-top: 22px;
    scroll-margin-top: calc(var(--topbar-height) + 58px);
}

.category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.category-heading h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
}

.category-heading .heading-note {
    color: rgba(247, 241, 234, .7);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 390px) {
    .home-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .home-language-switcher,
    .home-controls .service-charge-badge {
        align-self: flex-start;
    }

    .category-overview-heading,
    .category-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

}

@media (max-width: 679px) {
    .brand-row .service-charge-badge {
        min-height: 30px;
        gap: 5px;
        padding: 5px 8px;
        font-size: 11px;
    }

    .brand-row .service-charge-icon {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 238px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #353535;
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}

.product-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #353535;
}

.product-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(53, 53, 53, .08) 0%, rgba(53, 53, 53, .16) 48%, rgba(31, 33, 33, .86) 100%);
}

.product-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 108px;
    gap: 7px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(31, 33, 33, 0), rgba(31, 33, 33, .36));
}

.product-title-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.18;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-price {
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
}

.new-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 4px 7px;
    border-radius: 8px;
    background: rgba(183, 151, 111, .94);
    color: #1f2121;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .22);
}

.state-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    padding: 24px;
    background: var(--ink);
    color: #fff;
    text-align: center;
}

.loader {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, .22);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    background: rgba(20, 19, 18, .48);
}

.modal-backdrop.open {
    display: block;
    touch-action: none;
}

.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 50;
    width: min(88vw, 440px);
    max-height: 86vh;
    overflow: auto;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(20, 19, 18, .36);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -46%) scale(.96);
    transition: transform .2s ease, opacity .2s ease;
    overscroll-behavior: contain;
}

.product-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.modal-image {
    width: 100%;
    height: min(45vh, 320px);
    object-fit: cover;
    background: #eee6dc;
}

.modal-body {
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
}

.modal-kicker {
    margin: 0 0 8px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.modal-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.14;
}

.modal-price {
    margin-top: 14px;
    color: var(--gold-dark);
    font-size: 18px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.modal-meta {
    display: none;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.modal-meta span {
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbf8f3;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.modal-description {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 8px;
    background: rgba(32, 32, 32, .74);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 680px) {
    .topbar-inner {
        padding: 18px 24px 14px;
    }

    .home-screen,
    .catalog {
        padding-right: 24px;
        padding-left: 24px;
    }

    .home-hero {
        min-height: min(58svh, 540px);
        margin-right: -24px;
        margin-left: -24px;
    }

    .group-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .category-sticky {
        margin-right: -24px;
        margin-left: -24px;
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (min-width: 1020px) {
    .category-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Sirius entrance and menu styling */
:root {
    --gold: #d5b17c;
    --paper: #171a19;
    --panel: #232725;
}

.menu-content:has(.home-screen:not(.hidden)) {
    width: 100%;
}

.home-screen {
    padding-inline: 0;
}

.home-hero {
    min-height: 168px;
    margin: -18px 0 0;
    padding: 14px 16px;
    gap: 5px;
    align-content: center;
    background-position: center, center 34%;
    background-image: linear-gradient(180deg, rgba(15, 19, 18, .35), rgba(23, 26, 25, .88)),
        url("../assets/sirius-courtyard.jpg");
    background-size: cover;
}

.hero-kicker {
    font-size: 12px;
    font-weight: 800;
    color: #ffdfac;
    text-shadow: 0 1px 12px #000;
}

.home-title {
    font-size: 58px;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .34);
}

.hero-rule {
    width: 48px;
    height: 1px;
    background: var(--gold);
}

.home-controls,
.group-picker {
    width: min(100% - 32px, 1040px);
    margin-inline: auto;
}

.home-controls {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 8px 10px;
}

.group-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.group-card {
    min-height: 126px;
    border: 1px solid rgba(213, 177, 124, .34);
    border-radius: 8px;
    padding: 0;
}

.group-card::after {
    background: linear-gradient(180deg, transparent 20%, rgba(13, 16, 15, .92));
}

.group-card-body {
    width: auto;
    margin: 0;
    width: 100%;
    padding: 10px 32px 10px 10px;
    background: none;
    backdrop-filter: none;
    text-align: left;
}

.group-card-title,
.category-heading h3,
.modal-title {
    font-family: Georgia, serif;
    font-weight: 500;
}

.group-card-title {
    font-size: 22px;
    overflow-wrap: anywhere;
}

.group-card-arrow {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    color: var(--gold);
    font-size: 17px;
}

.home-back {
    flex: 0 0 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(213, 177, 124, .34);
    border-radius: 8px;
    background: var(--panel);
    color: var(--gold);
    cursor: pointer;
    font-size: 21px;
}

.brand-row {
    gap: 6px;
}

.brand-row .service-charge-icon {
    display: none;
}

.brand-row .language-link {
    min-width: 29px;
    padding-inline: 5px;
}

.topbar,
.category-sticky {
    background: #1d211f;
}

.group-tab.active {
    color: #171a19;
}

.category-block + .category-block {
    margin-top: 18px;
    border-top: 1px solid rgba(213, 177, 124, .24);
}

.category-heading h3 {
    font-size: 28px;
}

.product-card {
    border-radius: 8px;
    border: 1px solid rgba(213, 177, 124, .18);
    background: var(--panel);
}

.product-price,
.modal-price {
    color: var(--gold);
    white-space: normal;
    overflow-wrap: anywhere;
}

.modal-description {
    color: #ddd8cf;
}

.modal-meta span {
    background: #303632;
    color: #eee4d6;
}

.state-panel {
    position: static;
    padding: 24px 16px;
    background: transparent;
}

.state-panel.error .loader {
    display: none;
}

button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -3px;
}

@media (min-width: 680px) {
    .home-hero {
        min-height: 200px;
    }

    .home-title {
        font-size: 70px;
    }

    .group-card {
        min-height: 156px;
    }

    .group-card-title {
        font-size: 26px;
    }
}
