:root {
    --cr-bg: #f8f5ef;
    --cr-card: #ffffff;
    --cr-text: #231f20;
    --cr-muted: #746f68;
    --cr-primary: #d96b27;
    --cr-primary-dark: #a94712;
    --cr-green: #0f7a4a;
    --cr-border: rgba(35,31,32,.10);
    --cr-shadow: 0 18px 45px rgba(42, 30, 18, .10);
    --cr-radius: 22px;
}

body {
    background: var(--cr-bg);
    color: var(--cr-text);
}

.cr-shell main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 96px;
}

.cr-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 22px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--cr-border);
}

.cr-brand,
.cr-nav a {
    text-decoration: none;
    color: var(--cr-text);
}

.cr-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
}

.cr-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .95rem;
}

.cr-primary-link,
.cr-link-btn {
    border-radius: 999px;
    padding: 9px 14px;
}

.cr-primary-link {
    background: var(--cr-text);
    color: #fff !important;
}

.cr-link-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.cr-cart-link {
    position: relative;
}

.cr-cart-link span,
.cr-bottom-nav em {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    margin-left: 5px;
    border-radius: 999px;
    background: var(--cr-primary);
    color: #fff;
    font-size: .72rem;
    font-style: normal;
}

.cr-public-hero {
    min-height: 340px;
    display: grid;
    align-items: center;
    padding: 42px;
    border-radius: 34px;
    background:
        radial-gradient(circle at right top, rgba(217,107,39,.24), transparent 32%),
        linear-gradient(135deg, #fff7ea, #fff);
    box-shadow: var(--cr-shadow);
}

.cr-kicker,
.cr-section-title p,
.cr-page-head p {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    color: var(--cr-primary-dark);
    font-weight: 800;
}

.cr-public-hero h1,
.cr-page-head h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: .98;
}

.cr-public-hero p:not(.cr-kicker) {
    max-width: 620px;
    color: var(--cr-muted);
    font-size: 1.08rem;
}

.cr-searchbar,
.cr-filter-panel {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cr-searchbar {
    max-width: 760px;
    margin-top: 24px;
    padding: 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.cr-searchbar input,
.cr-filter-panel input,
.cr-filter-panel select,
.cr-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--cr-border);
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    color: var(--cr-text);
    outline: none;
}

.cr-searchbar input {
    border: 0;
    min-height: 48px;
    font-size: 1rem;
}

.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.cr-btn-primary {
    background: var(--cr-primary);
    color: #fff;
}

.cr-btn-light {
    background: #fff;
    color: var(--cr-text);
    border: 1px solid var(--cr-border);
}

.cr-btn-full {
    width: 100%;
}

.cr-btn:disabled,
.cr-add-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.cr-quick-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 18px 2px 4px;
}

.cr-quick-filters button {
    white-space: nowrap;
    min-height: 40px;
    border: 1px solid var(--cr-border);
    border-radius: 999px;
    padding: 0 16px;
    background: #fff;
    cursor: pointer;
}

.cr-quick-filters button.active {
    background: var(--cr-text);
    color: #fff;
}

.cr-section {
    margin-top: 34px;
}

.cr-section-title,
.cr-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cr-section-title h2 {
    margin: 0;
    font-size: 1.75rem;
}

.cr-section-title a {
    color: var(--cr-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.cr-restaurant-grid,
.cr-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.cr-page-grid {
    margin-top: 18px;
}

.cr-rest-card,
.cr-menu-card,
.cr-form-card,
.cr-cart-total,
.cr-order-status,
.cr-detail-info > div {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    box-shadow: var(--cr-shadow);
}

.cr-rest-card {
    overflow: hidden;
    cursor: pointer;
}

.cr-rest-cover,
.cr-menu-img,
.cr-row-img,
.cr-detail-cover {
    background: linear-gradient(135deg, #f4d7b7, #f7eee2);
    background-size: cover;
    background-position: center;
}

.cr-rest-cover {
    position: relative;
    height: 140px;
}

.cr-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(35,31,32,.88);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.cr-rest-body {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 14px;
}

.cr-rest-logo,
.cr-detail-logo {
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--cr-green);
    color: #fff;
    font-weight: 900;
}

.cr-rest-logo {
    width: 52px;
    height: 52px;
}

.cr-rest-body h3,
.cr-menu-body h3,
.cr-cart-row h3,
.cr-menu-row h4 {
    margin: 0 0 4px;
}

.cr-rest-body p,
.cr-menu-body p,
.cr-menu-body small,
.cr-menu-row p,
.cr-cart-row p {
    margin: 0;
    color: var(--cr-muted);
}

.cr-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: .82rem;
}

.cr-meta-row span {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(217,107,39,.10);
    color: #6c3817;
    font-weight: 700;
}

.cr-menu-card {
    overflow: hidden;
}

.cr-menu-img {
    position: relative;
    height: 160px;
}

.cr-menu-body {
    padding: 14px;
}

.cr-filter-panel {
    position: sticky;
    top: 68px;
    z-index: 10;
    flex-wrap: wrap;
    padding: 14px;
    margin-bottom: 20px;
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--cr-shadow);
}

