273 lines
11 KiB
CSS
273 lines
11 KiB
CSS
:root {
|
|
--bg: #faf6ef;
|
|
--card: #fffdf9;
|
|
--ink: #2b2118;
|
|
--ink-2: #7c6b5b;
|
|
--line: #ece2d4;
|
|
--red: #c0392b;
|
|
--red-soft: #fbeae7;
|
|
--gold: #c98a2b;
|
|
--green: #2f7d52;
|
|
--radius: 16px;
|
|
--shadow: 0 8px 24px rgba(60, 40, 20, .10);
|
|
}
|
|
|
|
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font: 15px/1.5 -apple-system, "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
|
|
}
|
|
|
|
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
|
|
|
|
.phone {
|
|
max-width: 520px;
|
|
margin: 0 auto;
|
|
min-height: 100vh;
|
|
padding-bottom: calc(96px + env(safe-area-inset-bottom));
|
|
}
|
|
|
|
/* 顶栏 */
|
|
.topbar {
|
|
position: sticky; top: 0; z-index: 30;
|
|
display: flex; align-items: center; justify-content: space-between; gap: 10px;
|
|
padding: 14px 16px 12px;
|
|
background: linear-gradient(180deg, #fff 70%, rgba(255,255,255,.92));
|
|
border-bottom: 1px solid var(--line);
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
.shop { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
.logo {
|
|
width: 38px; height: 38px; border-radius: 12px; flex: none;
|
|
display: grid; place-items: center;
|
|
background: var(--red); color: #fff; font-weight: 700; font-size: 18px;
|
|
}
|
|
h1 { margin: 0; font-size: 17px; letter-spacing: .5px; }
|
|
.slogan { margin: 0; font-size: 11px; color: var(--ink-2); }
|
|
.table-btn {
|
|
flex: none; display: flex; align-items: center; gap: 6px;
|
|
padding: 7px 12px; border-radius: 999px;
|
|
background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 600;
|
|
}
|
|
.table-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
|
|
|
|
.notice {
|
|
padding: 9px 16px; font-size: 12px; color: #8a6a2f;
|
|
background: #fdf5e3; border-bottom: 1px solid #f3e4c2;
|
|
}
|
|
|
|
/* 分类 */
|
|
.cats {
|
|
position: sticky; top: 63px; z-index: 20;
|
|
display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
|
|
padding: 10px 16px;
|
|
background: var(--bg);
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.cats::-webkit-scrollbar { display: none; }
|
|
.cat {
|
|
flex: none; padding: 7px 14px; border-radius: 999px;
|
|
background: #fff; border: 1px solid var(--line);
|
|
font-size: 13px; color: var(--ink-2); white-space: nowrap;
|
|
}
|
|
.cat.on { background: var(--ink); border-color: var(--ink); color: #fff; }
|
|
|
|
/* 菜单 */
|
|
.menu { padding: 12px 16px 8px; }
|
|
.section-title {
|
|
display: flex; align-items: baseline; gap: 8px;
|
|
margin: 18px 0 10px; font-size: 14px; font-weight: 700;
|
|
}
|
|
.section-title small { font-weight: 400; color: var(--ink-2); font-size: 11px; }
|
|
|
|
.dish {
|
|
display: flex; gap: 12px; align-items: stretch;
|
|
padding: 12px; margin-bottom: 12px;
|
|
background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
|
|
box-shadow: 0 1px 2px rgba(80,60,40,.04);
|
|
}
|
|
.dish-art {
|
|
width: 82px; height: 82px; flex: none; border-radius: 12px;
|
|
display: grid; place-items: center; font-size: 34px;
|
|
background: linear-gradient(145deg, #fff4e4, #f7e7d3);
|
|
}
|
|
.dish-art.has-img, .dish-hero.has-img, .art.has-img { padding: 0; overflow: hidden; background: #f3e7d6; }
|
|
.dish-art img, .dish-hero img, .art img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
|
|
.dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
.dish-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 650; }
|
|
.badge {
|
|
font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 6px;
|
|
background: var(--red-soft); color: var(--red);
|
|
}
|
|
.dish-desc { margin: 3px 0 auto; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
|
|
.dish-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
|
|
.price { font-size: 17px; font-weight: 700; color: var(--red); }
|
|
.price small { font-size: 11px; font-weight: 500; }
|
|
.meta { font-size: 11px; color: #a08e7c; }
|
|
.add {
|
|
width: 30px; height: 30px; border-radius: 50%; flex: none;
|
|
background: var(--red); color: #fff; font-size: 18px; line-height: 1;
|
|
display: grid; place-items: center;
|
|
}
|
|
.add:active { transform: scale(.94); }
|
|
|
|
/* 底部购物车 */
|
|
.cartbar {
|
|
position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom));
|
|
z-index: 40; display: flex; align-items: center; gap: 10px;
|
|
width: min(488px, calc(100% - 24px));
|
|
padding: 10px 10px 10px 16px;
|
|
background: var(--ink); color: #fff;
|
|
border-radius: 999px; box-shadow: var(--shadow);
|
|
}
|
|
.cartbar[hidden] { display: none; }
|
|
.cartbar-main { display: flex; align-items: center; gap: 12px; flex: 1; text-align: left; color: inherit; }
|
|
.cart-ico { position: relative; font-size: 20px; }
|
|
.cart-ico b {
|
|
position: absolute; top: -7px; right: -9px;
|
|
min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
|
|
background: var(--red); color: #fff; font-size: 10px; line-height: 17px; text-align: center;
|
|
}
|
|
.cart-sum { display: flex; flex-direction: column; }
|
|
.cart-sum b { font-size: 17px; }
|
|
.cart-sum small { font-size: 11px; opacity: .7; }
|
|
|
|
.primary {
|
|
padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
|
|
background: var(--red); color: #fff;
|
|
}
|
|
.primary:disabled { opacity: .45; }
|
|
.ghost {
|
|
padding: 11px 18px; border-radius: 999px; font-weight: 600;
|
|
background: #fff; border: 1px solid var(--line);
|
|
}
|
|
.grow { flex: 1; }
|
|
|
|
/* 弹层 */
|
|
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
|
|
.sheet[hidden] { display: none; }
|
|
.sheet-mask { position: absolute; inset: 0; background: rgba(30, 20, 10, .45); }
|
|
.sheet-body {
|
|
position: relative; width: min(520px, 100%);
|
|
max-height: 88vh; display: flex; flex-direction: column;
|
|
background: var(--bg); border-radius: 22px 22px 0 0;
|
|
box-shadow: 0 -8px 30px rgba(0,0,0,.18);
|
|
animation: up .22s ease-out;
|
|
}
|
|
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
|
|
.sheet-scroll { overflow-y: auto; padding: 0 16px; }
|
|
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
|
|
.sheet-head h2 { margin: 0; font-size: 16px; }
|
|
.link { color: var(--ink-2); font-size: 13px; }
|
|
.sheet-foot {
|
|
display: flex; align-items: center; gap: 12px;
|
|
padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
|
|
border-top: 1px solid var(--line); background: #fff;
|
|
}
|
|
|
|
.dish-hero {
|
|
height: 130px; display: grid; place-items: center; font-size: 62px;
|
|
background: linear-gradient(145deg, #fff4e4, #f6e2c9);
|
|
border-radius: 22px 22px 0 0;
|
|
}
|
|
.sheet-scroll h2 { margin: 14px 0 4px; font-size: 19px; }
|
|
.dish-desc { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; }
|
|
.dish-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
|
|
|
|
.opt-group { margin: 14px 0; }
|
|
.opt-group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; }
|
|
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
.opt {
|
|
padding: 8px 14px; border-radius: 999px; font-size: 13px;
|
|
background: #fff; border: 1px solid var(--line); color: var(--ink-2);
|
|
}
|
|
.opt.on { background: var(--red-soft); border-color: var(--red); color: var(--red); font-weight: 600; }
|
|
|
|
.field { display: block; margin: 14px 0; }
|
|
.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
|
|
.field input {
|
|
width: 100%; padding: 10px 12px; font: inherit; color: inherit;
|
|
background: #fff; border: 1px solid var(--line); border-radius: 12px;
|
|
}
|
|
.field input:focus { outline: 2px solid var(--red-soft); border-color: var(--red); }
|
|
|
|
.stepper { display: flex; align-items: center; gap: 12px; }
|
|
.stepper button {
|
|
width: 30px; height: 30px; border-radius: 50%;
|
|
background: #fff; border: 1px solid var(--line); font-size: 16px; line-height: 1;
|
|
}
|
|
.stepper b { min-width: 18px; text-align: center; }
|
|
.stepper.small button { width: 26px; height: 26px; font-size: 14px; }
|
|
|
|
/* 购物车明细 */
|
|
.cart-line { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
|
|
.cart-line .art { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fdf0dd; font-size: 20px; flex: none; }
|
|
.cart-line .info { flex: 1; min-width: 0; }
|
|
.cart-line .info b { font-size: 14px; }
|
|
.cart-line .info small { display: block; color: var(--ink-2); font-size: 11px; }
|
|
.cart-line .price { font-size: 14px; }
|
|
.cart-extra { padding-top: 4px; padding-bottom: 10px; }
|
|
.row-between { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 13px; }
|
|
.sums { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 13px; }
|
|
.sums div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-2); }
|
|
.sums .off { color: var(--red); }
|
|
.pay { display: flex; flex-direction: column; }
|
|
.pay small { font-size: 11px; color: var(--ink-2); }
|
|
.pay b { font-size: 19px; color: var(--red); }
|
|
|
|
/* 订单页 */
|
|
.page { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
|
|
.page[hidden] { display: none; }
|
|
.page-head {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff;
|
|
}
|
|
.page-head h2 { margin: 0; font-size: 16px; }
|
|
.icon-btn { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; }
|
|
.page-scroll { overflow-y: auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
|
|
|
|
.status-card {
|
|
padding: 18px; border-radius: var(--radius); color: #fff;
|
|
background: linear-gradient(135deg, #c0392b, #a5342a);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.status-card h3 { margin: 0 0 4px; font-size: 18px; }
|
|
.status-card p { margin: 0; font-size: 12px; opacity: .85; }
|
|
.steps { display: flex; gap: 6px; margin-top: 16px; }
|
|
.step { flex: 1; }
|
|
.step .bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.28); }
|
|
.step.done .bar { background: #fff; }
|
|
.step small { display: block; margin-top: 6px; font-size: 11px; opacity: .8; }
|
|
.step.done small { opacity: 1; font-weight: 600; }
|
|
|
|
.card { margin-top: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
|
|
.card h4 { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
|
|
.kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
|
|
.kv.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 15px; }
|
|
.tip { margin: 14px 4px; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
|
|
.row-gap { display: flex; gap: 10px; }
|
|
|
|
.hist-item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
|
|
.hist-item b { font-size: 14px; }
|
|
.hist-item small { color: var(--ink-2); font-size: 11px; display: block; }
|
|
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
|
|
.pill.warn { background: #fdf1d8; color: #8a6a2f; }
|
|
.pill.info { background: #e6eefb; color: #2b5a9b; }
|
|
.pill.good { background: #e5f3ea; color: var(--green); }
|
|
.pill.muted { background: #eee; color: #777; }
|
|
|
|
.toast {
|
|
position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom));
|
|
transform: translateX(-50%); z-index: 90;
|
|
padding: 10px 18px; border-radius: 999px;
|
|
background: rgba(35, 25, 15, .92); color: #fff; font-size: 13px;
|
|
animation: up .18s ease-out;
|
|
}
|
|
.toast[hidden] { display: none; }
|
|
|
|
.staff-entry { text-align: center; font-size: 12px; padding: 28px 0 132px; }
|
|
.staff-entry a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dashed var(--line); }
|