You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

395 lines
6.4 KiB

.container {
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}
.header {
background: #fff;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.08);
position: sticky;
top: 0;
z-index: 10;
}
.header-content {
padding: 30rpx 0;
text-align: center;
}
.title {
font-size: 36rpx;
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
}
.content {
flex: 1;
padding: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
/* 加载状态 */
.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
}
.loading-spinner {
width: 80rpx;
height: 80rpx;
border: 8rpx solid rgba(74, 144, 226, 0.2);
border-top: 8rpx solid #4a90e2;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 32rpx;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-text {
font-size: 28rpx;
color: #666;
font-weight: 500;
}
/* 错误提示卡片 */
.error-card {
background: #fff;
border-radius: 16rpx;
padding: 48rpx;
margin: 32rpx 0;
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.08);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.error-icon {
font-size: 80rpx;
margin-bottom: 24rpx;
}
.error-text {
font-size: 28rpx;
color: #e74c3c;
margin-bottom: 32rpx;
line-height: 1.5;
}
/* 按钮样式 */
.button-group {
display: flex;
gap: 16rpx;
width: 100%;
max-width: 600rpx;
}
.btn-primary {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-weight: 600;
border-radius: 40rpx;
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
color: #fff;
border: none;
box-shadow: 0 4rpx 12rpx rgba(96, 165, 250, 0.4);
transition: all 0.3s ease;
}
.btn-primary:hover {
transform: translateY(-2rpx);
box-shadow: 0 6rpx 16rpx rgba(74, 144, 226, 0.5);
}
.btn-secondary {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-weight: 600;
border-radius: 40rpx;
background: #fff;
color: #4a90e2;
border: 2rpx solid #4a90e2;
transition: all 0.3s ease;
}
.btn-secondary:hover {
background: rgba(74, 144, 226, 0.05);
transform: translateY(-2rpx);
}
.btn-back {
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx 24rpx;
font-size: 24rpx;
color: #4a90e2;
background: transparent;
border: 1rpx solid #4a90e2;
border-radius: 20rpx;
transition: all 0.3s ease;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
}
.btn-back:hover {
background: rgba(74, 144, 226, 0.1);
transform: translateY(-2rpx);
box-shadow: 0 4rpx 12rpx rgba(74, 144, 226, 0.2);
}
.btn-back-icon {
margin-right: 8rpx;
font-size: 20rpx;
}
.btn-back-text {
font-size: 22rpx;
}
/* 商品信息卡片 */
.product-card {
background: #f5f5f5;
border-radius: 12rpx;
padding: 32rpx;
margin-bottom: 24rpx;
width: 100%;
max-width: 600rpx;
}
.product-info-container {
width: 100%;
box-sizing: border-box;
}
.product-info-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
width: 100%;
box-sizing: border-box;
}
.product-name-container {
display: flex;
align-items: center;
flex: 1;
gap: 8rpx;
}
.product-label {
font-size: 24rpx;
color: #666;
font-weight: 500;
white-space: nowrap;
}
.product-name {
font-size: 30rpx;
font-weight: 600;
color: #333;
line-height: 1.4;
word-break: break-word;
flex: 1;
text-align: center;
}
/* 规格列表区域 */
.spec-section {
margin-top: 24rpx;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding: 0 8rpx;
width: 100%;
max-width: 600rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 700;
color: #2c3e50;
padding-left: 16rpx;
border-left: 6rpx solid #4a90e2;
}
.section-count {
font-size: 24rpx;
color: #999;
background: rgba(74, 144, 226, 0.1);
padding: 6rpx 16rpx;
border-radius: 20rpx;
}
/* 规格列表布局 */
.spec-list {
margin-top: 16rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
width: 100%;
max-width: 600rpx;
}
/* 规格项 */
.spec-item {
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
max-width: 600rpx;
}
.spec-name {
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
text-align: center;
padding: 0 8rpx;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
text-align: center;
}
.empty-icon {
font-size: 160rpx;
margin-bottom: 40rpx;
opacity: 0.6;
}
.empty-text {
font-size: 32rpx;
color: #666;
margin-bottom: 48rpx;
line-height: 1.4;
padding: 0 40rpx;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.content {
padding: 20rpx;
}
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
}
.product-card {
padding: 28rpx;
}
.spec-card {
padding: 28rpx 20rpx;
min-height: 180rpx;
}
.title {
font-size: 32rpx;
}
.section-title {
font-size: 28rpx;
}
.product-name {
font-size: 28rpx;
}
.price-value {
font-size: 32rpx;
}
.button-group {
flex-direction: column;
gap: 12rpx;
}
.btn-primary,
.btn-secondary {
width: 100%;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.spec-card {
padding: 24rpx 16rpx;
min-height: 160rpx;
}
.spec-name {
font-size: 24rpx;
}
.price-value {
font-size: 28rpx;
}
}
/* 暂无更多规格提示 */
.no-more {
display: flex;
justify-content: center;
align-items: center;
padding: 48rpx 0;
margin-top: 16rpx;
margin-bottom: 100rpx; /* 添加底部边距,避免被导航栏遮挡 */
}
.no-more-text {
font-size: 24rpx;
color: #999;
background: rgba(0, 0, 0, 0.03);
padding: 12rpx 32rpx;
border-radius: 30rpx;
font-weight: 500;
}
/* 调整规格网格布局,确保不被导航栏遮挡 */
.spec-section {
margin-bottom: 40rpx;
}