:root {
    --bg: #f4f7f7;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #667085;
    --line: #dde5e7;
    --mint: #27d3bd;
    --mint-dark: #08786d;
    --coral: #ff6b4a;
    --sun: #f6c85f;
    --blue: #2f80ed;
    --violet: #7c5cff;
    --night: #121926;
    --shadow: 0 18px 46px rgba(17, 24, 39, 0.1);
    --radius: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.app-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 12px 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.menu-area,
.manager-panel,
.drawer-sheet,
.order-dialog {
    border: 1px solid rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.app-title,
.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-title strong,
.app-title span,
.brand-row strong,
.brand-row span {
    display: block;
}

.app-title strong,
.brand-row strong {
    font-family: Manrope, sans-serif;
    font-size: 1.25rem;
}

.app-title span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.store-panel {
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 240px auto auto 1fr;
    border-radius: 24px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--coral), var(--mint));
    font-family: Manrope, sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
}

.brand-row span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.store-photo {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.store-info {
    display: grid;
    gap: 10px;
    padding: 18px 18px 12px;
}

.status-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: var(--mint-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-pill {
    padding: 7px 10px;
    border-radius: 999px;
    color: #052f2b;
    background: #b8fff2;
}

.status-pill svg,
.eyebrow svg {
    width: 15px;
    height: 15px;
}

h1,
h2,
h3 {
    font-family: Manrope, Inter, sans-serif;
    letter-spacing: 0;
}

.store-info h1 {
    font-size: clamp(2.4rem, 5vw, 3.7rem);
    line-height: 0.92;
}

.store-info p {
    color: var(--muted);
    line-height: 1.48;
}

.store-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
}

.store-facts div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
}

.store-facts span,
.result-count,
.product-meta,
.manager-card span,
.cart-row span,
.totals span,
.note-field span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.store-facts strong {
    display: block;
    margin-top: 4px;
    font-size: 0.92rem;
}

.menu-area {
    min-width: 0;
    min-height: calc(100vh - 32px);
    border-radius: 20px;
    padding: 14px;
}

.topbar,
.section-title,
.drawer-head,
.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.topbar {
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -14px -14px 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.drawer-head h2,
.dialog-head h2 {
    margin-top: 2px;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    line-height: 1;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.icon-button,
.cart-button,
.filter-button,
.text-button,
.primary-action,
.fulfillment button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 13px;
    font-weight: 800;
}

.icon-button {
    width: 44px;
    color: var(--ink);
    background: #f2f5fb;
}

.icon-button.soft {
    border: 1px solid var(--line);
}

.cart-button {
    position: relative;
    width: 54px;
    color: #ffffff;
    background: var(--ink);
}

.cart-button span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: #201900;
    background: var(--sun);
    font-size: 0.75rem;
}

svg {
    width: 18px;
    height: 18px;
}

.controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #ffffff;
}

.search-field svg {
    flex: 0 0 auto;
    color: var(--muted);
}

.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
}

.filter-button,
.text-button {
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    background: #ffffff;
}

.filter-button.active {
    color: #083c35;
    border-color: rgba(37, 199, 161, 0.35);
    background: #dffbf4;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0 4px;
    scrollbar-width: none;
}

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

.category-tabs button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #ffffff;
    font-weight: 800;
}

.category-tabs button.active {
    color: #ffffff;
    border-color: var(--ink);
    background: var(--ink);
}

.manager-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
}

.manager-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.manager-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
}

.manager-card h4 {
    font-size: 0.96rem;
    line-height: 1.2;
}

.manager-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.manager-actions button {
    min-height: 36px;
    border-radius: 10px;
    color: var(--ink);
    background: #eef2f8;
    font-weight: 800;
}

.manager-actions button.hot {
    color: #5a2a00;
    background: #fff1c2;
}

.section-title {
    margin-top: 18px;
    align-items: end;
}

