/* 商品分类页面样式 */ .category-page { height: 100vh; background-color: #f5f5f5; } .category-container { display: flex; height: 100%; } /* 左侧边栏容器 */ .category-sidebar-container { width: 176rpx; height: 100%; background-color: #f5f5f5; } /* 右侧内容区 */ .category-content { flex: 1; background-color: white; position: relative; padding: 20rpx; } /* 二级分类标签栏 */ .sub-category-tabbar { margin-bottom: 20rpx; } /* 二级分类网格布局 */ .sub-category-grid { display: grid; grid-template-columns: 33.33% 33.33% 33.33%; gap: 20rpx; } .sub-category-item { display: flex; flex-direction: column; align-items: center; padding: 20rpx; border-radius: 16rpx; background-color: #f8f8f8; transition: all 0.3s ease; } .sub-category-item:active { background-color: #e8e8e8; transform: scale(0.95); } .sub-category-image-container { width: 144rpx; height: 144rpx; margin-bottom: 16rpx; } .sub-category-image { width: 100%; height: 100%; border-radius: 16rpx; overflow: hidden; background-color: #e0e0e0; display: flex; align-items: center; justify-content: center; } .image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .image-fallback { width: 80rpx; height: 80rpx; border-radius: 50%; background-color: #0071ce; color: white; display: flex; align-items: center; justify-content: center; font-size: 32rpx; font-weight: bold; } .sub-category-name { font-size: 26rpx; color: #333; text-align: center; line-height: 1.4; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 广告图容器 */ .advertisement-container { position: fixed; bottom: 13%; right: 3%; z-index: 100; } .advertisement-image { width: 200rpx; height: 200rpx; border-radius: 16rpx; overflow: hidden; background-color: #fa4126; box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); } .ad-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24rpx; } /* 加载和错误状态 */ .loading, .error { display: flex; align-items: center; justify-content: center; height: 200rpx; font-size: 28rpx; color: #666; } .error { color: #fa4126; } /* 响应式适配 */ @media (max-width: 750rpx) { .category-sidebar-container { width: 160rpx; } .sub-category-grid { grid-template-columns: 50% 50%; gap: 16rpx; } .sub-category-image-container { width: 120rpx; height: 120rpx; } }