:root {
    --red: #d71920;
    --red-dark: #a90f15;
    --ink: #1f2328;
    --muted: #6b7280;
    --line: #eceff3;
    --soft: #fff5f5;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fafafa;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(18px, 5vw, 64px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.topbar h1,
.topbar p {
    margin: 0;
}

.eyebrow {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.cart-link,
.primary-btn,
.ghost-btn,
.add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.cart-link {
    gap: 8px;
}

.cart-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.cart-link,
.primary-btn,
.add-btn {
    color: var(--white);
    background: var(--red);
}

.cart-link #cartCount {
    min-width: 24px;
    padding: 2px 7px;
    color: var(--red);
    text-align: center;
    border-radius: 999px;
    background: var(--white);
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero {
    display: flex;
    align-items: end;
    min-height: 230px;
    padding: clamp(24px, 5vw, 48px);
    color: var(--white);
    border-radius: 8px;
    background:
        linear-gradient(100deg, rgba(145, 0, 8, 0.86), rgba(215, 25, 32, 0.62)),
        url("https://images.unsplash.com/photo-1551218808-94e220e084d2?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.hero h2 {
    max-width: 620px;
    margin: 8px 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 0.95;
}

.hero p:last-child {
    max-width: 520px;
    margin: 0;
    color: #ffe5e5;
}

.hero .eyebrow {
    color: #ffffff;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 12px;
    margin: 24px 0;
}

.menu-section {
    margin-top: 30px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-head h2,
.section-head p {
    margin: 0;
}

.section-head h2 {
    font-size: 26px;
}

.section-count {
    color: var(--red);
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    font: inherit;
}

textarea {
    min-height: 110px;
    padding-top: 12px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}

.menu-card,
.order-panel,
.success-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(31, 35, 40, 0.06);
}

.menu-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.menu-thumb {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    color: var(--red);
    font-size: 72px;
    font-weight: 900;
    background: var(--soft);
}

.menu-thumb.image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.menu-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.menu-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-height: 70px;
}

.menu-head h3 {
    margin: 4px 0 0;
    font-size: 19px;
    line-height: 1.18;
}

.menu-head strong {
    color: var(--red);
    white-space: nowrap;
}

.category {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.menu-content p {
    min-height: 74px;
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.28;
}

.menu-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    min-height: 56px;
}

.stock {
    font-size: 13px;
    font-weight: 800;
}

.ready {
    color: #087443;
}

.empty {
    color: var(--muted);
}

.add-btn:disabled {
    cursor: not-allowed;
    background: #c9cdd3;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    transform: translateY(16px);
    padding: 14px 18px;
    color: var(--white);
    border-radius: 8px;
    opacity: 0;
    background: var(--red-dark);
    transition: 0.2s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.order-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 18px;
}

.order-panel {
    padding: 24px;
}

.order-panel h2 {
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 700;
}

.primary-btn {
    width: 100%;
    margin-top: 14px;
}

.ghost-btn {
    width: 100%;
    color: var(--red);
    border: 1px solid #ffd0d0;
    background: var(--soft);
}

.payment-note,
.empty-state {
    color: var(--muted);
}

.order-items {
    display: grid;
    gap: 12px;
}

.order-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.order-row span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qty-control button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 22px 0;
    font-size: 22px;
}

.order-total strong,
.receipt-total {
    color: var(--red);
    font-weight: 900;
}

.success-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 18px;
}

.success-card {
    width: min(520px, 100%);
    padding: 34px;
    text-align: center;
}

.success-card h1 {
    margin-bottom: 8px;
}

.order-number-box {
    display: inline-grid;
    gap: 4px;
    min-width: 150px;
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid #ffd0d0;
    border-radius: 8px;
    background: var(--soft);
}

.order-number-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.order-number-box strong {
    color: var(--red);
    font-size: 34px;
    line-height: 1;
}

.receipt-total {
    margin: 18px 0 10px;
    font-size: 34px;
}

@media (max-width: 760px) {
    .toolbar,
    .order-layout,
    .order-row {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-link {
        width: 100%;
    }
}
