r117/public/style.css · 约 14019 字符
1:root {2 --brand: #ff6f91;3 --brand-d: #e75480;4 --brand-l: #ffe3ec;5 --cream: #fff7f2;6 --gold: #f4b740;7 --ink: #3a2b2f;8 --muted: #9a8a8e;9 --line: #f0e2e6;10 --green: #2bb673;11 --shadow: 0 6px 20px rgba(231,84,128,.12);12}13* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }14html, body { margin: 0; padding: 0; }15body {16 font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;17 background: #f3eef0; color: var(--ink); font-size: 14px; line-height: 1.5;18}19.app {20 max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--cream);21 position: relative; display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,.06);22}23.topbar {24 position: sticky; top: 0; z-index: 30; background: linear-gradient(135deg, var(--brand), var(--brand-d));25 color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 8px;26}27.topbar .back { font-size: 20px; cursor: pointer; width: 28px; }28.topbar .title { font-weight: 700; font-size: 16px; flex: 1; text-align: center; }29.topbar .act { font-size: 13px; cursor: pointer; opacity: .95; }30.searchbox {31 flex: 1; background: rgba(255,255,255,.25); border-radius: 18px; padding: 6px 12px;32 display: flex; align-items: center; gap: 6px; color: #fff;33}34.searchbox input { border: 0; background: transparent; color: #fff; outline: none; flex: 1; font-size: 13px; }35.searchbox input::placeholder { color: rgba(255,255,255,.8); }36.view { flex: 1; padding: 12px; padding-bottom: 70px; overflow-y: auto; }37.tabbar {38 position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;39 display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 40;40}41.tabbar .tab { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--muted); cursor: pointer; }42.tabbar .tab .ic { font-size: 20px; display: block; line-height: 1; }43.tabbar .tab.on { color: var(--brand-d); font-weight: 700; }44.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; }4546/* banner */47.banner { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px; }48.banner .slide { padding: 22px 18px; color: #fff; background: linear-gradient(135deg,#ffb6c8,#ff8fab); display: flex; align-items: center; gap: 14px; }49.banner .slide .emo { font-size: 44px; }50.banner .slide .t { font-size: 17px; font-weight: 800; }51.banner .slide .s { font-size: 12px; opacity: .92; margin-top: 4px; }52.dots { text-align: center; margin: -4px 0 12px; }53.dots span { display: inline-block; width: 6px; height: 6px; border-radius: 6px; background: #e7c9d2; margin: 0 3px; }54.dots span.on { background: var(--brand-d); width: 16px; }5556/* quick entries */57.quick { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }58.quick .q { background: #fff; border-radius: 12px; padding: 10px 4px; text-align: center; box-shadow: var(--shadow); cursor: pointer; }59.quick .q .e { font-size: 24px; }60.quick .q .l { font-size: 11px; color: var(--muted); margin-top: 4px; }6162/* section */63.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }64.sec-h .t { font-size: 16px; font-weight: 800; }65.sec-h .t::before { content: ''; display: inline-block; width: 4px; height: 15px; background: var(--brand); border-radius: 3px; margin-right: 7px; vertical-align: -2px; }66.sec-h .more { font-size: 12px; color: var(--muted); }6768/* product grid */69.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }70.pcard { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; }71.pcard .ph { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 52px; background: linear-gradient(135deg,#fff0f4,#ffe3ec); position: relative; }72.pcard .ph .tag { position: absolute; top: 8px; left: 8px; background: var(--brand-d); color:#fff; font-size: 10px; padding: 2px 6px; border-radius: 8px; }73.pcard .ph .tag.new { background: #ff9f43; }74.pcard .ph .tag.hot { background: #ff5e62; }75.pcard .body { padding: 8px 10px 10px; }76.pcard .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }77.pcard .meta { font-size: 11px; color: var(--muted); margin: 3px 0 6px; }78.pcard .price { color: var(--brand-d); font-weight: 800; font-size: 15px; }79.pcard .price small { color: var(--muted); font-weight: 400; text-decoration: line-through; font-size: 11px; margin-left: 4px; }80.pcard .add { float: right; background: var(--brand); color:#fff; border:0; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; cursor: pointer; }8182/* filter bar */83.fbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 6px; }84.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; }85.fbar .c.on { background: var(--brand); color: #fff; border-color: var(--brand); }86.sortbar { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }87.sortbar .c.on { color: var(--brand-d); font-weight: 700; }8889/* detail */90.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; }91.dname { font-size: 19px; font-weight: 800; }92.dmeta { color: var(--muted); font-size: 12px; margin: 6px 0; }93.dprice { color: var(--brand-d); font-size: 22px; font-weight: 800; }94.dprice small { color: var(--muted); font-weight: 400; text-decoration: line-through; font-size: 13px; margin-left: 6px; }95.attr { background: #fff; border-radius: 12px; padding: 12px; margin: 12px 0; box-shadow: var(--shadow); }96.attr .row { display: flex; align-items: center; margin-bottom: 12px; }97.attr .row:last-child { margin-bottom: 0; }98.attr .lab { width: 56px; color: var(--muted); font-size: 13px; }99.attr .opts { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }100.attr .opt { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 13px; cursor: pointer; background: #fff; }101.attr .opt.on { border-color: var(--brand); color: var(--brand-d); background: var(--brand-l); font-weight: 700; }102.attr .opt.dis { opacity: .4; text-decoration: line-through; }103.desc { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); font-size: 13px; color: #5a4a4e; }104.desc h4 { margin: 10px 0 4px; font-size: 13px; color: var(--ink); }105.desc h4:first-child { margin-top: 0; }106.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; }107.bar2 .price { color: var(--brand-d); font-weight: 800; font-size: 18px; flex: 1; }108.btn { border: 0; border-radius: 22px; padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }109.btn.pri { background: var(--brand); color: #fff; }110.btn.ghost { background: #fff; color: var(--brand-d); border: 1px solid var(--brand); }111.btn.gold { background: var(--gold); color: #fff; }112.btn.block { width: 100%; }113.btn:disabled { opacity: .5; cursor: not-allowed; }114.qty { display: inline-flex; align-items: center; gap: 10px; }115.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 16px; cursor: pointer; }116.qty span { min-width: 20px; text-align: center; }117118/* cart */119.citem { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow); align-items: center; }120.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; }121.citem .info { flex: 1; }122.citem .nm { font-weight: 600; font-size: 13px; }123.citem .sp { color: var(--muted); font-size: 11px; margin: 2px 0; }124.citem .pr { color: var(--brand-d); font-weight: 700; }125126/* form */127.field { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }128.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }129.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; }130.field textarea { resize: vertical; min-height: 64px; }131132/* member */133.mhero { background: linear-gradient(135deg,var(--brand),var(--brand-d)); color: #fff; border-radius: 14px; padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }134.mhero .nm { font-size: 18px; font-weight: 800; }135.mhero .lv { display: inline-block; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; font-size: 12px; margin-top: 6px; }136.mhero .row { display: flex; margin-top: 14px; text-align: center; }137.mhero .row .c { flex: 1; }138.mhero .row .n { font-size: 18px; font-weight: 800; }139.mhero .row .l { font-size: 11px; opacity: .9; }140.mlist { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }141.mlist .it { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }142.mlist .it:last-child { border-bottom: 0; }143.mlist .it .e { font-size: 20px; width: 30px; }144.mlist .it .t { flex: 1; font-size: 14px; }145.mlist .it .r { color: var(--muted); font-size: 13px; }146147/* coupons */148.coupon { display: flex; background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }149.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; }150.coupon .l .v { font-size: 22px; font-weight: 800; }151.coupon .l .v small { font-size: 12px; }152.coupon .r { flex: 1; padding: 10px 12px; }153.coupon .r .nm { font-weight: 700; }154.coupon .r .cond { font-size: 11px; color: var(--muted); margin-top: 3px; }155.coupon .get { align-self: center; padding: 0 14px; }156.coupon .get button { background: var(--brand); color: #fff; border: 0; border-radius: 16px; padding: 7px 14px; font-size: 12px; cursor: pointer; }157.coupon.used { filter: grayscale(.8); opacity: .7; }158159/* order */160.ord { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }161.ord .h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }162.ord .st { font-weight: 700; }163.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}164.ord .it { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; }165.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; }166.ord .total { text-align: right; font-size: 13px; margin-top: 8px; }167.ord .total b { color: var(--brand-d); }168169/* progress */170.prog { display: flex; justify-content: space-between; margin: 14px 0; position: relative; }171.prog::before { content: ''; position: absolute; top: 13px; left: 10%; right: 10%; height: 2px; background: var(--line); }172.prog .p { text-align: center; flex: 1; z-index: 1; }173.prog .p .dot { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; background: var(--line); color: #fff; margin: 0 auto; font-size: 13px; }174.prog .p.on .dot { background: var(--brand); }175.prog .p .l { font-size: 10px; color: var(--muted); margin-top: 4px; }176.prog .p.on .l { color: var(--brand-d); }177178/* modal */179.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: none; align-items: flex-end; }180.mask.show { display: flex; }181.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; }182.sheet h3 { margin: 0 0 12px; font-size: 16px; }183.sheet .close { float: right; font-size: 20px; cursor: pointer; color: var(--muted); }184185/* toast */186.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; }187.toast.show { opacity: 1; }188189/* custom */190.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; }191.upbox img { max-width: 100%; max-height: 100%; }192.chips { display: flex; flex-wrap: wrap; gap: 8px; }193.chips .c { border: 1px solid var(--line); border-radius: 16px; padding: 6px 14px; font-size: 13px; cursor: pointer; background: #fff; }194.chips .c.on { background: var(--brand); color: #fff; border-color: var(--brand); }195196.note { background: #fff7e6; border: 1px solid #ffe1a8; color: #a06b00; border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }197.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 13px; }198.empty .e { font-size: 50px; display: block; margin-bottom: 10px; }199.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }200.mt8{margin-top:8px}.mt12{margin-top:12px}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}201.muted{color:var(--muted)} .brand{color:var(--brand-d)} .bold{font-weight:700}202