/* 花山老表鸡汤包 煲 - 通用样式（移动端优先，H5 测试版）
   配色：热汤橙红 #E8552D（主操作）+ 深酱棕 #2C1A12（头/深字）+ 米汤白 #FBF3E9（底） */
:root {
  --brand: #E8552D;
  --brand-dark: #C9431E;
  --ink: #2C1A12;
  --bg: #FBF3E9;
  --card: #ffffff;
  --text: #2A1A12;
  --muted: #9A8B7C;
  --line: #EFE2D4;
  --ok: #2BB673;
  --shadow: 0 6px 20px rgba(44, 26, 18, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 顶部标题栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .5px; }
.topbar .sub { font-size: 12px; opacity: .7; }
.topbar .right { margin-left: auto; font-size: 13px; opacity: .85; }
.topbar .ap { font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 3px; margin-left: 8px; }
.topbar .ap input { width: 14px; height: 14px; accent-color: var(--brand); }

/* 主内容区 */
.wrap { padding: 12px 12px 96px; }

/* 区块标题 */
.section-title { font-size: 15px; font-weight: 700; margin: 14px 4px 8px; color: var(--ink); }

/* 分类标签 */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; -ms-overflow-style: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 7px 16px; border-radius: 999px;
  background: #fff; color: var(--muted); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); transition: .15s;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 顶部轮播海报 */
.banner { position: relative; overflow: hidden; background: var(--ink); }
.slides { display: flex; transition: transform .4s ease; }
.slide { flex: 0 0 100%; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 0 20px; }
.slide .b-emoji { font-size: 46px; margin-bottom: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.slide .b-title { font-size: 21px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,.22); }
.slide .b-sub { font-size: 13px; opacity: .92; margin-top: 7px; }
.dots { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); transition: .25s; }
.dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* 商品卡片 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .12s;
}
.card:active { transform: scale(.98); }
.card .thumb {
  width: 100%; aspect-ratio: 1/1; background: #f0ece6 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: #c9bdb0; font-size: 46px;
}
.card .body { padding: 10px 11px 12px; flex: 1; display: flex; flex-direction: column; }
.card .name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.card .price { color: var(--brand); font-weight: 800; margin-top: 6px; font-size: 16px; }
.card .price small { font-size: 11px; font-weight: 600; }
.card .add {
  margin-top: auto; align-self: flex-end;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--brand); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(232,85,45,.35);
}
.card .add:active { transform: scale(.9); }
.card .stepper { margin-top: auto; align-self: flex-end; display: flex; align-items: center; gap: 10px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: none; font-size: 18px; cursor: pointer; }
.stepper .minus { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.stepper .plus { background: var(--brand); color: #fff; }
.stepper .qty { font-weight: 800; min-width: 18px; text-align: center; }

/* 底部购物车栏 */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  background: var(--ink); color: #fff; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; z-index: 30;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.cartbar.hidden { display: none; }
.cartbar .icon { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cartbar .badge { position: absolute; top: -4px; right: -4px; background: #fff; color: var(--brand); font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cartbar .info { flex: 1; }
.cartbar .total { font-size: 20px; font-weight: 800; }
.cartbar .hint { font-size: 11px; opacity: .7; }
.cartbar .checkout { background: var(--brand); color: #fff; border: none; padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 700; cursor: pointer; }
.cartbar .checkout:active { transform: scale(.97); }

/* 弹层（购物车 / 备注 / 提示） */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: none; }
.sheet-mask.show { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  background: #fff; border-radius: 20px 20px 0 0; z-index: 41; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .25s; max-height: 78vh; overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet h3 { margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.sheet .row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sheet .row .nm { flex: 1; font-size: 14px; font-weight: 600; }
.sheet .row .pr { color: var(--brand); font-weight: 700; font-size: 13px; }
.sheet .note-input { width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; resize: none; }
.sheet .close-x { position: absolute; top: 14px; right: 16px; font-size: 22px; color: var(--muted); }

/* 通用按钮 */
.btn { display: block; width: 100%; padding: 14px; border: none; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; }

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.82); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 60; display: none; max-width: 80%; text-align: center; }

/* ===== 取餐码成功弹层（全屏大编号） ===== */
.pay-success-mask {
  position: fixed; inset: 0; z-index: 80;
  background: linear-gradient(160deg, #E8552D, #C9431E);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.pay-success-mask.show { display: flex; animation: psFade .25s ease; }
@keyframes psFade { from { opacity: 0; } to { opacity: 1; } }
.pay-success { width: 100%; max-width: 360px; text-align: center; color: #fff; }
.ps-check { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--brand); font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.ps-label { font-size: 16px; opacity: .96; }
.ps-num { font-size: 130px; font-weight: 900; line-height: 1; margin: 4px 0; letter-spacing: 3px; text-shadow: 0 8px 24px rgba(0,0,0,.28); }
.ps-tip { font-size: 14px; opacity: .9; margin-bottom: 18px; }
.ps-summary { background: rgba(255,255,255,.14); border-radius: 16px; padding: 14px 18px; text-align: left; }
.ps-summary .li { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.ps-summary .li.total { border-top: 1px solid rgba(255,255,255,.3); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 16px; }
.btn-ghost { background: rgba(255,255,255,.95); color: var(--brand); margin-top: 20px; }

/* ===== 厨房端 ===== */
.kitchen-stats { display: flex; gap: 10px; margin: 10px 0 14px; }
.stat { flex: 1; background: #fff; border-radius: 14px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 900; color: var(--brand); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.order-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px; border-left: 5px solid var(--brand);
  animation: pop .35s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.order-card.done { border-left-color: var(--ok); opacity: .6; }
.order-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.order-card .num { font-size: 40px; font-weight: 900; color: var(--ink); line-height: 1; }
.order-card .meta { font-size: 12px; color: var(--muted); }
.order-card .item { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.order-card .item .note { color: var(--brand); font-size: 12px; }
.order-card .order-note { font-size: 13px; color: var(--ink); background: #fff7f1; padding: 6px 10px; border-radius: 8px; margin: 6px 0; }
.order-card .acts { display: flex; gap: 10px; margin-top: 10px; }
.order-card .acts button { flex: 1; padding: 11px; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.order-card .acts .print { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.order-card .acts .call { background: var(--ok); color: #fff; }
.order-card .acts .call:active { transform: scale(.97); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty .big { font-size: 48px; margin-bottom: 10px; }

/* ===== 商品管理 ===== */
.admin-form { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.admin-form input, .admin-form select {
  width: 100%; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
}
.admin-form .two { display: flex; gap: 10px; }
.admin-form .two > * { flex: 1; }
.prod-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.prod-row .pimg { width: 44px; height: 44px; border-radius: 10px; background: #f0f1f3 center/cover no-repeat; flex: 0 0 auto; }
.prod-row .pinfo { flex: 1; min-width: 0; }
.prod-row .pname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-row .pcat { font-size: 11px; color: var(--muted); }
.prod-row .pprice { color: var(--brand); font-weight: 800; font-size: 14px; width: 70px; text-align: right; }
.prod-row .pacts { display: flex; gap: 6px; }
.prod-row .pacts button { border: none; background: #f3f4f6; border-radius: 8px; padding: 6px 9px; font-size: 12px; cursor: pointer; }
.prod-row .pacts .del { color: #e23; }
.prod-row.off { opacity: .5; }

/* 打印小票（80mm 热敏） */
@media print {
  body { max-width: none; background: #fff; }
  .noprint { display: none !important; }
}
.receipt { width: 78mm; margin: 0 auto; padding: 6px 2px; font-family: "Courier New", monospace; font-size: 13px; color: #000; }
.receipt .c { text-align: center; }
.receipt .t { font-size: 16px; font-weight: bold; }
.receipt .big { font-size: 40px; font-weight: bold; text-align: center; margin: 6px 0; }
.receipt .line { border-top: 1px dashed #000; margin: 6px 0; }
.receipt .ri { display: flex; justify-content: space-between; }
.receipt .foot { text-align: center; margin-top: 8px; font-size: 11px; }

/* 购物车弹层标题/备注微调 */
.sheet h3 { display: flex; align-items: center; }
.sheet .note-input { width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; box-sizing: border-box; }

