/**index.wxss**/ page { height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); margin: 0; padding: 0; } .container { padding: 0; margin: 0; width: 100%; height: 100vh; display: flex; flex-direction: column; box-sizing: border-box; background-color: #f5f7fa; } /* 标题样式 */ .title { font-size: 36rpx; font-weight: bold; margin: 20rpx; color: #333; text-align: center; flex: 0 1 auto; } /* 搜索区域样式 */ .search-section { width: 100%; margin: 0 20rpx 20rpx 20rpx; flex: 0 1 auto; box-sizing: border-box; } .search-bar { display: flex; align-items: center; gap: 10rpx; width: 100%; background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%); padding: 6rpx; border-radius: 50rpx; box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12); box-sizing: border-box; border: 1rpx solid rgba(22, 119, 255, 0.2); } .search-input-wrapper { flex: 1; display: flex; align-items: center; position: relative; background-color: white; border-radius: 40rpx; padding: 0 10rpx; } .search-icon { margin: 0 10rpx; font-size: 28rpx; color: #999; transition: all 0.3s ease; } .search-input { flex: 1; height: 70rpx; font-size: 28rpx; color: #333; border: none; outline: none; background: transparent; } .search-placeholder { color: #999; } .region-selector { display: flex; align-items: center; gap: 5rpx; font-size: 26rpx; font-weight: 500; color: #333; padding: 15rpx 20rpx; background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%); color: white; border-radius: 40rpx; box-shadow: 0 2rpx 8rpx rgba(22, 119, 255, 0.3); transition: all 0.3s ease; margin-right: 10rpx; } .region-selector:hover { transform: translateY(-2rpx); box-shadow: 0 4rpx 12rpx rgba(22, 119, 255, 0.4); } .region-arrow { font-size: 22rpx; font-weight: bold; color: white; } .search-button { background-color: #1677ff; color: white; border: none; border-radius: 40rpx; padding: 15rpx 30rpx; font-size: 24rpx; font-weight: bold; white-space: nowrap; box-shadow: 0 2rpx 8rpx rgba(22, 119, 255, 0.3); } /* 地区选择器弹窗样式 */ .region-picker-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: flex-end; z-index: 9999; } .region-picker-container { background-color: white; width: 100%; border-radius: 20rpx 20rpx 0 0; padding: 20rpx; box-sizing: border-box; } .region-picker-title { font-size: 32rpx; font-weight: bold; text-align: center; margin-bottom: 20rpx; color: #333; } .region-list { max-height: 500rpx; overflow-y: auto; margin-bottom: 20rpx; } .region-item { padding: 20rpx; font-size: 28rpx; color: #333; border-bottom: 1rpx solid #eee; } .region-item.active { color: #1677ff; font-weight: bold; background-color: #f0f7ff; } .confirm-region-btn { background-color: #1677ff; color: white; border: none; border-radius: 40rpx; padding: 20rpx; font-size: 28rpx; font-weight: bold; width: 100%; margin-top: 10rpx; box-shadow: 0 2rpx 8rpx rgba(22, 119, 255, 0.3); } /* 品种筛选区域样式 */ .category-section { width: 100%; margin: 0 20rpx 20rpx 20rpx; flex: 0 1 auto; box-sizing: border-box; } .category-scroll { display: flex; gap: 15rpx; padding: 8rpx 15rpx; white-space: nowrap; overflow-x: auto; background-color: transparent; border-radius: 10rpx; box-shadow: none; } /* 蛋形样式 - 玻璃质感 */ .egg-item { position: relative; width: 80rpx; height: 100rpx; background-color: rgba(255, 255, 255, 0.3); backdrop-filter: blur(10rpx); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); border: 1rpx solid rgba(255, 255, 255, 0.5); flex-shrink: 0; } /* 不同品种的颜色 */ .egg-item:nth-child(2) { /* 粉壳 */ background-color: rgba(255, 182, 193, 0.3); border-color: rgba(255, 182, 193, 0.7); } .egg-item:nth-child(3) { /* 红壳 */ background-color: rgba(255, 105, 180, 0.3); border-color: rgba(255, 105, 180, 0.7); } .egg-item:nth-child(4) { /* 绿壳 */ background-color: rgba(144, 238, 144, 0.3); border-color: rgba(144, 238, 144, 0.7); } .egg-item:nth-child(5) { /* 白壳 */ background-color: rgba(245, 245, 245, 0.5); border-color: rgba(245, 245, 245, 0.8); } .egg-item.active { background-color: rgba(22, 119, 255, 0.4); border-color: rgba(22, 119, 255, 0.8); box-shadow: 0 4rpx 16rpx rgba(22, 119, 255, 0.3); transform: scale(1.05); } .egg-inner { font-size: 22rpx; color: #333; font-weight: bold; text-align: center; } .egg-item.active .egg-inner { color: #1677ff; font-size: 24rpx; } /* 侧边栏按钮样式 - 白色半透明毛玻璃质感 */ .sidebar-btn { position: fixed; left: 20rpx; z-index: 999; width: 120rpx; height: 80rpx; background-color: rgba(255, 255, 255, 0.85); /* 白色半透明 */ backdrop-filter: blur(10rpx); /* 毛玻璃效果 */ -webkit-backdrop-filter: blur(10rpx); /* 兼容iOS */ border-radius: 40rpx; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.15); /* 柔和阴影 */ transition: all 0.3s ease; border: 1rpx solid rgba(255, 255, 255, 0.5); /* 半透明白色边框 */ touch-action: none; /* 禁用浏览器默认的触摸行为 */ } .sidebar-btn:hover { transform: scale(1.05); box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.2); /* 增强阴影 */ background-color: rgba(255, 255, 255, 0.95); /* 提高透明度 */ } /* 侧边栏按钮隐藏状态 */ .sidebar-btn.hidden { left: -80rpx; transform: scale(1); opacity: 1; background-color: rgba(255, 255, 255, 0.85); } /* 侧边栏按钮内容区域 */ .sidebar-btn-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; padding-left: 10rpx; } .sidebar-icon { font-size: 32rpx; color: #333; /* 深色文字 */ font-weight: bold; } .sidebar-text { font-size: 16rpx; color: #666; /* 中深色文字 */ font-weight: 500; } /* 箭头按钮 */ .sidebar-arrow { width: 40rpx; height: 80rpx; background-color: rgba(0, 0, 0, 0.05); /* 淡灰色背景 */ border-radius: 0 40rpx 40rpx 0; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; cursor: pointer; } .sidebar-arrow:hover { background-color: rgba(0, 0, 0, 0.1); /* 加深背景色 */ } /* 箭头图标 */ .arrow-icon { font-size: 20rpx; color: #666; /* 深色箭头 */ font-weight: bold; transition: transform 0.3s ease, color 0.3s ease; display: inline-block; } .arrow-icon.arrow-left { transform: rotate(0deg); } .arrow-icon.arrow-right { transform: rotate(180deg); } /* 侧边栏样式 */ .sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 9998; animation: fadeIn 0.3s ease; } .sidebar { position: fixed; top: 0; left: 0; width: 60%; height: 100%; background-color: white; z-index: 9999; box-shadow: 4rpx 0 20rpx rgba(0, 0, 0, 0.2); animation: slideIn 0.3s ease; display: flex; flex-direction: column; } /* 动画效果 */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideIn { from { transform: translateX(-100%); } to { transform: translateX(0); } } .sidebar-title { font-size: 36rpx; font-weight: bold; color: #333; padding: 40rpx 20rpx; border-bottom: 2rpx solid #eee; text-align: center; } .sidebar-menu { flex: 1; padding: 20rpx 0; } .sidebar-item { display: flex; align-items: center; padding: 30rpx 40rpx; transition: all 0.3s ease; border-bottom: 1rpx solid #f0f0f0; } .sidebar-item:hover { background-color: #f5f5f5; padding-left: 50rpx; } .sidebar-item-icon { font-size: 36rpx; margin-right: 20rpx; } .sidebar-item-text { font-size: 28rpx; color: #333; font-weight: bold; } /* 商品区域样式 - 调整为占据70%空间 */ .goods-section { background-color: white; padding: 20rpx; border-radius: 10rpx; margin: 0 20rpx 20rpx 20rpx; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); flex: 7; overflow-y: auto; width: calc(100% - 40rpx); box-sizing: border-box; } .goods-title { font-size: 28rpx; font-weight: bold; color: #333; margin-bottom: 20rpx; } .goods-list { overflow-y: auto; -webkit-overflow-scrolling: touch; } .goods-list-container { display: flex; flex-wrap: wrap; gap: 20rpx; justify-content: flex-start; padding-bottom: 20rpx; } .goods-item { width: calc((100% - 20rpx) / 2); background-color: #f9f9f9; border-radius: 10rpx; overflow: hidden; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); transition: all 0.3s ease; } .goods-item:hover { box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); transform: translateY(-2rpx); } .goods-image-container { position: relative; width: 100%; padding-bottom: 100%; overflow: hidden; } .goods-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #eee; } .goods-tag { position: absolute; top: 10rpx; left: 10rpx; background-color: rgba(255, 90, 90, 0.8); color: white; font-size: 20rpx; padding: 5rpx 10rpx; border-radius: 15rpx; font-weight: bold; } .goods-info { padding: 15rpx; } .goods-name { font-size: 26rpx; font-weight: bold; color: #333; margin-bottom: 10rpx; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 60rpx; } .goods-spec { font-size: 22rpx; color: #999; margin-bottom: 10rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .goods-price { font-size: 32rpx; font-weight: bold; color: #ff4d4f; margin-bottom: 10rpx; } .goods-footer { display: flex; justify-content: space-between; font-size: 20rpx; color: #999; } .goods-region { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .goods-reserved { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 空商品样式 */ .empty-goods { width: 100%; text-align: center; padding: 60rpx 0; color: #999; font-size: 28rpx; } /* 加载更多样式 */ .loading-more { width: 100%; text-align: center; padding: 20rpx 0; color: #999; font-size: 24rpx; } /* 弹窗样式 */ .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-color: #fff; border-radius: 24rpx; width: 85%; max-width: 520rpx; padding: 50rpx 40rpx; box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.18); } .auth-modal-title { font-size: 40rpx; font-weight: bold; color: #333; text-align: center; margin-bottom: 35rpx; } .auth-modal-content { font-size: 32rpx; line-height: 1.6; color: #666; text-align: center; margin-bottom: 50rpx; } .auth-modal-buttons { display: flex; flex-direction: column; gap: 24rpx; } .auth-primary-button { background-color: #07c160; color: #fff; font-size: 34rpx; font-weight: 600; line-height: 1.6; border-radius: 12rpx; padding: 24rpx 0; box-shadow: 0 4rpx 12rpx rgba(7, 193, 96, 0.3); } .auth-cancel-button { background-color: #fff; color: #999; font-size: 34rpx; font-weight: 500; line-height: 1.6; border-radius: 12rpx; padding: 24rpx 0; border: 2rpx solid #e5e5e5; } /* 头像选择样式 */ .avatar-section { text-align: center; margin-bottom: 40rpx; } .avatar-wrapper { padding: 0; background: none; border: none; } .avatar { width: 160rpx; height: 160rpx; border-radius: 50%; } /* 表单样式 */ .form-group { margin-bottom: 30rpx; } .form-label { font-size: 28rpx; margin-bottom: 10rpx; display: block; } .form-input { border: 1rpx solid #eee; border-radius: 8rpx; padding: 20rpx; width: 100%; max-width: 100%; box-sizing: border-box; font-size: 28rpx; } .form-actions { text-align: center; margin-top: 40rpx; } .confirm-button { background-color: #07c160; color: white; width: 100%; border-radius: 8rpx; border: none; } /* 登录提示样式 */ .login-hint { margin-top: 50rpx; font-size: 28rpx; color: #666; text-align: center; } .link-text { color: #1677ff; } /* 图片预览样式 */ .image-preview-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999; } .image-preview-swiper { width: 100%; height: 100%; } .preview-image { width: 100%; height: 100%; display: block; } .image-preview-close { position: absolute; top: 40rpx; right: 40rpx; width: 60rpx; height: 60rpx; background-color: rgba(0, 0, 0, 0.5); border-radius: 30rpx; display: flex; justify-content: center; align-items: center; z-index: 10000; } .close-icon { color: white; font-size: 36rpx; font-weight: bold; }