:root {
    --white: #fff;
    --navy: #1b365d;
    --gold: #ffcc00;
    --bg: #f0f2f5;
    --ink: #1b365d;
    --muted: #718096;
    --line: #dfe4ec;
    --card: #fff;
    --soft: #edf1f7;
    --shadow: 0 10px 28px rgba(27, 54, 93, .1)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, sans-serif;
    font-size: 14px
}

body.dark {
    --white: #17243b;
    --bg: #101827;
    --ink: #eff5ff;
    --muted: #b5c0d0;
    --line: #30415b;
    --card: #1b2a43;
    --soft: #243652;
    --shadow: none
}

button,
input {
    font: inherit
}

button {
    cursor: pointer;
    border: 0
}

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

.app {
    max-width: 520px;
    min-height: 100vh;
    margin: auto;
    padding: 0 20px 92px;
    background: var(--white)
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -20px;
    padding: 14px 20px;
    background: var(--navy);
    color: #fff
}

.brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .5px
}

.topbar a {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14)
}

.topbar svg {
    width: 19px
}

.greeting {
    margin: 21px 0 17px
}

.greeting p,
.intro {
    margin: 0 0 5px;
    color: var(--muted)
}

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

h1,
.page-title {
    font-size: 25px;
    margin-bottom: 0
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 23px 0 17px;
    font-weight: 800
}

.back {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--soft)
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--card);
    color: var(--muted)
}

.searchbar input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink)
}

.hero {
    position: relative;
    min-height: 186px;
    margin: 18px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #1b365d;
    color: #fff
}

.hero img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35
}

.hero div {
    position: relative;
    width: 68%;
    padding: 25px 20px
}

.hero small {
    color: #ffdc4d;
    font-weight: bold
}

.hero h2 {
    margin: 7px 0 16px;
    font-size: 24px;
    line-height: 1.06
}

.hero a,
.gold-btn {
    display: inline-block;
    border-radius: 9px;
    padding: 11px 14px;
    background: var(--gold);
    color: #1b365d;
    font-weight: 800
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 13px
}

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

.section-head a {
    color: var(--navy);
    font-weight: bold
}

.dark .section-head a {
    color: #ffdc4d
}

.category-row,
.product-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none
}

.category-row a {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 73px;
    color: var(--ink);
    font-size: 11px;
    font-weight: bold
}

.category-row svg {
    width: 59px;
    height: 59px;
    padding: 17px;
    border-radius: 16px;
    background: #e6edf8;
    color: var(--navy)
}

.category-row a:nth-child(3) svg {
    background: #fff5ce;
    color: #9a7200
}

.category-row a:nth-child(4) svg {
    background: #dbeee8;
    color: #0d806a
}

.product-row {
    margin-right: -20px;
    padding-right: 20px
}

.product-card {
    position: relative;
    flex: 0 0 157px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card)
}

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

.grid .product-card {
    min-width: 0
}

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

.grid .product-image {
    height: 157px
}

.fav {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #fff;
    color: #5f6c7e
}

.fav.is-active {
    color: #d9284e
}

.fav svg {
    width: 16px
}

.card-info {
    padding: 10px
}

.card-info small {
    color: var(--muted);
    font-size: 10px
}

.card-info h3 {
    overflow: hidden;
    margin: 4px 0 6px;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis
}

.price {
    color: var(--navy);
    font-size: 15px
}

.dark .price {
    color: #ffdc4d
}

.product-tag {
    display: block;
    margin-top: 6px;
    color: #b78500;
    font-size: 10px;
    font-weight: bold
}

.service-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 24px;
    border-radius: 15px;
    padding: 15px;
    background: #e6edf8
}

.service-banner>div {
    display: flex;
    align-items: center;
    gap: 11px
}

.service-banner svg {
    color: var(--navy)
}

.service-banner strong,
.service-banner span {
    display: block
}

.service-banner span {
    margin-top: 3px;
    color: #546780;
    font-size: 11px
}

.service-banner a {
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: bold
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 10;
    display: flex;
    justify-content: space-around;
    width: min(520px, 100%);
    height: 72px;
    transform: translateX(-50%);
    border-top: 1px solid var(--line);
    background: var(--card)
}

.nav-item {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-width: 60px;
    color: var(--muted);
    font-size: 10px
}

.nav-item svg {
    width: 20px
}

.nav-item.active {
    color: var(--navy);
    font-weight: bold
}

.dark .nav-item.active {
    color: #ffdc4d
}

.badge {
    position: absolute;
    top: 7px;
    right: 5px;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: #1b365d;
    font-size: 10px
}

