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.
 
 

783 lines
13 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: #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
position: sticky;
top: 0;
z-index: 10;
}
.header-content {
padding: 24rpx 32rpx;
text-align: center;
width: 100%;
box-sizing: border-box;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
}
.title {
font-size: 36rpx;
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
margin: 0;
padding: 0;
}
.content {
flex: 1;
padding: 32rpx;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 加载状态 */
.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 9999;
width: 100%;
box-sizing: border-box;
}
.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;
width: 100%;
box-sizing: border-box;
}
.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%;
box-sizing: border-box;
}
.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;
box-sizing: border-box;
}
.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;
box-sizing: border-box;
}
.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: flex;
flex-direction: column;
gap: 16rpx;
margin-top: 16rpx;
}
/* 规格卡片 */
.spec-card {
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
}
.spec-info {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.spec-name {
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
text-align: center;
padding-right: 0;
}
/* 空状态 */
.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 {
gap: 16rpx;
}
.product-card {
padding: 28rpx;
}
.spec-card {
padding: 36rpx 20rpx;
min-height: 110rpx;
}
.title {
font-size: 32rpx;
}
.section-title {
font-size: 28rpx;
}
.product-name {
font-size: 28rpx;
}
.button-group {
flex-direction: column;
gap: 12rpx;
}
.btn-primary,
.btn-secondary {
width: 100%;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.spec-grid {
gap: 12rpx;
}
.spec-card {
padding: 32rpx 16rpx;
min-height: 100rpx;
}
.spec-name {
font-size: 24rpx;
}
}
/* 暂无更多规格提示 */
.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;
}
/* 分类选择区域 */
.category-section {
margin-top: 24rpx;
margin-bottom: 40rpx;
width: 100%;
box-sizing: border-box;
}
.category-grid {
display: flex;
flex-direction: column;
margin-top: 16rpx;
width: 100%;
box-sizing: border-box;
}
/* 卡片基础框架 */
.category-card {
background: #ffffff;
border-radius: 20rpx;
padding: 0 32rpx 32rpx;
cursor: pointer;
min-height: 600rpx;
margin-bottom: 32rpx;
transition: all 0.3s ease;
width: 100%;
box-sizing: border-box;
box-shadow: 0 8rpx 16rpx rgba(0,0,0,0.08);
position: relative;
overflow: hidden;
}
.category-card:hover {
transform: translateY(-8rpx);
box-shadow: 0 12rpx 24rpx rgba(0,0,0,0.12);
}
/* 品类专属背景 */
.pink-shell-card {
background: linear-gradient(135deg, #FECDD3 0%, #FDE2E2 100%);
}
.green-shell-card {
background: linear-gradient(135deg, #D1FAE5 0%, #E6F7EE 100%);
}
.brown-shell-card {
background: linear-gradient(135deg, #FEF3C7 0%, #FFF9E6 100%);
}
.free-range-card {
background: linear-gradient(135deg, #FEF3C7 0%, #FFF9E6 100%);
}
/* 标签系统 */
.card-labels {
position: absolute;
top: 20rpx;
left: 20rpx;
right: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 2;
}
.feature-label {
background: rgba(255, 255, 255, 0.9);
padding: 8rpx 16rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
}
.feature-label-text {
font-size: 20rpx;
font-weight: 500;
color: #1E293B;
}
.category-label {
background: rgba(0, 0, 0, 0.7);
padding: 8rpx 16rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);
}
.category-label-text {
font-size: 20rpx;
font-weight: 500;
color: #FFFFFF;
}
/* 产品图片区域 */
.product-image-container {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 300rpx;
display: flex;
justify-content: center;
align-items: flex-start;
z-index: 1;
overflow: hidden;
}
.product-image {
width: 100%;
height: 100%;
border-radius: 0;
object-fit: cover;
border: none;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.12);
transform: none;
}
/* 文字信息区域 */
.card-content {
width: 100%;
display: flex;
flex-direction: column;
gap: 16rpx;
position: relative;
z-index: 2;
padding-top: 320rpx;
padding-bottom: 20rpx;
}
.product-title {
font-size: 36rpx;
font-weight: 700;
color: #1E293B;
line-height: 48rpx;
text-align: center;
margin-bottom: 8rpx;
}
.product-description {
font-size: 24rpx;
font-weight: 400;
color: #64748B;
line-height: 36rpx;
text-align: center;
margin-bottom: 16rpx;
padding: 0 16rpx;
}
/* 卖点标签 */
.selling-points {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 12rpx;
margin: 16rpx 0 24rpx;
}
.selling-point {
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.8);
padding: 8rpx 16rpx;
border-radius: 20rpx;
box-shadow: 0 2rpx 4rpx rgba(0,0,0,0.05);
}
.selling-point-icon {
font-size: 20rpx;
margin-right: 8rpx;
}
.selling-point-text {
font-size: 20rpx;
font-weight: 400;
color: #475569;
}
/* 按钮区域 */
.card-footer {
display: flex;
justify-content: center;
margin-top: 16rpx;
}
.select-button {
background: #4A90E2;
color: #FFFFFF;
border: none;
border-radius: 24rpx;
padding: 12rpx 32rpx;
font-size: 24rpx;
font-weight: 600;
display: flex;
align-items: center;
gap: 8rpx;
box-shadow: 0 4rpx 12rpx rgba(74, 144, 226, 0.3);
transition: all 0.3s ease;
}
.select-button:hover {
background: #3B82F6;
transform: translateY(-2rpx);
box-shadow: 0 6rpx 16rpx rgba(74, 144, 226, 0.4);
}
.select-button-icon {
font-size: 20rpx;
font-weight: 600;
}
.select-button-text {
font-size: 24rpx;
font-weight: 600;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.category-card {
padding: 0 24rpx 24rpx;
min-height: 550rpx;
margin-bottom: 24rpx;
}
.product-image-container {
height: 280rpx;
}
.card-content {
padding-top: 300rpx;
}
.product-title {
font-size: 32rpx;
line-height: 40rpx;
}
.product-description {
font-size: 22rpx;
line-height: 32rpx;
}
.selling-point {
padding: 6rpx 12rpx;
}
.selling-point-text {
font-size: 18rpx;
}
.select-button {
padding: 10rpx 28rpx;
font-size: 22rpx;
}
}
@media (max-width: 414rpx) {
.category-card {
padding: 0 20rpx 20rpx;
min-height: 500rpx;
margin-bottom: 20rpx;
}
.product-image-container {
height: 240rpx;
}
.card-content {
padding-top: 260rpx;
}
.product-title {
font-size: 28rpx;
line-height: 36rpx;
}
.product-description {
font-size: 20rpx;
line-height: 28rpx;
}
.selling-point {
padding: 4rpx 10rpx;
}
.selling-point-text {
font-size: 16rpx;
}
.select-button {
padding: 8rpx 24rpx;
font-size: 20rpx;
}
}
/* 调整规格网格布局,确保不被导航栏遮挡 */
.spec-section {
margin-bottom: 40rpx;
}
/* 登录弹窗样式 */
.auth-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.auth-modal-container {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 48rpx;
width: 80%;
max-width: 500rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);
backdrop-filter: blur(12rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
}
.auth-modal-title {
font-size: 36rpx;
font-weight: 700;
text-align: center;
margin-bottom: 24rpx;
color: #2c3e50;
letter-spacing: 2rpx;
}
.auth-modal-content {
font-size: 28rpx;
text-align: center;
margin-bottom: 48rpx;
color: #666;
line-height: 1.5;
padding: 0 20rpx;
}
.auth-modal-buttons {
display: flex;
flex-direction: column;
gap: 24rpx;
}
.auth-primary-button {
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
color: white;
border: none;
border-radius: 12rpx;
padding: 24rpx;
font-size: 30rpx;
font-weight: 700;
min-height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4rpx 16rpx rgba(96, 165, 250, 0.4);
transition: all 0.3s ease;
}
.auth-primary-button:hover {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(96, 165, 250, 0.6);
}
.auth-cancel-button {
background: rgba(255, 255, 255, 0.9);
color: #2c3e50;
border: 2rpx solid #e2e8f0;
border-radius: 12rpx;
padding: 24rpx;
font-size: 28rpx;
font-weight: 600;
min-height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}
.auth-cancel-button:hover {
background: rgba(236, 240, 241, 0.8);
transform: translateY(-2rpx);
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}