:root {
    --bg: #f7f5f1;
    --surface: #ffffff;
    --surface-2: #f0ede7;
    --text: #18202a;
    --muted: #667085;
    --line: #e3ded6;
    --primary: #e23d2f;
    --accent: #16213e;
    --success: #12715b;
    --danger: #b42318;
    --shadow: 0 16px 40px rgba(24, 32, 42, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

main {
    min-height: calc(100vh - 72px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 48px);
    background: rgba(247, 245, 241, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand,
.topnav,
.user-area,
.hero-actions,
.admin-actions,
.store-meta,
.nutrition-row,
.stat-row,
.receipt-line {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-weight: 800;
    min-width: 0;
}

.brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-mark,
.avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-logo {
    overflow: hidden;
    background: #fff;
    color: var(--primary);
}

.store-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px clamp(16px, 5vw, 72px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    font-weight: 750;
}

.topnav {
    gap: 8px;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.topnav a,
.side-nav a,
.category-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 650;
}

.topnav a.is-active,
.topnav a:hover,
.side-nav a:hover,
.category-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.user-area {
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(226, 61, 47, .18);
}

.button:hover {
    filter: brightness(.96);
}

.button-soft {
    color: var(--text);
    background: var(--surface-2);
    box-shadow: none;
}

.button-ghost {
    color: var(--text);
    background: transparent;
    box-shadow: none;
    border: 1px solid var(--line);
}

.button-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 14px;
}

.button-wide {
    width: 100%;
}

.flash {
    max-width: 980px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.flash-success {
    color: var(--success);
}

.flash-error {
    color: var(--danger);
}

.platform-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    padding: clamp(44px, 7vw, 96px) clamp(16px, 5vw, 72px);
}

.platform-copy h1,
.restaurant-hero-content h1,
.product-panel h1,
.section-heading h1,
.section-heading h2,
.success-card h1,
.auth-card h1 {
    margin: 0;
    line-height: 1.02;
    letter-spacing: 0;
}

.platform-copy h1 {
    font-size: clamp(52px, 9vw, 112px);
}

.platform-copy p,
.restaurant-hero-content p {
    max-width: 640px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.platform-preview {
    display: grid;
    gap: 16px;
}

.restaurant-preview,
.admin-card,
.form-card,
.summary-card,
.table-card,
.order-card,
.empty-card,
.auth-card,
.success-card,
.section-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.restaurant-preview {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    min-height: 130px;
    overflow: hidden;
}

.restaurant-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-preview span {
    display: grid;
    gap: 8px;
    padding: 18px;
}

small,
.restaurant-preview small,
.table-product small {
    color: var(--muted);
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 0 clamp(16px, 5vw, 72px) 72px;
}

.section-grid article {
    padding: 24px;
}

.section-grid h2 {
    margin: 12px 0 8px;
}

.section-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.metric {
    color: var(--primary);
    font-weight: 900;
}

.restaurant-hero {
    position: relative;
    min-height: clamp(430px, 58svh, 640px);
    display: grid;
    align-items: end;
    color: #fff;
    background: var(--restaurant-accent, var(--accent));
    overflow: hidden;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(9, 12, 19, .88), rgba(9, 12, 19, .45), rgba(9, 12, 19, .10));
}

.restaurant-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    padding: clamp(34px, 6vw, 64px) clamp(16px, 5vw, 72px);
}

.restaurant-hero-content h1 {
    max-width: 760px;
    font-size: clamp(38px, 7vw, 86px);
}

.restaurant-hero-content p {
    color: rgba(255, 255, 255, .82);
    font-size: clamp(16px, 2vw, 20px);
}

.restaurant-logo {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    color: var(--restaurant-primary, var(--primary));
    font-weight: 900;
}

.restaurant-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-meta {
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.store-meta span,
.cart-pill {
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-weight: 750;
}

.cart-pill {
    position: absolute;
    right: clamp(16px, 5vw, 72px);
    bottom: 56px;
    background: var(--restaurant-primary, var(--primary));
}

.promo-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 24px clamp(16px, 5vw, 72px) 0;
}

.promo-strip article {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
}

.promo-strip img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .52;
}

.promo-strip div {
    position: relative;
    padding: 24px;
    color: #fff;
}

.promo-strip h2 {
    margin: 0 0 8px;
}

.promo-strip p {
    max-width: 460px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
}

.menu-layout {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 24px;
    padding: 32px clamp(16px, 5vw, 72px) 80px;
}

.category-nav {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 6px;
}

.menu-feed {
    display: grid;
    gap: 44px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading h1,
.section-heading h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-heading span {
    color: var(--muted);
    font-weight: 700;
}

.product-grid {
    display: grid;
    --desktop-columns: 3;
    --mobile-columns: 1;
    grid-template-columns: repeat(var(--desktop-columns), minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    display: grid;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

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

.product-body h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.product-body p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    line-height: 1.45;
}

.nutrition-row {
    gap: 6px;
    flex-wrap: wrap;
}

.nutrition-row span {
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 13px;
    font-weight: 750;
}

.product-footer,
.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(360px, .75fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
    padding: clamp(24px, 5vw, 72px);
}

.product-media {
    position: sticky;
    top: 96px;
}

.product-media img {
    width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-panel,
.checkout-main,
.owner-content {
    min-width: 0;
}

.product-panel h1 {
    margin-top: 16px;
    font-size: clamp(38px, 6vw, 70px);
}

.product-panel > p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.back-link {
    color: var(--muted);
    font-weight: 800;
}

.stack-form,
.cart-list,
.orders-grid,
.side-nav,
.receipt-mini,
.domain-list {
    display: grid;
    gap: 14px;
}

.choice-box {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.choice-box legend {
    padding: 0 8px;
    font-weight: 900;
}

.radio-line,
.check-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

.radio-line strong {
    margin-left: auto;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
    padding: clamp(24px, 5vw, 64px);
}

.cart-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 84px auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.cart-item img {
    width: 96px;
    height: 76px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item h2,
.cart-item p {
    margin: 0;
}

.cart-item p {
    color: var(--muted);
}

.cart-item input {
    width: 72px;
}

.summary-card {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.summary-card h2 {
    margin: 0 0 16px;
}

.summary-card dl {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.summary-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.summary-card dt {
    color: var(--muted);
}

.summary-card dd {
    margin: 0;
    font-weight: 850;
}

.summary-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 20px;
}

.form-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.form-card.compact {
    margin-bottom: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 750;
}

.field input,
.field select,
.field textarea,
.inline-form input,
.status-form select,
.cart-item input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #fff;
}

.field textarea {
    resize: vertical;
}

.compact-field {
    max-width: 180px;
}

.inline-error {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--danger);
    background: #fff0ed;
}

.order-success,
.auth-screen {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, .5fr);
    gap: 24px;
    align-items: start;
    padding: clamp(24px, 5vw, 72px);
}

.success-card,
.empty-card {
    padding: 28px;
}

.success-card h1 {
    font-size: clamp(42px, 7vw, 80px);
}

.receipt-line {
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.auth-screen {
    grid-template-columns: minmax(280px, 460px);
    justify-content: center;
}

.auth-card {
    display: grid;
    gap: 16px;
    padding: 28px;
}

.demo-users {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.demo-users span {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.owner-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    padding: 24px clamp(16px, 4vw, 48px) 64px;
}

.account-layout {
    padding: clamp(24px, 5vw, 64px);
}

.account-head {
    margin-bottom: 26px;
}

.account-head h1 {
    margin: 0 0 8px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
}

.account-head p {
    margin: 0;
    color: var(--muted);
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.address-form {
    margin-top: 16px;
}

.owner-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.owner-sidebar h1 {
    margin: 12px 0 6px;
    font-size: 24px;
}

.owner-sidebar p {
    margin: 0;
    color: var(--muted);
}

.owner-content.narrow {
    max-width: 980px;
}

.restaurant-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.admin-card {
    overflow: hidden;
}

.admin-card > img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.admin-card > div {
    padding: 18px;
}

.admin-card h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.admin-card p {
    margin: 0;
    color: var(--muted);
}

.stat-row {
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 18px 18px;
}

.stat-row span {
    padding: 10px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
}

.stat-row strong {
    display: block;
    color: var(--text);
}

.admin-actions {
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 18px 18px;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 120px auto;
    gap: 10px;
    margin-bottom: 18px;
}

.category-layout-card {
    margin-bottom: 18px;
}

.category-layout-list {
    display: grid;
    gap: 10px;
}

.category-layout-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 150px;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.category-layout-row strong,
.category-layout-row small {
    display: block;
}

.category-layout-row small {
    margin-top: 4px;
}

.table-card {
    overflow: auto;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.table-product {
    display: grid;
    grid-template-columns: 64px minmax(180px, 1fr);
    gap: 12px;
    align-items: center;
}

.table-product img {
    width: 64px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
}

.table-product span {
    display: grid;
    gap: 4px;
}

.order-card {
    padding: 18px;
}

.order-card p {
    margin: 8px 0;
    color: var(--muted);
}

.order-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.receipt-mini {
    margin: 14px 0;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
}

.status-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 10px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.domain-list span {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 750;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.compact-empty {
    box-shadow: none;
}

.editor-form {
    display: grid;
    gap: 20px;
}

.settings-editor {
    max-width: 1120px;
}

.settings-section {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.settings-section-head {
    display: grid;
    gap: 6px;
}

.settings-section-head.with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-section-head h2 {
    margin: 0;
    font-size: 24px;
}

.settings-section-head p {
    margin: 0;
    color: var(--muted);
}

.media-grid {
    align-items: stretch;
}

.upload-widget {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.upload-preview {
    display: grid;
    place-items: center;
    min-height: 120px;
    border-radius: 8px;
    background: var(--surface-2);
    overflow: hidden;
    color: var(--muted);
    font-weight: 850;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
}

.upload-controls {
    display: grid;
    gap: 8px;
}

.upload-controls small,
.upload-status {
    color: var(--muted);
}

.upload-status {
    min-height: 18px;
    font-size: 13px;
}

.form-check-card {
    min-height: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}

.color-field input {
    min-height: 54px;
    padding: 7px;
}

.variant-list {
    display: grid;
    gap: 14px;
}

.variant-row {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.variant-fields {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr 1.2fr;
    gap: 12px;
    align-items: end;
}

.variant-photo-field.is-hidden {
    display: none;
}

.delete-line {
    color: var(--danger);
}

.delete-variant-button {
    justify-self: start;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sticky-actions {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 245, 241, .92);
}

.compact-actions {
    padding: 0;
}

.drag-cell {
    width: 44px;
}

.drag-handle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    cursor: grab;
    font-weight: 900;
}

tr.is-dragging {
    opacity: .45;
}

.product-image-button,
.product-title-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.product-title-button h3 {
    transition: color .18s ease;
}

.product-title-button:hover h3 {
    color: var(--primary);
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(14, 18, 26, .58);
}

.product-modal {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(320px, .7fr);
    width: min(1040px, 100%);
    max-height: min(840px, calc(100vh - 48px));
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.modal-media img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.modal-content {
    display: grid;
    gap: 16px;
    align-content: start;
    max-height: min(840px, calc(100vh - 48px));
    overflow: auto;
    padding: 28px;
}

.modal-content h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
}

.modal-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    max-width: 360px;
    padding: 13px 16px;
    border-radius: 8px;
    color: #fff;
    background: var(--success);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.toast[data-type="error"] {
    background: var(--danger);
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.promo-admin-grid {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.promo-admin-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.promo-admin-card img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.promo-admin-card div {
    padding: 18px;
}

.promo-admin-card h2,
.promo-admin-card p {
    margin: 0 0 10px;
}

.promo-admin-card p,
.meta-line {
    color: var(--muted);
}

.meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 750;
}

.meta-line span {
    padding: 7px 9px;
    border-radius: 8px;
    background: var(--surface-2);
}

.editable-promo {
    display: block;
}

.promo-edit-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.half-builder {
    display: grid;
    grid-template-columns: minmax(260px, .7fr) minmax(420px, 1fr);
    gap: 24px;
    align-items: center;
    padding: 34px clamp(16px, 5vw, 72px);
}

.half-builder-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.02;
}

.half-builder-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.half-builder-card {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.half-preview {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--surface-2);
    overflow: hidden;
}

.half-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.half-left {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.half-right {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transform: scaleX(-1);
}

.half-controls {
    display: grid;
    gap: 14px;
}

.cart-half-thumb {
    position: relative;
    width: 96px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
}

.cart-half-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-half-thumb img:first-child {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.cart-half-thumb img:last-child {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
    transform: scaleX(-1);
}

.empty-state {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.empty-state h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 7vw, 72px);
}

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

@media (max-width: 980px) {
    .platform-hero,
    .section-grid,
    .menu-layout,
    .product-detail,
    .checkout-layout,
    .order-success,
    .owner-shell,
    .account-grid,
    .product-modal,
    .promo-admin-card,
    .half-builder,
    .half-builder-card {
        grid-template-columns: 1fr;
    }

    .product-media,
    .summary-card,
    .owner-sidebar {
        position: static;
    }

    .menu-layout {
        gap: 18px;
        padding-top: 22px;
    }

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

    .category-nav {
        position: sticky;
        top: 72px;
        z-index: 12;
        padding: 10px clamp(16px, 5vw, 72px);
        background: rgba(247, 245, 241, .94);
        border-block: 1px solid var(--line);
        backdrop-filter: blur(14px);
    }

    .category-nav,
    .side-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .cart-pill {
        position: static;
        display: inline-flex;
        margin-top: 18px;
    }

    .restaurant-hero {
        min-height: clamp(420px, 62svh, 560px);
    }

    .half-preview {
        justify-self: center;
        width: min(280px, 72vw);
    }

    .form-grid,
    .form-grid.four,
    .check-grid,
    .variant-fields,
    .upload-widget,
    .category-layout-row {
        grid-template-columns: 1fr;
    }

    .modal-media img {
        min-height: 280px;
        max-height: 360px;
    }
}

@media (max-width: 680px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand user"
            "nav nav";
        gap: 10px 12px;
        align-items: center;
        padding: 10px 16px;
    }

    .brand {
        grid-area: brand;
    }

    .topnav {
        grid-area: nav;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .user-area {
        grid-area: user;
        justify-content: flex-start;
    }

    .user-area .avatar {
        display: none;
    }

    .button-ghost {
        min-height: 38px;
        padding: 8px 12px;
    }

    .restaurant-hero {
        min-height: auto;
    }

    .restaurant-hero-content {
        padding-top: 44px;
        padding-bottom: 38px;
    }

    .restaurant-hero-content h1 {
        font-size: clamp(34px, 10vw, 48px);
    }

    .restaurant-hero-content p {
        max-width: 100%;
    }

    .store-meta span,
    .cart-pill {
        font-size: 14px;
    }

    .promo-strip,
    .half-builder,
    .menu-layout {
        padding-inline: 14px;
    }

    .promo-strip article {
        min-height: 160px;
    }

    .half-builder-card {
        padding: 14px;
    }

    .half-builder-copy h2,
    .section-heading h1,
    .section-heading h2 {
        font-size: clamp(30px, 9vw, 40px);
    }

    .product-grid {
        grid-template-columns: repeat(var(--mobile-columns), minmax(0, 1fr));
        gap: 14px;
    }

    .product-body {
        gap: 12px;
        padding: 12px;
    }

    .product-body h3 {
        font-size: 17px;
    }

    .product-body p {
        min-height: 0;
        font-size: 14px;
    }

    .nutrition-row span {
        padding: 5px 6px;
        font-size: 12px;
    }

    .product-footer strong {
        font-size: 15px;
    }

    .product-footer {
        align-items: stretch;
    }

    .product-footer form,
    .product-footer .button {
        width: 100%;
    }

    .settings-section-head.with-action {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-backdrop {
        padding: 10px;
    }

    .product-modal {
        max-height: calc(100dvh - 20px);
    }

    .modal-content {
        padding: 20px;
    }

    .modal-content h2 {
        font-size: clamp(32px, 10vw, 44px);
    }

    .restaurant-preview,
    .cart-item,
    .inline-form,
    .status-form {
        grid-template-columns: 1fr;
    }

    .cart-item img {
        width: 100%;
        height: 180px;
    }

    .demo-users {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .brand > span:last-child {
        max-width: 170px;
    }

    .topnav a,
    .side-nav a,
    .category-nav a {
        padding: 9px 10px;
        font-size: 14px;
    }

    .restaurant-hero-content {
        padding-inline: 14px;
    }

    .store-meta {
        gap: 8px;
    }

    .cart-pill {
        width: 100%;
        justify-content: center;
    }

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

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