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.

427 lines
7.0 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;
}
/* 加载状态 */
.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: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
}
.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-label {
font-size: 24rpx;
color: #666;
font-weight: 500;
flex: 1;
}
.product-name {
font-size: 32rpx;
font-weight: 700;
color: #2c3e50;
line-height: 1.4;
word-break: break-word;
margin-top: 12rpx;
padding: 12rpx 0;
border-top: 1rpx solid #f1f5f9;
}
/* 规格列表区域 */
.spec-section {
margin-top: 24rpx;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding: 0 8rpx;
}
.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-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
margin-top: 16rpx;
}
/* 规格卡片 */
.spec-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
cursor: pointer;
position: relative;
overflow: hidden;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
min-height: 200rpx;
display: flex;
flex-direction: column;
}
.spec-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 6rpx;
height: 100%;
background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}
.spec-card:hover {
transform: translateY(-6rpx);
box-shadow: 0 12rpx 32rpx rgba(0,0,0,0.15);
background: rgba(255, 255, 255, 1);
}
.spec-card:active {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
}
.spec-info {
margin-bottom: 20rpx;
flex: 1;
display: flex;
align-items: center;
}
.spec-name {
font-size: 28rpx;
font-weight: 600;
color: #2c3e50;
line-height: 1.4;
word-break: break-word;
padding-right: 40rpx;
}
.spec-price {
display: flex;
flex-direction: column;
margin-top: 16rpx;
}
.price-label {
font-size: 20rpx;
color: #999;
margin-bottom: 4rpx;
}
.price-value {
font-size: 36rpx;
font-weight: 700;
color: #e74c3c;
transition: all 0.3s ease;
}
.spec-card:hover .price-value {
transform: scale(1.05);
}
.spec-arrow {
position: absolute;
top: 32rpx;
right: 28rpx;
font-size: 32rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.spec-card:hover .spec-arrow {
opacity: 1;
transform: translateX(4rpx);
}
/* 空状态 */
.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;
}
}