:root {
    --bg: #f8f6ee;
    --ink: #171411;
    --muted: #70695f;
    --panel: #fffdf3;
    --line: #e8d9aa;
    --brand: #e6a819;
    --brand-strong: #d62d20;
    --charcoal: #191714;
    --success: #237a4b;
    --danger: #b3261e;
    --shadow: 0 18px 60px rgba(31, 23, 12, .16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f6f6f6;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

.shell {
    width: 100%;
    max-width: 377px;
    margin: 12px auto;
    min-height: 100vh;
    background: var(--panel);
    border: 1px solid #dddddd;
    box-shadow: none;
}

.hero {
    min-height: 150px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        url("../img/xd/hero-logo.jpg") center / cover;
}

.hero__shade {
    display: none;
}

.brand-lockup {
    display: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 4px solid #ffe45c;
    border-radius: 50%;
    background: #bd1e18;
    color: #fff;
    font-size: .78rem;
    text-shadow: none;
}

.menu-card {
    margin-top: -34px;
    padding: 22px 20px 7rem;
    position: relative;
    z-index: 1;
    background: var(--panel);
    border-radius: 18px 18px 0 0;
}

.topline,
.section-title,
.product-card__actions,
.order-head,
.logout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.eyebrow {
    margin: 0 0 .25rem;
    color: var(--brand-strong);
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

h2 {
    margin-bottom: 0;
    font-size: 1.04rem;
}

h3 {
    margin-bottom: .35rem;
    font-size: .92rem;
}

.icon-link {
    display: none;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    background: #1f8f50;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem .85rem;
    margin: .75rem 0 1rem;
    font-size: .54rem;
    line-height: 1.32;
    color: var(--muted);
}

.contact-grid p,
.contact-grid div {
    margin: 0;
}

.contact-grid strong {
    color: var(--ink);
}

.contact-grid span {
    display: block;
}

.tabs {
    position: relative;
    top: auto;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: .75rem;
    padding: .45rem 0 1rem;
    background: transparent;
    overflow: visible;
}

.tabs a {
    padding: .34rem .9rem;
    border: 1px solid var(--brand);
    border-radius: 999px;
    color: #a36a00;
    font-size: .63rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.tabs a.is-active,
.tabs a:hover {
    background: var(--brand);
    color: #fff;
}

.featured,
.product-section,
.account-panel,
.checkout,
.order-confirmation {
    padding: .65rem 0 .5rem;
}

.category-grid,
.product-list,
.auth-grid,
.checkout-grid,
.orders-list {
    display: grid;
    gap: .58rem;
    margin-top: .7rem;
}

.category-tile {
    aspect-ratio: 337 / 120;
    min-height: 0;
    position: relative;
    display: block;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    color: #fff;
    background: #3f3d37;
    text-decoration: none;
}

.category-tile::after {
    display: none;
}

.category-tile__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.category-tile__content,
.category-tile .add-btn {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: inline-block;
    margin-bottom: .25rem;
    color: #ffd35b;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.category-tile h3 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}

.product-card,
.form-card,
.cart-panel,
.admin-card,
.order-confirmation,
.signed-in,
.metrics article,
.order-item {
    border: 1px solid rgba(209, 172, 77, .38);
    border-radius: 8px;
    background: #fffdf8;
}

.product-card {
    overflow: hidden;
    scroll-margin-top: 1rem;
    border: 0;
    background: transparent;
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 337 / 208;
    height: auto;
    object-fit: cover;
    object-position: center;
    background: #eee6d5;
    border-radius: 14px;
}

.product-card--menu img {
    aspect-ratio: 337 / 120;
}

.product-card--promos img {
    aspect-ratio: 337 / 205;
}

.product-card--extras img {
    aspect-ratio: 16 / 9;
}

.product-card__body {
    display: grid;
    gap: .55rem;
    padding: .55rem .2rem 1rem;
}

.product-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.18;
}

.product-card strong {
    color: var(--brand-strong);
}

.product-card h3 {
    margin-bottom: .28rem;
    font-size: .96rem;
    text-transform: uppercase;
}

.product-heading {
    padding: .25rem 0 .65rem;
    text-align: center;
}

.product-heading h2 {
    color: #f47b20;
    font-size: 1.34rem;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
}

.button,
.add-btn {
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: .72rem 1rem;
}

.button--ghost {
    border: 1px solid var(--line);
    background: #fffaf0;
    color: var(--ink);
}

.button--small {
    min-height: 2rem;
    padding: .42rem .7rem;
    font-size: .76rem;
}

.add-btn {
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: .52rem .8rem;
    box-shadow: 0 8px 20px rgba(130, 83, 0, .2);
}

.flash-stack {
    display: grid;
    gap: .45rem;
    margin: .75rem 0;
}

.flash {
    margin: 0;
    padding: .7rem .8rem;
    border-radius: 8px;
    font-size: .84rem;
}

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

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

.form-card,
.cart-panel,
.admin-card,
.order-confirmation,
.signed-in {
    padding: .85rem;
}

label {
    display: grid;
    gap: .35rem;
    margin-bottom: .75rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: .72rem .75rem;
}

textarea {
    resize: vertical;
}

.signed-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.signed-in p {
    margin: 0;
}

.cart-panel {
    min-height: 7rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .4rem;
    padding: .55rem 0;
    border-bottom: 1px solid #f0e5bf;
}

.cart-line small {
    color: var(--muted);
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.cart-controls button {
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff8df;
    color: var(--ink);
    cursor: pointer;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 2px solid var(--line);
}

.cart-empty {
    color: var(--muted);
    font-size: .86rem;
}

.cart-fab {
    position: fixed;
    right: max(1rem, calc((100vw - 430px) / 2 + 1rem));
    bottom: 1rem;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .7rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--charcoal);
    color: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    cursor: pointer;
    font-weight: 800;
}

.cart-fab span {
    display: grid;
    place-items: center;
    min-width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: var(--brand-strong);
}

.small-note {
    margin: .65rem 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.35;
}

.small-note--strong {
    color: var(--danger);
    font-weight: 800;
}

.admin-body {
    background: #f4f1e7;
}

.admin-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 3rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-login {
    max-width: 430px;
}

.logout-row {
    margin-bottom: 1rem;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1rem;
}

.metrics article {
    padding: 1rem;
}

.metrics strong {
    display: block;
    font-size: 1.65rem;
}

.metrics span {
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 1rem;
    align-items: start;
}

.admin-products {
    display: grid;
    gap: .65rem;
}

.admin-products article {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .65rem;
    border: 1px solid #efe4c2;
    border-radius: 8px;
    background: #fff;
}

.admin-products img {
    width: 76px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
}

.admin-products span,
.admin-products small {
    display: block;
    color: var(--muted);
    font-size: .8rem;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.check-row {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .5rem;
}

.check-row input {
    width: auto;
}

.orders-card {
    margin-top: 1rem;
}

.order-item {
    padding: .85rem;
}

.order-head span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.order-customer p {
    margin-bottom: .25rem;
    color: var(--muted);
}

.order-customer strong {
    color: var(--ink);
}

.order-item ul {
    margin: .75rem 0;
    padding: 0;
    list-style: none;
}

.order-item li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    border-bottom: 1px solid #f0e5bf;
}

.status-form {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.status-form select {
    max-width: 220px;
}

@media (max-width: 760px) {
    body:not(.admin-body) {
        background: var(--panel);
    }

    .shell {
        width: 100vw;
        max-width: none;
        margin: 0;
        border: 0;
    }

    .admin-grid,
    .metrics,
    .admin-products article {
        grid-template-columns: 1fr;
    }

    .admin-products img {
        width: 100%;
        height: 150px;
    }
}

@media (min-width: 760px) {
    .auth-grid,
    .checkout-grid {
        grid-template-columns: 1fr 1fr;
    }
}
