/* pages/goods-detail/goods-detail.wxss */ /* 页面容器 */ .goods-detail-page { min-height: 100vh; background-color: #f5f7fa; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; } /* 页面头部 */ .page-header { display: flex; align-items: center; justify-content: space-between; height: 44px; background: #ffffff; padding: 0 16px; position: fixed; top: 0; left: 0; right: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .header-left { width: 40px; } .header-center { flex: 1; text-align: center; } .header-title { font-size: 17px; font-weight: 600; color: #000000; letter-spacing: 0.5px; } .header-right { width: 40px; text-align: right; } .close-icon { font-size: 28px; color: #000000; font-weight: 300; line-height: 1; } /* 商品详情内容区域 */ .goods-detail-content { padding-top: 44px; padding-bottom: 100px; } /* 商品图片轮播 */ .goods-image-slider { width: 100%; height: 280px; background: linear-gradient(135deg, #f0f4ff 0%, #d9e4ff 100%); overflow: hidden; position: relative; } .goods-image-slider::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent); } .goods-image-slider swiper { width: 100%; height: 100%; margin: 0; padding: 0; } .goods-image-slider swiper-item { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; } .slider-image { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease; } .slider-image:active { transform: scale(0.98); } /* 商品基本信息 */ .goods-info { background-color: #ffffff; padding: 20px 16px 16px; position: relative; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } .goods-info::after { content: ''; position: absolute; bottom: 0; left: 16px; right: 16px; height: 1px; background: linear-gradient(90deg, transparent, #f0f0f0, transparent); } .goods-name { display: block; font-size: 20px; font-weight: 700; color: #262626; margin-bottom: 12px; line-height: 1.4; letter-spacing: -0.2px; } .goods-price { display: flex; align-items: baseline; margin-bottom: 4px; } .price-symbol { font-size: 15px; color: #666; margin-right: 4px; font-weight: 500; } .price-value { font-size: 28px; color: #ff4d4f; font-weight: 700; letter-spacing: -0.5px; } .price-value::before { content: '¥'; font-size: 20px; margin-right: 2px; } /* 商品详细信息网格 */ .info-grid { background-color: #ffffff; margin: 12px 0; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } .info-row { display: flex; flex-wrap: wrap; margin-bottom: 16px; background: #f0f5ff; border-radius: 10px; overflow: hidden; border: 1px solid #d6e4ff; } .info-row:last-child { margin-bottom: 0; } .info-item { flex: 0 0 50%; display: flex; flex-direction: column; padding: 14px 16px; box-sizing: border-box; position: relative; } .info-item:nth-child(odd)::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, #e8e8e8, transparent); } .info-label-container { margin-bottom: 6px; } .info-label { font-size: 13px; color: #8c8c8c; font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; } .info-value-container { min-height: 24px; } .info-value { font-size: 16px; color: #000000d9; font-weight: 600; line-height: 1.3; } /* 联系信息 */ .contact-info { margin: 16px; padding: 16px; border-radius: 12px; background: #ffffff; border: 1px solid #d6e4ff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); } .contact-label { display: block; font-size: 16px; font-weight: 600; color: #2f54eb; margin-bottom: 16px; text-align: center; } .contact-content { display: flex; flex-direction: column; gap: 12px; } .contact-item { display: flex; align-items: center; padding: 8px 0; } .phone-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; } .contact-icon { font-size: 16px; margin-right: 10px; flex-shrink: 0; width: 20px; text-align: center; color: #2f54eb; } .user-icon { font-size: 18px; } .phone-icon { font-size: 18px; } .contact-label-text { font-size: 14px; color: #595959; margin-right: 8px; white-space: nowrap; flex-shrink: 0; } .contact-text { font-size: 14px; color: #262626; flex-shrink: 0; margin-right: 16px; } .phone-info { display: flex; flex-direction: row; flex: 1; align-items: center; } .phone-info .contact-label-text { margin-bottom: 0; } .call-button { padding: 0 24px; height: 36px; line-height: 36px; font-size: 14px; color: #ffffff; background-color: #2f54eb; border: 1px solid #2f54eb; border-radius: 4px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(47, 84, 235, 0.2); } .call-button:active { background-color: #4066ff; border-color: #4066ff; box-shadow: 0 4px 12px rgba(47, 84, 235, 0.3); } .call-button:active { background-color: #1d39c4; transform: scale(0.98); } /* 操作按钮区域 */ .action-buttons { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px; background-color: #ffffff; border-top: 1px solid #f0f0f0; box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06); z-index: 99; display: flex; gap: 12px; } .bottom-button { flex: 1; height: 52px; border-radius: 26px; font-size: 18px; font-weight: 700; display: flex; justify-content: center; align-items: center; border: none; outline: none; transition: all 0.3s ease; } .call-button.bottom-button { background-color: #ffffff; color: #2f54eb; border: 2px solid #2f54eb; box-shadow: none; } .want-button.bottom-button { background: linear-gradient(135deg, #2f54eb 0%, #1d39c4 100%); color: #ffffff; box-shadow: 0 4px 12px rgba(47, 84, 235, 0.2); } .call-button.bottom-button:active { background-color: #f0f4ff; transform: scale(0.98); } .want-button.bottom-button:active { transform: translateY(2px) scale(0.98); box-shadow: 0 2px 6px rgba(47, 84, 235, 0.15); } .want-button.bottom-button[disabled] { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); color: #ffffff !important; border: none; box-shadow: 0 4px 12px rgba(82, 196, 26, 0.2); opacity: 1; } .want-button.bottom-button[disabled]:active { transform: none; box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3); } /* 图片预览弹窗 */ .image-preview-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: #000000; z-index: 1000; display: flex; flex-direction: column; } .preview-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 16px; color: #ffffff; z-index: 10; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); } .preview-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); border-radius: 22px; transition: all 0.2s ease; } .preview-close:active { background: rgba(255, 255, 255, 0.2); transform: scale(0.95); } .close-icon { font-size: 24px; color: #ffffff; font-weight: 300; } .preview-indicator { font-size: 15px; color: #ffffff; font-weight: 500; opacity: 0.8; } .preview-swiper { flex: 1; width: 100%; } .preview-image-wrapper { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 20px; box-sizing: border-box; } .preview-image { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; } /* 添加一些微动画效果 */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .goods-info, .info-grid, .contact-info { animation: fadeIn 0.4s ease-out; } .info-grid { animation-delay: 0.1s; } .contact-info { animation-delay: 0.2s; } /* 响应式调整 */ @media (min-height: 800px) { .goods-image-slider { height: 320px; } .goods-name { font-size: 22px; } .price-value { font-size: 32px; } }