:root {
    --gm-bg: #f7f5f0;
    --gm-surface: #ffffff;
    --gm-brand-text: #1c1b19;
    --gm-text: var(--gm-brand-text);
    --gm-muted: #5c5a54;
    --gm-accent: #b8860b;
    --gm-accent-soft: #f3ead4;
    --gm-border: #e8e4db;
    --gm-header-bg: rgba(255, 255, 255, 0.92);
    --gm-radius: 14px;
    --gm-shadow: 0 8px 30px rgba(28, 27, 25, 0.08);
    --gm-header-h: 4.25rem;
    --gm-toolbar-h: 3.35rem;
    --gm-tabs-h: 3.25rem;
    --gm-sticky-bar-h: calc(var(--gm-toolbar-h) + var(--gm-tabs-h) + 0.75rem);
    --gm-scroll-offset: calc(var(--gm-header-h) + var(--gm-sticky-bar-h) + 0.5rem);
    --gm-font: "DM Sans", system-ui, -apple-system, sans-serif;
    --gm-display: "Fraunces", Georgia, serif;
    --gm-media-fallback: linear-gradient(145deg, #ebe6dc, #f5f2eb);
}

html[data-gm-theme="dark"] {
    --gm-bg: #121110;
    --gm-surface: #1e1c1a;
    --gm-text: #f5f2eb;
    --gm-muted: #b8b2a8;
    --gm-border: #3d3834;
    --gm-header-bg: rgba(18, 17, 16, 0.94);
    --gm-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --gm-accent-soft: color-mix(in srgb, var(--gm-accent) 28%, var(--gm-surface));
    --gm-media-fallback: linear-gradient(145deg, #2a2724, #1a1816);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.guest-menu {
    margin: 0;
    font-family: var(--gm-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gm-text);
    background: var(--gm-bg);
    -webkit-font-smoothing: antialiased;
}

.gm-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--gm-header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gm-border);
}

.gm-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.gm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--gm-border);
    border-radius: 999px;
    background: var(--gm-surface);
    color: var(--gm-text);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

.gm-icon-btn__moon {
    display: none;
}

html[data-gm-theme="dark"] .gm-icon-btn__sun {
    display: none;
}

html[data-gm-theme="dark"] .gm-icon-btn__moon {
    display: inline;
}

.gm-sticky-sentinel {
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.gm-sticky-bar {
    position: sticky;
    top: var(--gm-header-h);
    z-index: 35;
    background: var(--gm-bg);
    margin: 0 -1rem 0.75rem;
    padding: 0.35rem 1rem 0.5rem;
    border-bottom: 1px solid transparent;
}

.gm-sticky-bar.is-pinned {
    border-bottom-color: var(--gm-border);
    box-shadow: 0 6px 16px rgba(28, 27, 25, 0.06);
}

html[data-gm-theme="dark"] .gm-sticky-bar.is-pinned {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.gm-toolbar {
    margin-bottom: 0.5rem;
}

.gm-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gm-surface);
    border: 1px solid var(--gm-border);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    box-shadow: var(--gm-shadow);
}

.gm-search__icon {
    color: var(--gm-muted);
    font-size: 1.125rem;
    line-height: 1;
}

.gm-search__input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    color: var(--gm-text);
    min-width: 0;
}

.gm-search__input:focus {
    outline: none;
}

.gm-search__input::placeholder {
    color: var(--gm-muted);
    opacity: 1;
}

.gm-search__input::-webkit-search-cancel-button {
    cursor: pointer;
}

.gm-hidden {
    display: none !important;
}

.gm-search-empty {
    text-align: center;
    color: var(--gm-muted);
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.gm-card.is-filtered-out,
.gm-section.is-filtered-out,
[data-gm-category-nav].is-filtered-out {
    display: none !important;
}

.gm-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--gm-header-h);
}

.gm-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.gm-brand__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}

.gm-brand__text {
    min-width: 0;
}

.gm-brand__title {
    margin: 0;
    font-family: var(--gm-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-brand__subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: var(--gm-muted);
}

.gm-lang {
    display: flex;
    border: 1px solid var(--gm-border);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}

.gm-lang a {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gm-muted);
    background: var(--gm-surface);
    transition: background 0.15s, color 0.15s;
}