.cr-filter-panel input,
.cr-filter-panel select {
    flex: 1 1 160px;
}

.cr-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--cr-border);
    white-space: nowrap;
}

.cr-loading,
.cr-empty {
    margin: 30px 0;
    padding: 30px;
    border-radius: var(--cr-radius);
    background: #fff;
    box-shadow: var(--cr-shadow);
    text-align: center;
}

.cr-detail-cover {
    min-height: 290px;
    border-radius: 34px;
    position: relative;
    box-shadow: var(--cr-shadow);
}

.cr-back {
    position: absolute;
    top: 18px;
    left: 18px;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255,255,255,.92);
    cursor: pointer;
}

.cr-detail-head {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    margin: -42px 22px 0;
    padding: 20px;
    border-radius: 26px;
    background: #fff;
    position: relative;
    box-shadow: var(--cr-shadow);
}

.cr-detail-logo {
    width: 90px;
    height: 90px;
    font-size: 1.6rem;
}

.cr-detail-head h1 {
    margin: 4px 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.cr-detail-actions,
.cr-detail-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.cr-detail-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.cr-detail-info > div {
    padding: 16px;
}

.cr-menu-list {
    display: grid;
    gap: 12px;
}

.cr-menu-group {
    margin: 18px 0 2px;
}

.cr-menu-row,
.cr-cart-row {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--cr-border);
}

.cr-row-img {
    width: 82px;
    height: 82px;
    border-radius: 18px;
}

.cr-add-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--cr-primary);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.cr-floating-cart {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: min(420px, calc(100vw - 28px));
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--cr-text);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(0,0,0,.25);
}

.cr-cart-wrap,
.cr-checkout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    align-items: start;
}

.cr-cart-list,
.cr-form-card {
    display: grid;
    gap: 12px;
}

.cr-form-card,
.cr-cart-total,
.cr-order-status {
    padding: 18px;
}

.cr-form-card label {
    font-weight: 800;
    margin-top: 6px;
}

textarea.cr-input {
    min-height: 96px;
    padding-top: 12px;
}

.cr-cart-row {
    grid-template-columns: 1fr auto auto;
}

.cr-cart-row input {
    width: 100%;
    margin-top: 8px;
    min-height: 38px;
    border: 1px solid var(--cr-border);
    border-radius: 12px;
    padding: 0 10px;
}

.cr-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--cr-border);
    border-radius: 999px;
    padding: 4px;
}

.cr-qty button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--cr-bg);
    cursor: pointer;
}

.cr-cart-total {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 12px;
}

.cr-cart-total div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cr-error {
    padding: 12px;
    border-radius: 14px;
    background: #fff0f0;
    color: #a51818;
}

.cr-status-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.cr-status-steps span {
    padding: 9px 12px;
    border-radius: 999px;
    background: #eee;
    color: var(--cr-muted);
    font-weight: 800;
}

.cr-status-steps span.active {
    background: var(--cr-green);
    color: #fff;
}

.cr-bottom-nav {
    display: none;
}

@media (max-width: 980px) {
    .cr-restaurant-grid,
    .cr-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cr-cart-wrap,
    .cr-checkout,
    .cr-detail-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .cr-shell main {
        padding: 14px 12px 92px;
    }

    .cr-topbar {
        padding: 12px 14px;
    }

    .cr-nav {
        display: none;
    }

    .cr-public-hero {
        min-height: 300px;
        padding: 26px;
        border-radius: 26px;
    }

    .cr-searchbar {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .cr-section-title,
    .cr-page-head {
        align-items: start;
        flex-direction: column;
    }

    .cr-restaurant-grid,
    .cr-menu-grid {
        grid-template-columns: 1fr;
    }

    .cr-filter-panel {
        top: 57px;
        align-items: stretch;
        flex-direction: column;
    }

    .cr-detail-cover {
        min-height: 220px;
        border-radius: 24px;
    }

    .cr-detail-head {
        grid-template-columns: 64px 1fr;
        margin: -30px 10px 0;
        padding: 14px;
    }

    .cr-detail-logo {
        width: 64px;
        height: 64px;
        font-size: 1.2rem;
    }

    .cr-menu-row {
        grid-template-columns: 68px 1fr auto;
        gap: 10px;
    }

    .cr-row-img {
        width: 68px;
        height: 68px;
    }

    .cr-cart-row {
        grid-template-columns: 1fr;
    }

    .cr-cart-total {
        position: static;
    }

    .cr-bottom-nav {
        position: fixed;
        z-index: 25;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--cr-border);
        background: rgba(255,255,255,.95);
        backdrop-filter: blur(16px);
    }

    .cr-bottom-nav a {
        position: relative;
        display: grid;
        place-items: center;
        gap: 2px;
        color: var(--cr-text);
        text-decoration: none;
        font-size: 1.05rem;
    }

    .cr-bottom-nav span {
        font-size: .72rem;
    }

    .cr-bottom-nav em {
        position: absolute;
        top: 0;
        right: 24%;
    }

    .cr-floating-cart {
        bottom: 76px;
    }
}
