/* ===== 全新纯净版重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; background-color: #f5f5f5; color: #333; font-size: 16px; overflow-x: hidden; }
img { display: block; max-width: 100%; background-color: transparent; }

/* ===== 顶部橙色横幅 (确保没有任何外补丁) ===== */
.hero-banner { position: relative; width: 100%; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; }

/* ===== 搜索栏 ===== */
.search-bar { position: relative; display: flex; align-items: center; justify-content: space-between; margin: -20px 16px 16px 16px; padding: 0 16px; height: 44px; background: #fff; border-radius: 24px; z-index: 10; border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.05); cursor: pointer; }
.search-placeholder { font-size: 14px; color: #999; flex: 1; }
.search-icon { display: flex; align-items: center; flex-shrink: 0; margin-left: 8px; }

/* ===== AI功能卡片 ===== */
.ai-feature-card { display: flex; align-items: center; margin: 0 16px 20px 16px; padding: 14px 16px; background: #ffffff; border-radius: 16px; border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.ai-feature-icon-box { position: relative; width: 48px; height: 48px; border-radius: 12px; overflow: visible; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #FF6600; }
.ai-tag { position: absolute; bottom: -6px; right: -6px; background: #fff; color: #FF6600; font-size: 10px; font-weight: bold; padding: 1px 5px; border-radius: 4px; border: 1px solid #FF6600; line-height: 1.2; z-index: 5; }
.ai-feature-text { display: flex; flex-direction: column; margin-left: 12px; flex: 1; }
.ai-feature-title { font-size: 16px; font-weight: 700; color: #333; }
.ai-feature-subtitle { font-size: 12px; color: #999; margin-top: 4px; }
.ai-feature-arrow { width: 40px; height: 40px; border-radius: 12px; background: #FF6600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== Section Header ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 16px 12px 16px; }
.section-title { font-size: 18px; font-weight: 700; color: #333; }
.section-link { font-size: 13px; color: #FF6600; display: flex; align-items: center; }

/* ===== 商品双列网格 ===== */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.product-card { background: #ffffff; border-radius: 12px; overflow: hidden; border: none; cursor: pointer; }
.product-img-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #f0f0f0; overflow: hidden; }
.product-img { width: 100%; height: 100%; object-fit: cover; background-color: #f0f0f0; }
.product-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: #fff; background: #FF6600; border-radius: 10px; line-height: 1.4; z-index: 2; }
.product-info { padding: 8px 10px 10px; background: #ffffff; }
.product-name { font-size: 13px; color: #333; background: transparent; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== AI特色功能 ===== */
.func-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 0 16px; }
.func-item { display: flex; flex-direction: column; align-items: center; background: #ffffff; border-radius: 12px; padding: 16px 8px 14px; border: none; text-decoration: none; color: inherit; }
.func-icon-box { width: 44px; height: 44px; border-radius: 12px; background: #FFF3E0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.func-label { font-size: 12px; color: #666; margin-top: 8px; text-align: center; }

/* ===== 底部导航 ===== */
.bottom-tab { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; background: #fff; border-top: 1px solid #eee; padding-bottom: env(safe-area-inset-bottom, 0); height: calc(60px + env(safe-area-inset-bottom, 0)); }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0 4px; text-decoration: none; color: #999; }
.tab-icon { width: 24px; height: 24px; margin-bottom: 2px; }
.tab-label { font-size: 11px; color: #999; }
.tab-label-active { color: #FF6600; font-weight: 600; }
.tab-item.highlight .tab-icon { width: 30px; height: 30px; background: #FF6600; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; box-shadow: 0 4px 8px rgba(255, 85, 0, 0.2); }
.tab-item.highlight .tab-icon svg { stroke: #fff; fill: none; stroke-width: 1.5; }
.tab-item.highlight .tab-label { color: #FF6600; font-weight: 600; }

/* ===== 商品价格行 ===== */
.product-price-row { display: flex; align-items: baseline; margin-top: 6px; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.price-value { color: #FF3300; font-size: 20px; font-weight: 800; line-height: 1; }
.original-price { color: #999; text-decoration: line-through; font-size: 12px; }
.saving-badge { background: #FF3B30; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: bold; white-space: nowrap; margin-left: 4px; }
.price-label { font-size: 11px; color: #999; white-space: nowrap; }

/* ===== 电脑端居中 ===== */
@media screen and (min-width: 1025px) {
  body { background: #eaeaea; display: flex; flex-direction: column; align-items: center; padding: 20px 0; }
  .main-content { max-width: 480px; width: 100%; margin: 0 auto; background: #f5f5f5; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border-radius: 12px 12px 0 0; }
}