467 lines
8.0 KiB
Plaintext
467 lines
8.0 KiB
Plaintext
/* ==========================================
|
|
积分商城页面 - 浅色高级感设计
|
|
========================================== */
|
|
|
|
.page-container {
|
|
min-height: 100vh;
|
|
background: var(--bg-page);
|
|
position: relative;
|
|
padding-bottom: 40rpx;
|
|
}
|
|
|
|
/* 顶部装饰背景 */
|
|
.hero-section {
|
|
position: relative;
|
|
padding: 48rpx 24rpx 32rpx;
|
|
background: transparent;
|
|
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.hero-pattern {
|
|
display: none;
|
|
}
|
|
|
|
/* 积分信息卡片 */
|
|
.points-card {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 32rpx 28rpx;
|
|
background: var(--bg-white);
|
|
border-radius: 20rpx;
|
|
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);
|
|
border: 1rpx solid rgba(0, 0, 0, 0.04);
|
|
overflow: hidden;
|
|
animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.points-card-accent {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3rpx;
|
|
background: var(--primary-gradient);
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
}
|
|
|
|
.points-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.points-label {
|
|
font-size: 24rpx;
|
|
color: var(--text-muted);
|
|
margin-bottom: 6rpx;
|
|
}
|
|
|
|
.points-value {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 6rpx;
|
|
}
|
|
|
|
.points-number {
|
|
font-size: 48rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
line-height: 1;
|
|
}
|
|
|
|
.points-unit {
|
|
font-size: 22rpx;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.points-action {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6rpx;
|
|
padding: 14rpx 24rpx;
|
|
background: var(--primary-soft);
|
|
border-radius: var(--radius-full);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.points-action:active {
|
|
transform: scale(0.96);
|
|
}
|
|
|
|
.action-text {
|
|
font-size: 24rpx;
|
|
color: var(--primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.action-arrow {
|
|
font-size: 22rpx;
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* 商品列表区域 */
|
|
.product-section {
|
|
padding: 24rpx;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 20rpx;
|
|
animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 32rpx;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.section-count {
|
|
font-size: 24rpx;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* 商品网格 */
|
|
.product-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 16rpx;
|
|
}
|
|
|
|
.product-card {
|
|
background: var(--bg-white);
|
|
border-radius: var(--radius-lg);
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
|
|
}
|
|
|
|
.product-card:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.product-image-wrapper {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-top: 100%;
|
|
background: var(--bg-soft);
|
|
}
|
|
|
|
.product-image {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.product-tag {
|
|
position: absolute;
|
|
top: 12rpx;
|
|
left: 12rpx;
|
|
padding: 6rpx 14rpx;
|
|
background: var(--primary-gradient);
|
|
color: #FFF;
|
|
font-size: 20rpx;
|
|
font-weight: 600;
|
|
border-radius: var(--radius-full);
|
|
}
|
|
|
|
.product-stock-low {
|
|
position: absolute;
|
|
bottom: 12rpx;
|
|
right: 12rpx;
|
|
padding: 6rpx 12rpx;
|
|
background: rgba(255, 107, 53, 0.9);
|
|
color: #FFF;
|
|
font-size: 20rpx;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.product-info {
|
|
padding: 16rpx;
|
|
}
|
|
|
|
.product-name {
|
|
display: block;
|
|
font-size: 26rpx;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin-bottom: 12rpx;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.product-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.product-price {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 4rpx;
|
|
}
|
|
|
|
.price-value {
|
|
font-size: 32rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.price-unit {
|
|
font-size: 20rpx;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.exchange-btn {
|
|
padding: 8rpx 16rpx;
|
|
background: var(--primary-soft);
|
|
border-radius: var(--radius-full);
|
|
font-size: 22rpx;
|
|
color: var(--primary);
|
|
font-weight: 500;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.exchange-btn:active {
|
|
background: var(--primary);
|
|
color: #FFF;
|
|
}
|
|
|
|
.exchange-btn.disabled {
|
|
background: var(--bg-soft);
|
|
color: var(--text-hint);
|
|
}
|
|
|
|
/* 空状态 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 80rpx 48rpx;
|
|
animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s backwards;
|
|
}
|
|
|
|
.empty-icon {
|
|
width: 160rpx;
|
|
height: 160rpx;
|
|
margin-bottom: 24rpx;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.empty-title {
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.empty-desc {
|
|
font-size: 24rpx;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* 加载状态 */
|
|
.loading-state {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 40rpx;
|
|
color: var(--text-muted);
|
|
font-size: 26rpx;
|
|
}
|
|
|
|
/* 底部安全区域 */
|
|
.safe-bottom {
|
|
height: 80rpx;
|
|
}
|
|
|
|
/* ==========================================
|
|
商品详情弹窗
|
|
========================================== */
|
|
.product-modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0);
|
|
display: flex;
|
|
align-items: flex-end;
|
|
z-index: 999;
|
|
visibility: hidden;
|
|
transition: all 0.35s ease;
|
|
}
|
|
|
|
.product-modal-overlay.show {
|
|
visibility: visible;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.product-modal {
|
|
width: 100%;
|
|
max-height: 85vh;
|
|
background: var(--bg-white);
|
|
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
|
|
transform: translateY(100%);
|
|
transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
}
|
|
|
|
.product-modal.show {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20rpx 24rpx;
|
|
border-bottom: 1rpx solid var(--border-soft);
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.modal-close {
|
|
width: 52rpx;
|
|
height: 52rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-soft);
|
|
border-radius: 50%;
|
|
font-size: 32rpx;
|
|
color: var(--text-muted);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.modal-close:active {
|
|
transform: scale(0.9);
|
|
}
|
|
|
|
.modal-content {
|
|
padding: 20rpx 24rpx;
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.detail-image {
|
|
width: 100%;
|
|
height: 360rpx;
|
|
border-radius: var(--radius-lg);
|
|
background: var(--bg-soft);
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.detail-info {
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.detail-name {
|
|
display: block;
|
|
font-size: 32rpx;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin-bottom: 10rpx;
|
|
}
|
|
|
|
.detail-desc {
|
|
display: block;
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.detail-price-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 16rpx 0;
|
|
border-top: 1rpx solid var(--border-soft);
|
|
border-bottom: 1rpx solid var(--border-soft);
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.detail-price {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 6rpx;
|
|
}
|
|
|
|
.detail-price-value {
|
|
font-size: 44rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.detail-price-unit {
|
|
font-size: 24rpx;
|
|
color: var(--primary);
|
|
}
|
|
|
|
.detail-stock {
|
|
font-size: 24rpx;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.store-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12rpx;
|
|
padding: 12rpx 0;
|
|
}
|
|
|
|
.store-label {
|
|
font-size: 24rpx;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.store-name {
|
|
font-size: 24rpx;
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 20rpx 24rpx;
|
|
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
|
border-top: 1rpx solid var(--border-soft);
|
|
}
|
|
|
|
.exchange-btn-large {
|
|
width: 100%;
|
|
height: 92rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--primary-gradient);
|
|
border: none;
|
|
border-radius: var(--radius-full);
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
color: var(--text-white);
|
|
box-shadow: var(--shadow-primary);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.exchange-btn-large:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.exchange-btn-large.disabled {
|
|
background: var(--bg-soft);
|
|
color: var(--text-hint);
|
|
box-shadow: none;
|
|
}
|