.chips {
    display: flex;
    gap: 8px;
    overflow: auto;
    margin: 14px 0 16px
}

.chip {
    flex: 0 0 auto;
    border-radius: 99px;
    padding: 9px 13px;
    background: var(--soft);
    color: var(--ink)
}

.chip.active {
    background: var(--navy);
    color: #fff
}

.result-count {
    color: var(--muted);
    font-size: 12px
}

.cart-list {
    display: grid;
    gap: 13px
}

.cart-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 13px
}

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

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

.cart-item h3 {
    margin: 4px 0 10px;
    font-size: 14px
}

.cart-line {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.qty {
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 8px;
    background: var(--soft);
    padding: 4px 7px
}

.qty button {
    width: 21px;
    height: 21px;
    border-radius: 6px;
    background: var(--card);
    color: var(--navy);
    font-weight: bold
}

.summary {
    margin-top: 21px;
    padding: 15px;
    border-radius: 14px;
    background: var(--soft)
}

.summary>div {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    color: var(--muted)
}

.summary .summary-total {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px
}

.summary .gold-btn {
    width: 100%;
    margin-top: 10px;
    text-align: center
}

.empty {
    padding: 55px 15px;
    text-align: center;
    color: var(--muted)
}

.empty svg {
    width: 45px;
    height: 45px;
    color: var(--navy)
}

.empty h2 {
    color: var(--ink)
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 16px;
    background: #e6edf8
}

.avatar {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 17px;
    font-weight: bold
}

.profile-card h2 {
    margin: 0 0 4px;
    font-size: 17px
}

.profile-card p {
    margin: 0;
    color: #53657e;
    font-size: 12px
}

.menu-list {
    margin-top: 20px;
    border-top: 1px solid var(--line)
}

.menu-list a,
.menu-list button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 2px;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left
}

.menu-list span {
    flex: 1
}

.menu-list svg {
    width: 19px
}

.menu-list b {
    color: var(--muted);
    font-size: 11px
}

.order {
    margin-bottom: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 13px;
    background: var(--card)
}

.order>div {
    display: flex;
    align-items: center;
    gap: 10px
}

.order>div svg {
    color: #0d806a
}

.order span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px
}

.order strong {
    margin-left: auto
}

.order button {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    background: transparent;
    color: var(--navy);
    font-weight: bold
}

.qr-card {
    text-align: center;
    border-radius: 16px;
    padding: 20px;
    background: #e6edf8
}

.qr-card h2 {
    margin: 0 0 6px
}

.qr-card p,
.qr-card span {
    color: #53657e;
    font-size: 12px
}

.qr-card img {
    display: block;
    width: 210px;
    height: 210px;
    margin: 17px auto;
    border: 7px solid #fff
}

.qr-card strong,
.qr-card span {
    display: block
}

.payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 17px 4px;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left
}

.payment-row span {
    flex: 1
}

.service-card {
    margin: 15px 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 18px;
    background: var(--card)
}

.service-card>svg {
    color: var(--navy)
}

.service-card h2 {
    margin: 9px 0 6px;
    font-size: 18px
}

.service-card p {
    color: var(--muted);
    line-height: 1.45
}

.upload {
    display: block;
    margin: 13px 0;
    border: 1px dashed #8194af;
    border-radius: 10px;
    padding: 13px;
    text-align: center;
    color: var(--navy);
    font-weight: bold
}

.upload input {
    display: none
}

.service-card .gold-btn {
    width: 100%;
    text-align: center
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    align-items: end;
    background: rgba(5, 18, 39, .45)
}

.modal-sheet {
    width: min(520px, 100%);
    margin: auto;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    background: var(--card)
}

.modal-sheet img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 13px
}

.modal-sheet h2 {
    margin: 15px 0 5px
}

.modal-sheet p {
    color: var(--muted);
    line-height: 1.4
}

.modal-sheet>div {
    display: flex;
    gap: 9px
}

.modal-sheet button {
    flex: 1
}

.secondary-btn {
    border-radius: 9px;
    background: var(--soft);
    color: var(--ink);
    font-weight: bold
}

.toast {
    position: fixed;
    bottom: 86px;
    left: 50%;
    z-index: 30;
    transform: translate(-50%, 18px);
    opacity: 0;
    border-radius: 10px;
    padding: 11px 15px;
    background: #1b365d;
    color: #fff;
    transition: .2s
}

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

@media(max-width:360px) {
    .app {
        padding-left: 14px;
        padding-right: 14px
    }

    .topbar {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px
    }

    .product-card {
        flex-basis: 145px
    }
}