:root {
  --brand: #ff6f91;
  --brand-d: #e75480;
  --brand-l: #ffe3ec;
  --cream: #fff7f2;
  --gold: #f4b740;
  --ink: #3a2b2f;
  --muted: #9a8a8e;
  --line: #f0e2e6;
  --green: #2bb673;
  --shadow: 0 6px 20px rgba(231,84,128,.12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3eef0; color: var(--ink); font-size: 14px; line-height: 1.5;
}
.app {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--cream);
  position: relative; display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,.06);
}
.topbar {
  position: sticky; top: 0; z-index: 30; background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 8px;
}
.topbar .back { font-size: 20px; cursor: pointer; width: 28px; }
.topbar .title { font-weight: 700; font-size: 16px; flex: 1; text-align: center; }
.topbar .act { font-size: 13px; cursor: pointer; opacity: .95; }
.searchbox {
  flex: 1; background: rgba(255,255,255,.25); border-radius: 18px; padding: 6px 12px;
  display: flex; align-items: center; gap: 6px; color: #fff;
}
.searchbox input { border: 0; background: transparent; color: #fff; outline: none; flex: 1; font-size: 13px; }
.searchbox input::placeholder { color: rgba(255,255,255,.8); }
.view { flex: 1; padding: 12px; padding-bottom: 70px; overflow-y: auto; }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 40;
}
.tabbar .tab { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--muted); cursor: pointer; }
.tabbar .tab .ic { font-size: 20px; display: block; line-height: 1; }
.tabbar .tab.on { color: var(--brand-d); font-weight: 700; }
.tabbar .tab .badge { position: absolute; transform: translate(14px,-22px); background: var(--brand-d); color:#fff; border-radius: 10px; font-size: 10px; padding: 0 5px; min-width: 16px; }

/* banner */
.banner { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }
.banner .slide { padding: 22px 18px; color: #fff; background: linear-gradient(135deg,#ffb6c8,#ff8fab); display: flex; align-items: center; gap: 14px; }
.banner .slide .emo { font-size: 44px; }
.banner .slide .t { font-size: 17px; font-weight: 800; }
.banner .slide .s { font-size: 12px; opacity: .92; margin-top: 4px; }
.dots { text-align: center; margin: -4px 0 12px; }
.dots span { display: inline-block; width: 6px; height: 6px; border-radius: 6px; background: #e7c9d2; margin: 0 3px; }
.dots span.on { background: var(--brand-d); width: 16px; }

/* quick entries */
.quick { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }
.quick .q { background: #fff; border-radius: 12px; padding: 10px 4px; text-align: center; box-shadow: var(--shadow); cursor: pointer; }
.quick .q .e { font-size: 24px; }
.quick .q .l { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* section */
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.sec-h .t { font-size: 16px; font-weight: 800; }
.sec-h .t::before { content: ''; display: inline-block; width: 4px; height: 15px; background: var(--brand); border-radius: 3px; margin-right: 7px; vertical-align: -2px; }
.sec-h .more { font-size: 12px; color: var(--muted); }

/* product grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; }
.pcard .ph { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 52px; background: linear-gradient(135deg,#fff0f4,#ffe3ec); position: relative; }
.pcard .ph .tag { position: absolute; top: 8px; left: 8px; background: var(--brand-d); color:#fff; font-size: 10px; padding: 2px 6px; border-radius: 8px; }
.pcard .ph .tag.new { background: #ff9f43; }
.pcard .ph .tag.hot { background: #ff5e62; }
.pcard .body { padding: 8px 10px 10px; }
.pcard .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .meta { font-size: 11px; color: var(--muted); margin: 3px 0 6px; }
.pcard .price { color: var(--brand-d); font-weight: 800; font-size: 15px; }
.pcard .price small { color: var(--muted); font-weight: 400; text-decoration: line-through; font-size: 11px; margin-left: 4px; }
.pcard .add { float: right; background: var(--brand); color:#fff; border:0; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; cursor: pointer; }

/* filter bar */
.fbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 6px; }
.fbar .c { white-space: nowrap; background: #fff; border: 1px solid var(--line); color: var(--muted); border-radius: 16px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.fbar .c.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.sortbar { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sortbar .c.on { color: var(--brand-d); font-weight: 700; }

/* detail */
.dph { height: 240px; display: flex; align-items: center; justify-content: center; font-size: 110px; background: linear-gradient(135deg,#fff0f4,#ffe3ec); border-radius: 14px; margin-bottom: 12px; }
.dname { font-size: 19px; font-weight: 800; }
.dmeta { color: var(--muted); font-size: 12px; margin: 6px 0; }
.dprice { color: var(--brand-d); font-size: 22px; font-weight: 800; }
.dprice small { color: var(--muted); font-weight: 400; text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.attr { background: #fff; border-radius: 12px; padding: 12px; margin: 12px 0; box-shadow: var(--shadow); }
.attr .row { display: flex; align-items: center; margin-bottom: 12px; }
.attr .row:last-child { margin-bottom: 0; }
.attr .lab { width: 56px; color: var(--muted); font-size: 13px; }
.attr .opts { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.attr .opt { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 13px; cursor: pointer; background: #fff; }
.attr .opt.on { border-color: var(--brand); color: var(--brand-d); background: var(--brand-l); font-weight: 700; }
.attr .opt.dis { opacity: .4; text-decoration: line-through; }
.desc { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); font-size: 13px; color: #5a4a4e; }
.desc h4 { margin: 10px 0 4px; font-size: 13px; color: var(--ink); }
.desc h4:first-child { margin-top: 0; }
.bar2 { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; padding: 8px 12px; gap: 10px; z-index: 35; }
.bar2 .price { color: var(--brand-d); font-weight: 800; font-size: 18px; flex: 1; }
.btn { border: 0; border-radius: 22px; padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn.pri { background: var(--brand); color: #fff; }
.btn.ghost { background: #fff; color: var(--brand-d); border: 1px solid var(--brand); }
.btn.gold { background: var(--gold); color: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 16px; cursor: pointer; }
.qty span { min-width: 20px; text-align: center; }

/* cart */
.citem { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow); align-items: center; }
.citem .ph { width: 60px; height: 60px; border-radius: 10px; background: linear-gradient(135deg,#fff0f4,#ffe3ec); display:flex; align-items:center; justify-content:center; font-size: 30px; }
.citem .info { flex: 1; }
.citem .nm { font-weight: 600; font-size: 13px; }
.citem .sp { color: var(--muted); font-size: 11px; margin: 2px 0; }
.citem .pr { color: var(--brand-d); font-weight: 700; }

/* form */
.field { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 14px; outline: none; font-family: inherit; }
.field textarea { resize: vertical; min-height: 64px; }

/* member */
.mhero { background: linear-gradient(135deg,var(--brand),var(--brand-d)); color: #fff; border-radius: 14px; padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.mhero .nm { font-size: 18px; font-weight: 800; }
.mhero .lv { display: inline-block; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; font-size: 12px; margin-top: 6px; }
.mhero .row { display: flex; margin-top: 14px; text-align: center; }
.mhero .row .c { flex: 1; }
.mhero .row .n { font-size: 18px; font-weight: 800; }
.mhero .row .l { font-size: 11px; opacity: .9; }
.mlist { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.mlist .it { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mlist .it:last-child { border-bottom: 0; }
.mlist .it .e { font-size: 20px; width: 30px; }
.mlist .it .t { flex: 1; font-size: 14px; }
.mlist .it .r { color: var(--muted); font-size: 13px; }

/* coupons */
.coupon { display: flex; background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.coupon .l { width: 96px; background: linear-gradient(135deg,var(--brand),var(--brand-d)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; }
.coupon .l .v { font-size: 22px; font-weight: 800; }
.coupon .l .v small { font-size: 12px; }
.coupon .r { flex: 1; padding: 10px 12px; }
.coupon .r .nm { font-weight: 700; }
.coupon .r .cond { font-size: 11px; color: var(--muted); margin-top: 3px; }
.coupon .get { align-self: center; padding: 0 14px; }
.coupon .get button { background: var(--brand); color: #fff; border: 0; border-radius: 16px; padding: 7px 14px; font-size: 12px; cursor: pointer; }
.coupon.used { filter: grayscale(.8); opacity: .7; }

/* order */
.ord { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }
.ord .h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ord .st { font-weight: 700; }
.st-pending{color:#999}.st-paid{color:#ff9f43}.st-making{color:#5b8def}.st-delivering{color:#9b59b6}.st-done{color:var(--green)}.st-canceled{color:#bbb}.st-refund{color:#e74c3c}
.ord .it { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; }
.ord .it .ph { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg,#fff0f4,#ffe3ec); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ord .total { text-align: right; font-size: 13px; margin-top: 8px; }
.ord .total b { color: var(--brand-d); }

/* progress */
.prog { display: flex; justify-content: space-between; margin: 14px 0; position: relative; }
.prog::before { content: ''; position: absolute; top: 13px; left: 10%; right: 10%; height: 2px; background: var(--line); }
.prog .p { text-align: center; flex: 1; z-index: 1; }
.prog .p .dot { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; background: var(--line); color: #fff; margin: 0 auto; font-size: 13px; }
.prog .p.on .dot { background: var(--brand); }
.prog .p .l { font-size: 10px; color: var(--muted); margin-top: 4px; }
.prog .p.on .l { color: var(--brand-d); }

/* modal */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: none; align-items: flex-end; }
.mask.show { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 16px 16px 0 0; padding: 16px; max-height: 80vh; overflow-y: auto; }
.sheet h3 { margin: 0 0 12px; font-size: 16px; }
.sheet .close { float: right; font-size: 20px; cursor: pointer; color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 99; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80%; text-align: center; }
.toast.show { opacity: 1; }

/* custom */
.upbox { border: 2px dashed var(--brand); border-radius: 12px; height: 130px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; cursor: pointer; overflow: hidden; position: relative; }
.upbox img { max-width: 100%; max-height: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .c { border: 1px solid var(--line); border-radius: 16px; padding: 6px 14px; font-size: 13px; cursor: pointer; background: #fff; }
.chips .c.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.note { background: #fff7e6; border: 1px solid #ffe1a8; color: #a06b00; border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 13px; }
.empty .e { font-size: 50px; display: block; margin-bottom: 10px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.mt8{margin-top:8px}.mt12{margin-top:12px}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}
.muted{color:var(--muted)} .brand{color:var(--brand-d)} .bold{font-weight:700}
