:root {
    --bg: #f4f0eb;
    --surface: #ffffff;
    --ink: #1a1a1a;
    --muted: #6b6560;
    --accent: #c41e3a;
    --header: #2b2b2b;
    --border: #e2dbd3;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "DM Sans", system-ui, sans-serif;
}

[hidden] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    padding-bottom: 88px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-header {
    background: var(--header);
    color: #fff;
    text-align: center;
    padding: 1.25rem 1rem 1rem;
}

.logo {
    margin: 0 auto;
    max-width: min(220px, 70vw);
    filter: brightness(0) invert(1);
}

.tagline {
    margin: 0.35rem 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.location-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.location-bar__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.location-select {
    flex: 1;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    background: var(--bg);
    color: var(--ink);
}

.category-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav__btn {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.category-nav__btn.is-active {
    background: var(--header);
    color: #fff;
    border-color: var(--header);
}

.main-content {
    padding: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.menu-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.menu-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--header);
    color: #fff;
}

.menu-category-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.02em;
}

.menu-prices-header {
    display: grid;
    grid-template-columns: 3.5rem 3.5rem;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    opacity: 0.9;
}

.menu-prices-header--single {
    grid-template-columns: 4.5rem;
}

.menu-items {
    padding: 0.25rem 0;
}

.menu-item {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item__body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.menu-item__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.menu-item__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.menu-item__badge {
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
}

.menu-item__desc {
    margin: 0.3rem 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.4;
}

.menu-item__prices {
    display: grid;
    grid-template-columns: 3.5rem 3.5rem;
    gap: 0.25rem;
    flex-shrink: 0;
}

.menu-item__prices--single {
    grid-template-columns: 4.5rem;
}

.price-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-height: 2.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 6px;
    padding: 0.35rem 0.25rem;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.price-btn:hover,
.price-btn:focus-visible {
    border-color: var(--header);
    background: #ebe6e0;
    outline: none;
}

.price-btn:active {
    transform: scale(0.97);
}

.price-btn__size {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.price-btn__amount {
    font-weight: 600;
    white-space: nowrap;
}

.cart-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
}

.cart-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: none;
    background: var(--header);
    color: #fff;
    font: inherit;
    font-weight: 600;
    padding: 1rem 1.25rem;
    cursor: pointer;
}

.cart-count {
    background: var(--accent);
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.cart-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    z-index: 30;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto;
}

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cart-drawer__header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
}

.btn-icon {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    padding: 0.25rem;
}

.cart-items {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.cart-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cart-item__qty button {
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.cart-empty {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.checkout-form {
    display: grid;
    gap: 0.75rem;
}

.checkout-form label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.checkout-form input,
.checkout-form textarea {
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
}

.btn-primary {
    border: none;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.25rem;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.order-feedback {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    min-height: 1.25rem;
}

.order-feedback.is-success {
    color: #1a7f4b;
}

.order-feedback.is-error {
    color: var(--accent);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 25;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.supplement-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto;
}

.supplement-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.supplement-panel__header .btn-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.supplement-panel__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.supplement-panel__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.supplement-list {
    flex: 1;
    overflow-y: auto;
}

.supplement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.supplement-row:last-child {
    border-bottom: none;
}

.supplement-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.supplement-row__name {
    font-weight: 600;
    font-size: 0.9rem;
}

.supplement-row__price {
    font-size: 0.8rem;
    color: var(--muted);
}

.supplement-row__qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.supplement-row__btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.supplement-row__btn:hover {
    background: #e2dbd3;
}

.supplement-row__count {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.supplement-confirm-btn {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .supplement-panel {
        left: auto;
        right: 1.5rem;
        width: 360px;
        border-radius: var(--radius);
        bottom: 1.5rem;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .menu-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .menu-item__body {
        grid-template-columns: 1fr;
    }

    .menu-item__prices,
    .menu-item__prices--single {
        justify-content: start;
    }
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .cart-panel {
        left: auto;
        right: 1.5rem;
        bottom: 1.5rem;
        width: 360px;
    }

    .cart-toggle {
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .cart-drawer {
        right: 1.5rem;
        left: auto;
        width: 360px;
        border-radius: var(--radius);
        bottom: calc(4.5rem + 1.5rem);
        max-height: 70vh;
    }
}
