.container { display: flex; flex-direction: column; min-height: 100vh; background: linear-gradient(135deg, #F9FAFB 0%, #F2F4F8 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 { display: flex; align-items: center; justify-content: space-between; padding: 24rpx 32rpx; width: 100%; box-sizing: border-box; height: 100rpx; } .back-button { width: 100rpx; height: 60rpx; line-height: 60rpx; font-size: 26rpx; color: #4a90e2; background: transparent; border: none; padding: 0; margin: 0; display: flex; align-items: center; justify-content: flex-start; border-radius: 8rpx; transition: all 0.3s ease; } .back-button:hover { color: #3b82f6; background: rgba(74, 144, 226, 0.1); transform: translateX(-2rpx); } .back-icon { margin-right: 8rpx; font-size: 22rpx; font-weight: 600; } .back-text { font-size: 26rpx; font-weight: 500; } .title { font-size: 36rpx; font-weight: 700; color: #2c3e50; letter-spacing: 2rpx; flex: 1; text-align: center; margin: 0; padding: 0; } .header-right { width: 100rpx; } .content { flex: 1; padding: 32rpx; display: flex; flex-direction: column; 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; } .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%; } .btn-primary { flex: 1; height: 80rpx; line-height: 80rpx; font-size: 32rpx; font-weight: 600; border-radius: 40rpx; background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%); color: #fff; border: none; box-shadow: 0 4rpx 8rpx rgba(0,122,255,0.2); transition: all 0.3s ease; padding: 0 48rpx; } .btn-primary:hover { transform: translateY(-2rpx); box-shadow: 0 6rpx 16rpx rgba(0,122,255,0.3); } .btn-secondary { flex: 1; height: 80rpx; line-height: 80rpx; font-size: 32rpx; font-weight: 600; border-radius: 40rpx; background: #fff; color: #007AFF; border: 1rpx solid #007AFF; transition: all 0.3s ease; padding: 0 48rpx; } .btn-secondary:hover { background: rgba(0,122,255,0.05); transform: translateY(-2rpx); } .btn-change-product { display: flex; align-items: center; justify-content: center; padding: 12rpx 24rpx; font-size: 28rpx; color: #007AFF; background: transparent; border: 1rpx solid #007AFF; border-radius: 20rpx; transition: all 0.3s ease; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05); } .btn-change-product:hover { background: rgba(0,122,255,0.1); transform: translateY(-2rpx); box-shadow: 0 4rpx 12rpx rgba(0,122,255,0.2); } .btn-change-product-text { font-size: 28rpx; } /* 商品信息卡片 */ .product-card { background: #FFFFFF; border-radius: 12rpx; padding: 32rpx; margin: 24rpx 0 32rpx; width: 100%; box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.04); transition: all 0.3s ease; } .product-info-container { width: 100%; box-sizing: border-box; } .product-info-row { display: flex; justify-content: space-between; align-items: center; width: 100%; box-sizing: border-box; } .product-name-container { display: flex; align-items: center; flex: 1; margin-right: 16rpx; } .product-name { font-size: 32rpx; font-weight: 600; color: #333; line-height: 1.4; word-break: break-word; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* 规格列表区域 */ .spec-section { margin-top: 32rpx; width: 100%; } .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24rpx; padding: 0; width: 100%; } .section-title { font-size: 32rpx; font-weight: 600; color: #333; padding-left: 16rpx; border-left: 6rpx solid #007AFF; border-radius: 4rpx; line-height: 32rpx; } .section-count { font-size: 28rpx; color: #999; } /* 规格列表布局 */ .spec-list { margin-top: 16rpx; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16rpx; width: 100%; } /* 规格项 */ .spec-item { background: #FFFFFF; border-radius: 12rpx; padding: 32rpx 24rpx; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02); transition: all 0.3s ease; } .spec-item:hover { box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05); transform: translateY(-2rpx); } .spec-item:active { background: #F5F5F5; } .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: 120rpx 0; text-align: center; width: 100%; } .empty-icon { font-size: 120rpx; margin-bottom: 40rpx; opacity: 0.6; color: #CCC; } .empty-text { font-size: 32rpx; font-weight: 600; color: #333; margin-bottom: 16rpx; line-height: 1.4; padding: 0 40rpx; } .empty-subtext { font-size: 28rpx; color: #999; margin-bottom: 48rpx; line-height: 1.4; padding: 0 40rpx; } /* 响应式设计 */ @media (max-width: 750rpx) { .content { padding: 24rpx; } .product-card { padding: 28rpx; } .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%; } .spec-item { padding: 28rpx 20rpx; } .spec-name { font-size: 28rpx; } .spec-list { grid-template-columns: repeat(2, 1fr); gap: 16rpx; } } /* 小屏幕设备适配 */ @media (max-width: 414rpx) { .content { padding: 24rpx; } .title { font-size: 32rpx; } .section-title { font-size: 28rpx; } .product-name { font-size: 26rpx; } .spec-item { padding: 24rpx 16rpx; } .spec-name { font-size: 24rpx; } .btn-change-product { padding: 10rpx 20rpx; } .btn-change-product-text { font-size: 26rpx; } .spec-list { grid-template-columns: repeat(2, 1fr); gap: 12rpx; } } /* 暂无更多规格提示 */ .no-more { display: flex; align-items: center; justify-content: center; padding: 48rpx 0; margin-top: 32rpx; margin-bottom: 40rpx; width: 100%; } .no-more::before, .no-more::after { content: ''; flex: 1; height: 1rpx; background: #E5E5E5; margin: 0 16rpx; } .no-more-text { font-size: 24rpx; color: #BBB; font-weight: 500; white-space: nowrap; }