.index { position: relative; min-height: 100vh; overflow: hidden; // 背景图层 .bg-image { position: absolute; top: 0; left: 0; width: 100%; z-index: 0; } // 内容层 .index-content { position: relative; z-index: 1; } .site-name { padding: 24px 32px 0; color: #fff; } // ========== 1. 搜索栏 ========== .search-wrapper { padding: 24px 32px 16px; .van-search { padding: 0; border-radius: 36px; overflow: hidden; box-shadow: 0 4px 16px rgba(255, 107, 53, 0.15); } .van-search__content { border-radius: 36px; } } // ========== 2. 轮播图 ========== .swiper-wrapper { margin: 8px 32px 20px; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); .swiper-img { width: 100%; height: 100%; } } // ========== 3. 宫格导航 ========== .grid-wrapper { margin: 16px 32px 20px; background: rgb(255 255 255); border-radius: 20px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); padding-bottom: 24px; .grid-title { font-size: 32px; font-weight: 600; color: #333; } .van-grid-item__content { padding-top: 24px; padding-bottom: 0; } .van-icon--image { width: 60px !important; height: 60px !important; } .van-grid-item__text { font-size: 22px; color: #555; margin-top: 8px; } } // ========== 4. 活动专区 ========== .activity-section { padding: 0 32px; margin-bottom: 24px; .activity-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; .activity-title { display: flex; align-items: center; font-size: 34px; font-weight: 700; color: #333; .title-accent { width: 8px; height: 32px; border-radius: 4px; background: linear-gradient(180deg, #ffb347, #ff6b35); margin-right: 14px; } } .activity-more { display: flex; align-items: center; font-size: 24px; color: #999; .more-arrow { margin-left: 2px; font-size: 28px; line-height: 1; } } } .activity-cards { display: flex; gap: 20px; margin-bottom: 20px; // 只有一条活动时占满整行 &.single .activity-card { flex: 1 1 100%; } } .activity-card { position: relative; flex: 1; min-height: 216px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 24px; border-radius: 24px; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); transition: transform 0.2s ease; &:active { transform: scale(0.97); } // 装饰圆,增加层次感 .deco-circle { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.14); } .circle-1 { width: 170px; height: 170px; top: -60px; right: -44px; } .circle-2 { width: 96px; height: 96px; bottom: -40px; left: -24px; background: rgba(255, 255, 255, 0.1); } .activity-card-main { position: relative; z-index: 1; } .activity-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 34px; border-radius: 16px; margin-bottom: 14px; overflow: hidden; .activity-icon-img { width: 100%; height: 100%; } } .activity-name { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 4px; } .activity-desc { font-size: 22px; color: rgba(255, 255, 255, 0.85); } } // 满减优惠:橙红渐变 .card-fullcut { background: linear-gradient(135deg, #ff9560 0%, #ff5a3c 100%); .activity-btn { color: #ff5a3c; } } // 新品首发:青绿渐变 .card-newbie { background: linear-gradient(135deg, #43d6a5 0%, #14b07c 100%); .activity-btn { color: #14b07c; } } } // ========== 5. 底部推荐卡片 ========== // section-card 通用样式(活动专区 + 底部推荐共用) .section-card { display: flex; align-items: center; background: rgba(255, 255, 255, 0.9); border-radius: 18px; padding: 24px 28px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); transition: transform 0.2s ease; &:active { transform: scale(0.98); } .card-icon { font-size: 48px; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 18px; margin-right: 20px; flex-shrink: 0; overflow: hidden; .card-icon-img { width: 100%; height: 100%; } } .card-info { flex: 1; .card-title { font-size: 30px; font-weight: 600; color: #333; margin-bottom: 6px; } .card-desc { font-size: 24px; color: #999; } } .card-arrow { font-size: 40px; color: #ccc; flex-shrink: 0; } } // 底部留白 .bottom-spacer { height: 60px; } }