201 lines
5.9 KiB
CSS
201 lines
5.9 KiB
CSS
/* ========== 全局 ========== */
|
||
*{
|
||
margin:0;
|
||
padding:0;
|
||
box-sizing:border-box;
|
||
font-family:'PingFang SC','Helvetica Neue',Arial,sans-serif;
|
||
}
|
||
|
||
/* 最外层浏览器灰底(最深) */
|
||
html{
|
||
background:#e5e5e5;
|
||
}
|
||
|
||
/* ========== 版心包裹层(中灰) ========== */
|
||
/* body 中请包一层 <div class="app-wrapper">… */
|
||
.app-wrapper{
|
||
max-width:500px;
|
||
margin:0 auto;
|
||
background:#f3f4f6; /* ⭐ 中灰,与 html 有层次 */
|
||
padding:12px 0 60px; /* 顶 12px,底 60px=底栏高 */
|
||
min-height:100vh;
|
||
border-radius:12px;
|
||
box-shadow:0 0 20px rgba(0,0,0,.10);
|
||
position:relative;
|
||
overflow-x:hidden;
|
||
}
|
||
|
||
/* body 仅语义,无视觉 */
|
||
body{ color:#333; }
|
||
|
||
/* —— 卡片公共阴影 —— */
|
||
.card{
|
||
background:#fff;
|
||
border-radius:12px;
|
||
box-shadow:0 2px 8px rgba(0,0,0,.05);
|
||
margin:0 16px 12px; /* 左右 16px 灰缝,底 12px 间隔 */
|
||
}
|
||
|
||
/* ========== 轮播图卡片 ========== */
|
||
.swiper-container{
|
||
composes: card; /* 写法若不支持 composes 就把下面三行展开 */
|
||
width:calc(100% - 32px);
|
||
height:375px;
|
||
margin:0 16px 12px;
|
||
border-radius:12px;
|
||
box-shadow:0 2px 8px rgba(0,0,0,.05);
|
||
position:relative;
|
||
overflow:hidden;
|
||
}
|
||
.swiper-wrapper{display:flex;transition:transform .3s;}
|
||
.swiper-slide{flex:0 0 100%;height:375px;}
|
||
.swiper-slide img{width:100%;height:100%;object-fit:contain;background:#fff;}
|
||
|
||
.swiper-pagination{
|
||
position:absolute;bottom:10px;left:50%;
|
||
transform:translateX(-50%);
|
||
display:flex;gap:6px;
|
||
}
|
||
.swiper-dot{
|
||
width:8px;height:8px;border-radius:50%;
|
||
background:rgba(255,255,255,.5);
|
||
transition:all .3s;
|
||
}
|
||
.swiper-dot.active{background:#ff5000;width:16px;border-radius:4px;}
|
||
|
||
/* ========== 商品信息卡片 ========== */
|
||
.product-info{
|
||
background:#fff;
|
||
padding:16px;
|
||
margin:0 16px 12px;
|
||
border-radius:12px;
|
||
box-shadow:0 2px 8px rgba(0,0,0,.05);
|
||
}
|
||
.price-row{display:flex;align-items:center;margin-bottom:12px;}
|
||
|
||
.current-price{color:#ff5000;font-size:28px;font-weight:bold;}
|
||
.current-price::before{content:"¥";font-size:18px;}
|
||
|
||
.original-price{
|
||
color:#999;font-size:16px;text-decoration:line-through;margin-left:8px;
|
||
}
|
||
.original-price::before{content:"¥";}
|
||
.title{font-size:18px;font-weight:bold;line-height:1.4;margin-bottom:10px;}
|
||
|
||
/* 促销行 */
|
||
.promo-row{display:flex;align-items:center;gap:6px;margin-top:6px;}
|
||
.promo-tag{
|
||
flex-shrink:0;
|
||
background:linear-gradient(90deg,#ff2c2c,#ff6b22);
|
||
color:#fff;font-size:12px;padding:2px 6px;border-radius:2px;
|
||
}
|
||
.promo-box{
|
||
font-size:13px;padding:2px 6px;border-radius:4px;font-weight:600;white-space:nowrap;
|
||
}
|
||
.promo-box.drop,
|
||
.promo-box.sold{
|
||
background:linear-gradient(90deg,#ff7e00,#ff5000);
|
||
color:#fff;
|
||
}
|
||
|
||
/* ========== 拼单区域卡片 ========== */
|
||
.group-buying{
|
||
background:#fff;
|
||
padding:16px;
|
||
margin:0 16px 12px;
|
||
border-radius:12px;
|
||
box-shadow:0 2px 8px rgba(0,0,0,.05);
|
||
position:relative;
|
||
overflow:hidden;
|
||
}
|
||
.section-title{
|
||
font-size:16px;font-weight:bold;margin-bottom:12px;
|
||
position:relative;padding-left:10px;
|
||
}
|
||
.section-title::before{
|
||
content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
|
||
width:3px;height:16px;background:#ff5000;border-radius:2px;
|
||
}
|
||
|
||
.group-users{height:120px;position:relative;overflow:hidden;}
|
||
.user-list{position:absolute;top:0;left:0;width:100%;transition:transform .5s ease;}
|
||
|
||
.user-item{
|
||
display:flex;align-items:center;padding:8px 0;border-bottom:1px solid #f5f5f5;
|
||
}
|
||
.user-item:last-child{border-bottom:none;}
|
||
|
||
.user-avatar{
|
||
width:40px;height:40px;border-radius:50%;background:#f5f5f5;
|
||
display:flex;align-items:center;justify-content:center;margin-right:10px;
|
||
color:#999;font-size:20px;
|
||
}
|
||
|
||
.user-info{flex:1;}
|
||
.user-name{font-size:15px;font-weight:bold;margin-bottom:4px;}
|
||
.user-status{font-size:13px;color:#666;}
|
||
|
||
.countdown{
|
||
display:inline-block;background:#ff5000;color:#fff;
|
||
padding:1px 4px;border-radius:2px;margin-left:5px;
|
||
}
|
||
|
||
.buy-btn{
|
||
background:linear-gradient(90deg,#ff2c2c,#ff6b22);
|
||
color:#fff;border:none;border-radius:4px;padding:6px 15px;
|
||
font-size:14px;font-weight:bold;cursor:pointer;
|
||
}
|
||
|
||
/* ========== 底部操作栏 ========== */
|
||
.action-bar{
|
||
position:fixed;
|
||
left:50%;bottom:0;transform:translateX(-50%);
|
||
width:100%;max-width:500px;
|
||
background:#fff;
|
||
display:flex;height:60px;
|
||
box-shadow:0 -2px 10px rgba(0,0,0,.08);
|
||
border-top:1px solid #e5e5e5;
|
||
border-radius:0 0 12px 12px;
|
||
z-index:100;
|
||
}
|
||
.action-btn{
|
||
flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
|
||
font-size:12px;color:#666;
|
||
}
|
||
.action-btn i{font-size:20px;margin-bottom:4px;}
|
||
|
||
.purchase-btn{flex:2;display:flex;}
|
||
.btn-single,
|
||
.btn-group{
|
||
flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
|
||
gap:2px;border:none;cursor:pointer;
|
||
}
|
||
.btn-single{background:#ff9500;color:#fff;}
|
||
.btn-group {background:#ff5000;color:#fff;}
|
||
|
||
.btn-price{font-size:18px;font-weight:700;}
|
||
.btn-label{font-size:12px;}
|
||
|
||
/* ========== 支付弹窗 ========== */
|
||
.payment-overlay{
|
||
position:fixed;inset:0;z-index:9999;
|
||
background:rgba(0,0,0,.55);
|
||
display:flex;align-items:center;justify-content:center;
|
||
backdrop-filter:blur(2px);
|
||
}
|
||
.payment-modal{
|
||
width:300px;max-width:90vw;padding:26px 28px 30px;background:#fff;
|
||
border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.18);
|
||
font-size:14px;line-height:1.45;text-align:center;
|
||
}
|
||
.payment-modal h3{font-size:18px;margin:0 0 14px;color:#333;}
|
||
.payment-modal p{margin:6px 0;color:#555;word-break:break-all;}
|
||
.payment-modal .copyable{color:#ff5000;cursor:pointer;text-decoration:underline;}
|
||
|
||
.modal-buttons{margin-top:22px;display:flex;gap:12px;}
|
||
.modal-buttons button{
|
||
flex:1;padding:8px 0;border-radius:6px;font-size:14px;cursor:pointer;border:none;
|
||
}
|
||
.confirm-btn{background:#ff5000;color:#fff;}
|
||
.cancel-btn{background:#f2f3f5;color:#333;}
|