.gm-lang a.is-active,
.gm-lang a:hover {
    color: var(--gm-text);
    background: var(--gm-accent-soft);
}

.gm-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.gm-layout {
    display: grid;
    gap: 1.25rem;
}

.gm-tabs {
    padding: 0 0 0.25rem;
    margin: 0;
}

.gm-tabs__scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.gm-tabs__scroll::-webkit-scrollbar {
    display: none;
}

.gm-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--gm-border);
    border-radius: 999px;
    background: var(--gm-surface);
    color: var(--gm-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}

.gm-tab img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
}

.gm-tab.is-active {
    border-color: var(--gm-accent);
    background: var(--gm-accent-soft);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.15);
}

.gm-sidebar {
    display: none;
}

.gm-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.gm-section {
    scroll-margin-top: var(--gm-scroll-offset);
}

.gm-section__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gm-section__head img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
}

.gm-section__title {
    margin: 0;
    font-family: var(--gm-display);
    font-size: 1.5rem;
    font-weight: 600;
}

.gm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.gm-card {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background: var(--gm-surface);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    box-shadow: var(--gm-shadow);
}

.gm-card__media {
    flex: 0 0 108px;
    width: 108px;
    min-height: 108px;
    background: var(--gm-media-fallback);
    position: relative;
}

.gm-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gm-card__body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.85rem 0.85rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gm-card__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.gm-card__name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
}

.gm-card__price {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--gm-accent);
    font-size: 0.95rem;
    white-space: nowrap;
}

.gm-card__prices--dual {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.gm-price-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--gm-accent);
    font-size: 0.85rem;
    white-space: nowrap;
}

.gm-price-chip--glass {
    font-size: 0.8rem;
    color: var(--gm-muted);
    font-weight: 600;
}

.gm-price-chip__label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gm-muted);
}

.gm-card__desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gm-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gm-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gm-muted);
    font-size: 0.9375rem;
}

.gm-footer {
    text-align: center;
    padding: 2rem 1rem 2.5rem;
    font-size: 0.8125rem;
    color: var(--gm-muted);
}

@media (min-width: 640px) {
    .gm-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gm-card {
        flex-direction: column;
    }

    .gm-card__media {
        flex: none;
        width: 100%;
        min-height: 160px;
    }

    .gm-card__body {
        padding: 1rem;
    }
}

@media (min-width: 1024px) {
    body.guest-menu {
        --gm-sticky-bar-h: calc(var(--gm-toolbar-h) + 0.5rem);
        --gm-scroll-offset: calc(var(--gm-header-h) + var(--gm-sticky-bar-h) + 0.75rem);
    }

    .gm-tabs {
        display: none;
    }

    .gm-layout {
        grid-template-columns: 260px 1fr;
        align-items: start;
    }

    .gm-sidebar {
        display: block;
        position: sticky;
        top: calc(var(--gm-header-h) + var(--gm-sticky-bar-h) + 0.35rem);
        background: var(--gm-surface);
        border: 1px solid var(--gm-border);
        border-radius: var(--gm-radius);
        padding: 0.75rem;
        box-shadow: var(--gm-shadow);
    }

    .gm-sidebar__label {
        font-size: 0.6875rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--gm-muted);
        margin: 0.25rem 0.5rem 0.5rem;
        font-weight: 600;
    }

    .gm-sidebar__nav {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        max-height: calc(100vh - var(--gm-header-h) - var(--gm-sticky-bar-h) - 2rem);
        overflow-y: auto;
    }

    .gm-sidebar__link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.55rem 0.65rem;
        border-radius: 10px;
        border: none;
        background: transparent;
        text-align: left;
        font: inherit;
        color: var(--gm-text);
        cursor: pointer;
        width: 100%;
        transition: background 0.15s;
    }

    .gm-sidebar__link:hover,
    .gm-sidebar__link.is-active {
        background: var(--gm-accent-soft);
    }

    .gm-sidebar__link img {
        width: 36px;
        height: 36px;
        object-fit: cover;
        border-radius: 8px;
    }

    .gm-section__head {
        display: none;
    }

    .gm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .gm-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
