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.

312 lines
5.3 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;
overflow-x: hidden;
width: 100%;
box-sizing: border-box;
}
.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;
width: 100%;
box-sizing: border-box;
}
.title {
font-size: 36rpx;
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
}
.content {
flex: 1;
padding: 16rpx;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 加载状态 */
.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;
}
/* 按钮样式 */
.btn-primary {
width: 240rpx;
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);
}
/* 商品列表区域 */
.product-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;
}
/* 商品网格布局 */
.product-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
margin-top: 16rpx;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 商品卡片 */
.product-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;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
min-height: 180rpx;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
width: 100%;
box-sizing: border-box;
}
.product-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 6rpx;
background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
}
.product-card:hover {
transform: translateY(-6rpx);
box-shadow: 0 12rpx 32rpx rgba(0,0,0,0.15);
background: rgba(255, 255, 255, 1);
}
.product-card:active {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
}
.product-icon {
font-size: 72rpx;
margin-bottom: 20rpx;
opacity: 0.9;
transition: all 0.3s ease;
}
.product-card:hover .product-icon {
transform: scale(1.1);
opacity: 1;
}
.product-name {
font-size: 28rpx;
font-weight: 600;
color: #2c3e50;
line-height: 1.4;
word-break: break-word;
margin-bottom: 20rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 0 8rpx;
}
.product-arrow {
position: absolute;
bottom: 20rpx;
right: 24rpx;
font-size: 28rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.product-card:hover .product-arrow {
opacity: 1;
transform: translateX(4rpx);
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.content {
padding: 20rpx;
}
.product-grid {
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
}
.product-card {
padding: 28rpx 20rpx;
min-height: 160rpx;
}
.title {
font-size: 32rpx;
}
.section-title {
font-size: 28rpx;
}
.product-name {
font-size: 24rpx;
}
.product-icon {
font-size: 60rpx;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.product-grid {
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.product-card {
padding: 20rpx 16rpx;
min-height: 140rpx;
}
.product-name {
font-size: 22rpx;
}
.product-icon {
font-size: 50rpx;
}
}
/* 暂无更多商品提示 */
.no-more {
display: flex;
justify-content: center;
align-items: center;
padding: 48rpx 0;
margin-top: 16rpx;
}
.no-more-text {
font-size: 24rpx;
color: #999;
background: rgba(0, 0, 0, 0.03);
padding: 12rpx 32rpx;
border-radius: 30rpx;
font-weight: 500;
}