.section-title h3 {
    margin-top: 3px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

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

.product-card {
    overflow: hidden;
    display: grid;
    grid-template-rows: 168px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(28, 34, 48, 0.07);
}

.product-card.is-off {
    opacity: 0.58;
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #251b00;
    background: var(--sun);
    font-size: 0.72rem;
    font-weight: 900;
}

.product-body {
    display: grid;
    gap: 8px;
    padding: 13px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.product-body h4 {
    min-height: 42px;
    font-size: 1.04rem;
    line-height: 1.18;
}

.product-body p {
    min-height: 40px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.36;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.price {
    font-family: Manrope, Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
}

.qty-control {
    display: grid;
    grid-template-columns: 36px 28px 36px;
    align-items: center;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.qty-control button {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: #f2f5fb;
}

.qty-control button:last-child {
    color: #ffffff;
    background: var(--coral);
}

.qty-control strong {
    text-align: center;
    font-size: 0.88rem;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

.drawer {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
}

.drawer.is-open {
    pointer-events: auto;
}

.drawer-scrim {
    position: absolute;
    inset: 0;
    background: rgba(22, 23, 26, 0);
    transition: background 180ms ease;
}

.drawer.is-open .drawer-scrim {
    background: rgba(22, 23, 26, 0.42);
}

.drawer-sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(460px, 100%);
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    gap: 12px;
    padding: 16px;
    transform: translateX(100%);
    transition: transform 220ms ease;
}

.drawer.is-open .drawer-sheet {
    transform: translateX(0);
}

.cart-items {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 10px;
}

.cart-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
}

.cart-row img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.cart-row h4 {
    font-size: 0.94rem;
    line-height: 1.15;
}

.cart-row .qty-control {
    grid-template-columns: 30px 26px 30px;
    min-height: 30px;
    margin-top: 6px;
}

.note-field,
.checkout-form label {
    display: grid;
    gap: 6px;
    color: #353b45;
    font-size: 0.8rem;
    font-weight: 800;
}

.note-field textarea,
.checkout-form input,
.checkout-form select,
.order-dialog textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    color: var(--ink);
    background: #ffffff;
    outline: 0;
}

.note-field textarea {
    min-height: 72px;
    resize: vertical;
}

.fulfillment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fulfillment button {
    border: 1px solid var(--line);
    color: var(--muted);
    background: #ffffff;
}

.fulfillment button.active {
    color: #083c35;
    border-color: rgba(37, 199, 161, 0.35);
    background: #dffbf4;
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.checkout-form .delivery-only {
    grid-column: 1 / -1;
}

.totals {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcff;
}

.totals div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.total-line {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.total-line strong {
    color: var(--coral);
    font-size: 1.2rem;
}

.primary-action {
    min-height: 50px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--coral);
    text-decoration: none;
}

.order-dialog {
    width: min(620px, calc(100% - 28px));
    border: 0;
    border-radius: 22px;
    padding: 16px;
}

.order-dialog::backdrop {
    background: rgba(22, 23, 26, 0.44);
    backdrop-filter: blur(8px);
}

.order-dialog textarea {
    min-height: 280px;
    margin-top: 14px;
    resize: vertical;
    line-height: 1.45;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 80;
    max-width: calc(100vw - 28px);
    padding: 12px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--ink);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    font-weight: 800;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body {
        background: var(--bg);
    }

    .app-shell {
        width: calc(100% - 20px);
        padding-top: 10px;
        gap: 10px;
    }

    .menu-area {
        border-radius: 20px;
    }

    .menu-area {
        padding: 12px;
    }

    .topbar {
        margin: -12px -12px 0;
        padding: 10px 12px;
    }

    .topbar {
        align-items: center;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .filter-button {
        width: 100%;
    }

    .manager-list,
    .product-grid,
    .checkout-form {
        grid-template-columns: 1fr;
    }

    .product-card {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto;
    }

    .product-image {
        min-height: 100%;
    }

    .product-body h4,
    .product-body p {
        min-height: 0;
    }

    .drawer-sheet {
        top: auto;
        bottom: 0;
        height: min(92vh, 760px);
        border-radius: 22px 22px 0 0;
        transform: translateY(100%);
    }

    .drawer.is-open .drawer-sheet {
        transform: translateY(0);
    }

    .dialog-actions {
        display: grid;
    }
}
