/* 全局样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } /* 商品详情页容器 */ .detail-container { width: 100%; min-height: 100vh; background-color: #f5f5f5; padding-bottom: 100rpx; } /* 轮播图容器 */ .swiper-container { position: relative; width: 100%; height: 600rpx; background-color: #fff; } .swiper-image { width: 100%; height: 100%; object-fit: cover; } .swiper-indicator { position: absolute; bottom: 20rpx; right: 20rpx; background-color: rgba(0, 0, 0, 0.5); color: #fff; padding: 10rpx 20rpx; border-radius: 20rpx; font-size: 24rpx; } /* 商品信息 */ .product-info { padding: 30rpx; background-color: #fff; margin-bottom: 20rpx; } .product-price { display: flex; align-items: baseline; margin-bottom: 20rpx; justify-content: space-between; } .price-number { font-size: 48rpx; font-weight: bold; color: #ff4d4f; margin-right: 10rpx; } .price-unit { font-size: 28rpx; color: #ff4d4f; } .product-name { font-size: 32rpx; font-weight: 500; color: #333; line-height: 48rpx; margin-bottom: 15rpx; } .exchange-info { font-size: 24rpx; color: #999; } /* 商品详情 */ .product-details { padding: 30rpx; background-color: #fff; } .detail-title { font-size: 32rpx; font-weight: 500; color: #333; margin-bottom: 20rpx; padding-bottom: 20rpx; border-bottom: 1rpx solid #e8e8e8; display: flex; align-items: center; } .line { flex: 1; height: 1rpx; background-color: #000000; margin: 0 20rpx; } .detail-content { width: 100%; } .detail-image { width: 100%; height: auto; margin-bottom: 20rpx; } /* 底部操作栏 */ .bottom-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 150rpx; background-color: #fff; border-top: 1rpx solid #e8e8e8; display: flex; align-items: center; padding: 0 30rpx; z-index: 99; } .points-info { display: flex; flex-direction: column; margin-right: 30rpx; } .points-label { font-size: 24rpx; color: #999; } .points-number { font-size: 32rpx; font-weight: bold; color: #ff6262; } .insufficient-points { width: 60%; height: 70rpx; line-height: 70rpx; background-color: #f0f0f0; color: #999; text-align: center; border-radius: 35rpx; font-size: 28rpx; margin-left: 10%; } .exchange-btn { width: 200rpx; height: 70rpx; line-height: 70rpx; background-color: #ff4d4f; color: #fff; text-align: center; border-radius: 25rpx; font-size: 32rpx; border: none; position: absolute; right: 100rpx; } /* 规格选择弹窗 */ .spec-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; justify-content: flex-end; align-items: flex-end; z-index: 999; } .popup-content { width: 100%; background-color: #fff; border-radius: 30rpx 30rpx 0 0; padding: 30rpx; max-height: 80vh; overflow-y: auto; position: relative; } .popup-header { display: flex; align-items: center; margin-bottom: 30rpx; } .spec-price { display: flex; align-items: baseline; } .spec-price-number { font-size: 48rpx; font-weight: bold; color: #ff4d4f; margin-right: 10rpx; } .spec-price-unit { font-size: 28rpx; color: #ff4d4f; } .spec-selected { font-size: 28rpx; color: #333; flex: 1; } .close-btn { font-size: 48rpx; color: #999; width: 50rpx; height: 50rpx; line-height: 50rpx; text-align: center; position: absolute; top: 30rpx; right: 30rpx; } .spec-image { width: 150rpx; height: 150rpx; margin-right: 30rpx; } .spec-image-item { width: 100%; height: 100%; object-fit: cover; border-radius: 20rpx; } .spec-section { margin-bottom: 30rpx; } .spec-title { font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 20rpx; } .spec-options { display: flex; flex-wrap: wrap; gap: 20rpx; } .spec-option { padding: 20rpx 30rpx; border: 1rpx solid #e8e8e8; border-radius: 10rpx; font-size: 28rpx; color: #333; background-color: #fafafa; } .spec-option.active { border-color: #ff4d4f; color: #ff4d4f; background-color: #fff2f0; } .quantity-section { display: flex; align-items: center; justify-content: space-between; margin: 50rpx 30rpx; } .quantity-title { font-size: 28rpx; font-weight: 500; color: #333; margin-right: 30rpx; } .quantity-control { display: flex; align-items: center; } .quantity-btn { width: 60rpx; height: 60rpx; line-height: 60rpx; text-align: center; border: 1rpx solid #e8e8e8; background-color: #fafafa; font-size: 32rpx; color: #333; display: flex; justify-content: center; align-items: center; } .quantity-btn:disabled { color: #ccc; } .quantity-input { width: 80rpx; height: 60rpx; line-height: 60rpx; text-align: center; font-size: 28rpx; color: #333; border-top: 1rpx solid #e8e8e8; border-bottom: 1rpx solid #e8e8e8; } .popup-footer { margin: 30rpx; } .confirm-btn { width: 100%; height: 80rpx; line-height: 80rpx; background-color: #ff4d4f; color: #fff; text-align: center; border-radius: 40rpx; font-size: 32rpx; border: none; } /* 适配不同屏幕尺寸 */ @media screen and (max-width: 375px) { .price-number, .spec-price-number { font-size: 40rpx; } .product-name { font-size: 28rpx; } .exchange-btn, .confirm-btn { font-size: 28rpx; } }