/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2933 0, #050608 55%);
    color: #111;
    line-height: 1.5;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px 16px;
}

.menu-wrapper {
    width: 100%;
    max-width: 540px;
    background: #f9fafb;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 18px 16px 26px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.7);
    position: relative;
    backdrop-filter: blur(16px);
}

/* TOP: language + selected */
.top-strip {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(to bottom, #f9fafb 75%, rgba(249, 250, 251, 0.92));
    padding-bottom: 10px;
}

.lang-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.brand-mini {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #4b5563;
    font-weight: 600;
}

.lang-switch {
    display: inline-flex;
    gap: 4px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-weight: 500;
    transition: background 0.18s ease-out, color 0.18s ease-out, transform 0.1s ease-out;
}

.lang-btn:hover {
    background: #f3f4f6;
}

.lang-btn:active {
    transform: scale(0.97);
}

.lang-btn.active {
    background: #111827;
    color: #f9fafb;
}

/* Selected items bar */
.selected-bar {
    padding: 9px 10px 8px;
    border-radius: 11px;
    border: 1px dashed #d1d5db;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(243, 244, 246, 0.7);
}

.selected-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.selected-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #6b7280;
    margin-bottom: 4px;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 18px;
}

.selected-pill {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #10b981;
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: #ecfdf5;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}

.selected-empty {
    font-size: 11px;
    color: #c4c4c4;
}

.selected-total-pill {
    min-width: 90px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(to right, #f97316, #ea580c);
    color: #f9fafb;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(248, 113, 22, 0.35);
    white-space: nowrap;
}

/* HEADER */
.menu-header {
    text-align: center;
    margin: 16px 0 14px;
}

.menu-title {
    font-size: 20px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    color: #111827;
}

.menu-subtitle {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.menu-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

/* SECTION LABELS */
.section-label {
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #6b7280;
    margin-top: 8px;
    margin-bottom: 4px;
}

.divider {
    border-top: 1px solid #e5e7eb;
    margin: 6px 0 12px;
}

/* CATEGORY CARD */
.category-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 11px 13px 6px;
    margin-bottom: 13px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.category-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.category-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #374151;
}

.category-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, #111827, #4b5563);
}

/* MENU ITEM + SELECT */
.menu-item {
    padding: 8px 0;
    border-top: 1px solid #f3f4f6;
    display: flex;
    /* Changed from grid to flex for better control */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.menu-item:first-of-type {
    border-top: none;
}

.menu-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.item-price {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.item-desc {
    font-size: 12px;
    color: #6b7280;
}

/* SELECT CHECKBOX */
.item-select label {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid #d1d5db;
    background: radial-gradient(circle at top, #ffffff 0, #f3f4f6 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: transparent;
    cursor: pointer;
    transition:
        background 0.16s ease-out,
        border-color 0.16s ease-out,
        transform 0.1s ease-out,
        box-shadow 0.16s ease-out,
        color 0.16s ease-out;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12);
}

.item-select label:hover {
    border-color: #9ca3af;
}

.item-select input {
    display: none;
}

.item-select input:checked+label {
    background: radial-gradient(circle at top, #111827 0, #020617 80%);
    color: #f9fafb;
    border-color: #020617;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.45);
    transform: translateY(0.5px);
}

.item-select input:checked+label::before {
    content: "✓";
}

.menu-footer {
    margin-top: 18px;
    padding-top: 11px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}

@media (min-width: 768px) {
    .page {
        padding: 32px 24px;
    }

    .menu-wrapper {
        padding: 22px 22px 30px;
    }
}