/* H5活动页面样式 - 移动端优先 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(100vw / 7.5); }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: #f5f5f5; color: #333; max-width: 7.5rem; margin: 0 auto; position: relative; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* 页面加载 */
.loading { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; }
.loading-icon { width: 0.8rem; height: 0.8rem; border: 3px solid #f0f0f0; border-top-color: #ff4d4f; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 0.2rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #999; font-size: 0.28rem; }

/* 顶部区域 */
.header { padding: 0.3rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.header-content { display: flex; align-items: center; gap: 0.2rem; }
.platform-icon { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: white; }
.header-title { font-size: 0.32rem; font-weight: bold; }
.header-subtitle { font-size: 0.24rem; opacity: 0.9; margin-top: 0.05rem; }

/* 商品展示区 */
.product-section { background: white; margin: 0.2rem; border-radius: 0.16rem; padding: 0.3rem; }
.product-images { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem; margin-bottom: 0.2rem; }
.product-image { aspect-ratio: 1; background: #f9f9f9; border-radius: 0.08rem; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image.single { grid-column: 1 / -1; aspect-ratio: 16/9; }

.product-title { font-size: 0.3rem; font-weight: bold; margin-bottom: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { display: flex; align-items: baseline; gap: 0.15rem; margin-bottom: 0.2rem; }
.price-current { color: #e74c3c; font-size: 0.48rem; font-weight: bold; }
.price-original { color: #999; font-size: 0.24rem; text-decoration: line-through; }
.price-coupon { background: #e74c3c; color: white; font-size: 0.22rem; padding: 0.03rem 0.1rem; border-radius: 0.04rem; }

/* 抢购按钮 */
.buy-btn { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #ff4d4f 0%, #ff6b6b 100%); color: white; padding: 0.3rem; border-radius: 0.5rem; margin-top: 0.3rem; cursor: pointer; transition: transform 0.2s; }
.buy-btn:active { transform: scale(0.98); }
.buy-btn.disabled { background: #ccc; cursor: not-allowed; }
.buy-btn-left { font-size: 0.32rem; font-weight: bold; }
.buy-btn-right { display: flex; align-items: center; gap: 0.1rem; font-size: 0.28rem; }
.buy-btn-right::after { content: '>'; }

/* 商品列表 */
.product-list { background: white; margin: 0.2rem; border-radius: 0.16rem; }
.product-item { display: flex; padding: 0.25rem; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.product-item:last-child { border-bottom: none; }
.product-item:active { background: #f9f9f9; }
.item-image { width: 1.5rem; height: 1.5rem; border-radius: 0.08rem; background: #f9f9f9; flex-shrink: 0; }
.item-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.08rem; }
.item-info { flex: 1; margin-left: 0.2rem; display: flex; flex-direction: column; justify-content: space-between; }
.item-title { font-size: 0.26rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-bottom { display: flex; align-items: center; justify-content: space-between; }
.item-price-group { display: flex; align-items: baseline; gap: 0.1rem; }
.item-price { color: #e74c3c; font-size: 0.32rem; font-weight: bold; }
.item-original { color: #999; font-size: 0.2rem; text-decoration: line-through; }
.item-coupon { background: #e74c3c; color: white; font-size: 0.18rem; padding: 0.02rem 0.08rem; border-radius: 0.03rem; }
.item-arrow { color: #ccc; font-size: 0.24rem; }

/* 弹窗提示 */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.75); color: white; padding: 0.3rem 0.5rem; border-radius: 0.1rem; font-size: 0.28rem; z-index: 1000; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* 复制成功提示 */
.copy-popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 100; }
.copy-popup.show { display: flex; }
.copy-popup-content { background: white; border-radius: 0.2rem; padding: 0.4rem; text-align: center; max-width: 5rem; }
.copy-popup-icon { width: 1rem; height: 1rem; margin: 0 auto 0.2rem; }
.copy-popup-title { font-size: 0.32rem; font-weight: bold; margin-bottom: 0.1rem; }
.copy-popup-desc { font-size: 0.24rem; color: #666; margin-bottom: 0.3rem; }
.copy-popup-btn { width: 100%; padding: 0.2rem; background: #ff4d4f; color: white; border: none; border-radius: 0.5rem; font-size: 0.28rem; cursor: pointer; }
.copy-popup-close { position: absolute; top: 0.2rem; right: 0.2rem; width: 0.5rem; height: 0.5rem; background: rgba(255,255,255,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.3rem; cursor: pointer; }

/* 活动不存在 */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 0.5rem; text-align: center; }
.error-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.error-title { font-size: 0.36rem; font-weight: bold; margin-bottom: 0.2rem; }
.error-desc { font-size: 0.28rem; color: #999; }

/* 隐藏类 */
.hidden { display: none !important; }

/* 空状态 */
.empty-state { text-align: center; padding: 1rem; color: #999; font-size: 0.28rem; }

/* 首页商品列表 */
.home-products { padding: 0.2rem; }
.home-product-item { display: flex; align-items: center; background: white; margin-bottom: 0.15rem; padding: 0.25rem; border-radius: 0.12rem; }
.home-product-img { width: 1.4rem; height: 1.4rem; border-radius: 0.08rem; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.home-product-img img { width: 100%; height: 100%; object-fit: cover; }
.home-product-img .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 0.2rem; }
.home-product-info { flex: 1; margin-left: 0.2rem; min-width: 0; }
.home-product-title { font-size: 0.28rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-product-activity { font-size: 0.22rem; color: #999; margin-top: 0.05rem; }
.home-product-price { margin-top: 0.1rem; display: flex; align-items: baseline; gap: 0.1rem; }
.home-product-price .price { color: #e74c3c; font-size: 0.32rem; font-weight: bold; }
.home-product-price .original { color: #999; font-size: 0.2rem; }
.home-product-price .coupon { background: #e74c3c; color: white; font-size: 0.18rem; padding: 0.02rem 0.06rem; border-radius: 0.03rem; }
.home-product-btn { padding: 0.12rem 0.2rem; background: linear-gradient(135deg, #ff4d4f 0%, #ff6b6b 100%); color: white; border: none; border-radius: 0.08rem; font-size: 0.26rem; cursor: pointer; flex-shrink: 0; margin-left: 0.15rem; }
.home-product-btn.disabled { background: #ccc; cursor: not-allowed; }

/* 活动列表 */
.section-title { font-size: 0.32rem; font-weight: bold; padding: 0.3rem 0.2rem 0.2rem; color: #333; }
.activity-list { padding: 0 0.2rem; }
.activity-card { display: flex; align-items: center; justify-content: space-between; background: white; padding: 0.3rem; margin-bottom: 0.15rem; border-radius: 0.12rem; cursor: pointer; }
.activity-card:active { background: #f5f5f5; }
.activity-info { flex: 1; }
.activity-title { font-size: 0.3rem; font-weight: bold; margin-bottom: 0.1rem; }
.activity-meta { font-size: 0.24rem; color: #999; }
.activity-arrow { font-size: 0.4rem; color: #ccc; }

/* 链接活动 */
.link-activity { padding: 0.3rem; }
.link-banner { width: 100%; border-radius: 0.16rem; margin-bottom: 0.3rem; overflow: hidden; background: #f5f5f5; }
.link-banner img { width: 100%; display: block; }
.link-title { font-size: 0.36rem; font-weight: bold; text-align: center; margin-bottom: 0.3rem; }
.link-btn { display: block; width: 100%; padding: 0.3rem; background: linear-gradient(135deg, #ff4d4f 0%, #ff6b6b 100%); color: white; text-align: center; border-radius: 0.5rem; font-size: 0.32rem; font-weight: bold; cursor: pointer; }
.link-btn:active { transform: scale(0.98); }
