小草奶茶铺_H5/style.css · 约 13534 字符
1/* 小草奶茶铺 · 移动端 H5 样式 */
2*{margin:0;padding:0;box-sizing:border-box}
3body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:#fdf6ec;color:#4a3120;max-width:430px;margin:0 auto;min-height:100vh}
4a{text-decoration:none;color:inherit}
5ul{list-style:none}
6:root{--primary:#a16207;--primary-light:#fdf0d8;--secondary:#e8a13c;--accent:#f0b429;--dark:#5b3a13;--gray:#a08c6f;--light-gray:#f3e8d6;--green:#52c41a;--blue:#1890ff;--red:#e23b2e}
7.header{background:linear-gradient(135deg,#a16207,#e8a13c);color:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100;box-shadow:0 2px 8px rgba(161,98,7,.3)}
8.header .back{font-size:22px;cursor:pointer;width:32px}
9.header h1{font-size:17px;font-weight:600;flex:1;text-align:center}
10.header .right{width:32px;text-align:right;font-size:14px}
11.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;background:#fff;border-top:1px solid #eee;display:flex;z-index:100;padding-bottom:env(safe-area-inset-bottom)}
12.tabbar a{flex:1;text-align:center;padding:8px 0;color:#999;font-size:11px}
13.tabbar a.active{color:var(--primary)}
14.tabbar a .icon{font-size:22px;display:block;margin-bottom:2px}
15.card{background:#fff;border-radius:12px;margin:12px;padding:16px;box-shadow:0 1px 4px rgba(0,0,0,.06)}
16.section-title{font-size:16px;font-weight:700;margin:16px 16px 8px;display:flex;justify-content:space-between;align-items:center}
17.section-title span{font-size:12px;color:#999;font-weight:400}
18.btn{display:block;width:100%;padding:13px;border:none;border-radius:25px;font-size:15px;font-weight:600;cursor:pointer;text-align:center}
19.btn-primary{background:linear-gradient(135deg,#a16207,#e8a13c);color:#fff}
20.btn-outline{background:#fff;border:1px solid var(--primary);color:var(--primary)}
21.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600}
22.badge-hot{background:#fff1f0;color:#ff4d4f}
23.badge-new{background:#e6f7ff;color:var(--blue)}
24.badge-sale{background:#fff7e6;color:var(--accent)}
25.tag{display:inline-block;padding:2px 6px;border-radius:4px;font-size:11px;background:var(--light-gray);color:#7a6a55;margin:2px 4px 0 0}
26/* 首页 */
27.banner{height:130px;margin:12px;border-radius:14px;background:linear-gradient(135deg,#a16207,#f0b429);color:#fff;display:flex;align-items:center;padding:20px;position:relative;overflow:hidden}
28.banner .bn-title{font-size:22px;font-weight:800;letter-spacing:1px}
29.banner .bn-sub{font-size:13px;opacity:.92;margin-top:6px}
30.banner .bn-emoji{position:absolute;right:18px;font-size:56px;opacity:.95}
31.search-bar{background:#fff;margin:12px;border-radius:25px;padding:10px 16px;display:flex;align-items:center;gap:8px;box-shadow:0 1px 4px rgba(0,0,0,.06)}
32.search-bar .sb-icon{font-size:16px}
33.search-bar .sb-text{flex:1;color:#999;font-size:14px}
34.search-bar .sb-btn{color:var(--primary);font-size:14px;font-weight:600}
35.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:16px 12px;background:#fff;margin:12px;border-radius:12px}
36.quick-grid a{text-align:center;font-size:12px;color:#6b5744}
37.quick-grid a .qicon{font-size:28px;display:block;margin-bottom:4px}
38.goods-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:0 12px}
39.goods-card{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.05)}
40.goods-card .gc-img{height:100px;display:flex;align-items:center;justify-content:center;font-size:42px;position:relative}
41.goods-card .gc-tag{position:absolute;top:6px;left:6px}
42.goods-card .gc-body{padding:10px}
43.goods-card .gc-name{font-size:13px;font-weight:600;line-height:1.4;height:36px;overflow:hidden}
44.goods-card .gc-desc{font-size:11px;color:#a08c6f;margin-top:2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
45.goods-card .gc-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
46.goods-card .gc-price{color:var(--red);font-weight:700;font-size:15px}
47.goods-card .gc-price em{font-style:normal;font-size:11px}
48.goods-card .gc-add{width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,#a16207,#e8a13c);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer}
49/* 优惠券 */
50.coupon{display:flex;align-items:center;background:#fff;border-radius:12px;margin:10px 12px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.05)}
51.coupon .cp-left{background:linear-gradient(135deg,#a16207,#e8a13c);color:#fff;width:92px;text-align:center;padding:14px 6px;position:relative}
52.coupon .cp-left .amt{font-size:22px;font-weight:800}
53.coupon .cp-left .amt em{font-style:normal;font-size:12px}
54.coupon .cp-body{flex:1;padding:12px 14px}
55.coupon .cp-name{font-size:14px;font-weight:600}
56.coupon .cp-desc{font-size:12px;color:#a08c6f;margin-top:3px}
57.coupon .cp-get{font-size:12px;color:var(--primary);font-weight:600}
58/* 点单 */
59.menu-wrap{display:flex;padding-bottom:70px}
60.menu-side{width:88px;background:#f6ecd9;min-height:calc(100vh - 50px)}
61.menu-side a{display:block;padding:14px 8px;font-size:12px;color:#7a6a55;text-align:center;border-left:3px solid transparent}
62.menu-side a.active{background:#fff;color:var(--primary);font-weight:700;border-left-color:var(--primary)}
63.menu-main{flex:1;padding:12px;padding-bottom:80px}
64.menu-item{display:flex;background:#fff;border-radius:12px;padding:10px;margin-bottom:10px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
65.menu-item .mi-img{width:64px;height:64px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:32px;flex-shrink:0;background:var(--primary-light)}
66.menu-item .mi-body{flex:1;padding-left:10px;position:relative}
67.menu-item .mi-name{font-size:13px;font-weight:600}
68.menu-item .mi-desc{font-size:11px;color:#a08c6f;margin-top:2px}
69.menu-item .mi-spec{font-size:10px;color:#b09a7a;margin-top:3px}
70.menu-item .mi-foot{display:flex;justify-content:space-between;align-items:center;margin-top:6px}
71.menu-item .mi-price{color:var(--red);font-weight:700;font-size:14px}
72.menu-item .mi-price em{font-style:normal;font-size:11px}
73.cart-bar{position:fixed;bottom:56px;left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:406px;background:#3a2510;color:#fff;border-radius:30px;display:flex;align-items:center;padding:8px 10px 8px 14px;z-index:99;box-shadow:0 4px 14px rgba(0,0,0,.25)}
74.cart-bar .cb-icon{font-size:24px;position:relative}
75.cart-bar .cb-count{position:absolute;top:-4px;right:-6px;background:#ff4d4f;color:#fff;font-size:10px;min-width:16px;height:16px;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0 4px}
76.cart-bar .cb-total{flex:1;padding-left:12px;font-size:13px}
77.cart-bar .cb-total b{font-size:18px;color:#ffd666}
78.cart-bar .cb-btn{background:linear-gradient(135deg,#f0b429,#e8a13c);color:#3a2510;padding:8px 18px;border-radius:20px;font-size:14px;font-weight:700}
79/* 规格弹层 */
80.mask{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:200;display:none}
81.mask.show{display:block}
82.spec-sheet{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;background:#fff;border-radius:16px 16px 0 0;z-index:201;padding:16px;display:none;max-height:80vh;overflow:auto}
83.spec-sheet.show{display:block}
84.spec-sheet .ss-head{display:flex;gap:12px;padding-bottom:12px;border-bottom:1px solid #f0f0f0}
85.spec-sheet .ss-img{width:80px;height:80px;border-radius:12px;background:var(--primary-light);display:flex;align-items:center;justify-content:center;font-size:40px}
86.spec-sheet .ss-price{color:var(--red);font-weight:800;font-size:18px;margin-top:4px}
87.spec-group{margin-top:14px}
88.spec-group h4{font-size:13px;color:#6b5744;margin-bottom:8px}
89.spec-options{display:flex;flex-wrap:wrap;gap:8px}
90.spec-option{padding:7px 14px;border:1px solid #e5dcc8;border-radius:20px;font-size:12px;color:#6b5744;cursor:pointer;background:#fdfaf3}
91.spec-option.sel{border-color:var(--primary);background:var(--primary-light);color:var(--primary);font-weight:600}
92.spec-qty{display:flex;align-items:center;justify-content:space-between;margin-top:16px}
93.spec-qty .sq-btn{width:34px;height:34px;border-radius:50%;background:#f5efe2;display:flex;align-items:center;justify-content:center;font-size:20px;cursor:pointer;color:#6b5744}
94.spec-qty .sq-num{font-size:18px;font-weight:700;padding:0 18px}
95/* 购物车/订单 */
96.order-item{display:flex;padding:12px;background:#fff;border-radius:12px;margin:10px 12px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
97.order-item .oi-img{width:52px;height:52px;border-radius:10px;background:var(--primary-light);display:flex;align-items:center;justify-content:center;font-size:28px;flex-shrink:0}
98.order-item .oi-body{flex:1;padding-left:10px}
99.order-item .oi-name{font-size:13px;font-weight:600}
100.order-item .oi-spec{font-size:11px;color:#a08c6f;margin-top:2px}
101.order-item .oi-foot{display:flex;justify-content:space-between;align-items:center;margin-top:6px}
102.order-item .oi-price{color:var(--red);font-weight:700}
103.order-item .oi-del{color:#ccc;font-size:12px;padding:4px}
104.sum-row{display:flex;justify-content:space-between;font-size:13px;color:#6b5744;padding:8px 0}
105.sum-row.total{font-size:15px;font-weight:700;color:#3a2510;border-top:1px dashed #eee;margin-top:6px;padding-top:12px}
106.sum-row.total span{color:var(--red);font-size:18px}
107.status-steps{display:flex;justify-content:space-between;margin:12px 0;position:relative}
108.status-steps:before{content:"";position:absolute;top:14px;left:12%;right:12%;height:2px;background:#e5dcc8}
109.status-steps .st{position:relative;z-index:1;text-align:center;font-size:10px;color:#a08c6f;width:20%}
110.status-steps .st .dot{width:28px;height:28px;border-radius:50%;background:#e5dcc8;margin:0 auto 4px;display:flex;align-items:center;justify-content:center;font-size:14px;color:#fff}
111.status-steps .st.done .dot{background:var(--green)}
112.status-steps .st.now .dot{background:var(--primary)}
113.status-steps .st.now{color:var(--primary);font-weight:600}
114.pickup-code{background:linear-gradient(135deg,#a16207,#f0b429);border-radius:14px;color:#fff;text-align:center;padding:20px;margin:12px}
115.pickup-code .pc-num{font-size:40px;font-weight:800;letter-spacing:6px;margin:8px 0}
116.pickup-code .pc-tip{font-size:12px;opacity:.9}
117.opt-list{display:flex;align-items:center;justify-content:space-between;background:#fff;border-radius:12px;padding:14px 16px;margin:10px 12px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
118.opt-list .ol-l{display:flex;align-items:center;gap:10px;font-size:14px}
119.opt-list .ol-l .ico{font-size:20px}
120.opt-list .ol-r{color:#999;font-size:13px}
121.opt-list .ol-r .arrow{color:#ccc;margin-left:4px}
122/* 会员 */
123.member-hero{background:linear-gradient(135deg,#a16207,#f0b429);margin:12px;border-radius:14px;color:#fff;padding:18px;position:relative;overflow:hidden}
124.member-hero .mh-name{font-size:16px;font-weight:600}
125.member-hero .mh-level{display:inline-block;background:rgba(255,255,255,.25);padding:3px 10px;border-radius:12px;font-size:11px;margin-top:6px}
126.member-hero .mh-stats{display:flex;margin-top:14px;gap:10px}
127.member-hero .mh-stats div{flex:1;text-align:center;background:rgba(255,255,255,.15);border-radius:10px;padding:10px 4px}
128.member-hero .mh-stats b{display:block;font-size:18px}
129.member-hero .mh-stats span{font-size:11px;opacity:.9}
130.level-track{background:#fff;border-radius:12px;margin:12px;padding:14px}
131.level-track .lt-bar{height:8px;background:#f0e8d8;border-radius:4px;margin:10px 0 6px;position:relative}
132.level-track .lt-fill{height:100%;background:linear-gradient(90deg,#a16207,#f0b429);border-radius:4px;width:68%}
133.level-tags{display:flex;justify-content:space-between;font-size:11px;color:#a08c6f}
134.benefit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 12px}
135.benefit-grid .bg-item{background:#fff;border-radius:12px;text-align:center;padding:14px 6px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
136.benefit-grid .bg-item .bgi{font-size:26px;display:block;margin-bottom:4px}
137.benefit-grid .bg-item span{font-size:12px;color:#6b5744}
138/* 我的 */
139.user-card{background:linear-gradient(135deg,#a16207,#f0b429);margin:12px;border-radius:14px;color:#fff;padding:18px;display:flex;align-items:center;gap:12px}
140.user-card .uc-avatar{width:56px;height:56px;border-radius:50%;background:rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;font-size:30px}
141.user-card .uc-name{font-size:17px;font-weight:600}
142.user-card .uc-level{font-size:12px;opacity:.9;margin-top:3px}
143.order-nav{display:flex;background:#fff;border-radius:12px;margin:12px;padding:14px 0}
144.order-nav a{flex:1;text-align:center;font-size:11px;color:#6b5744}
145.order-nav a .on-icon{font-size:24px;display:block;margin-bottom:4px}
146.order-nav a em{font-style:normal;display:block;font-size:10px;color:#a08c6f;margin-top:2px}
147.menu-list{background:#fff;border-radius:12px;margin:12px;overflow:hidden}
148.menu-list a{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #f5f5f5;font-size:14px}
149.menu-list a:last-child{border-bottom:none}
150.menu-list a .ml-l{display:flex;align-items:center;gap:10px}
151.menu-list a .ml-l .ico{font-size:20px}
152.menu-list a .ml-r{color:#ccc;font-size:12px}
153.empty{text-align:center;color:#b9a887;font-size:13px;padding:40px 0}
154.empty .e-icon{font-size:44px;display:block;margin-bottom:8px}
155