﻿/* 宏帆捷凯 · 运动毛巾 —— hf 主题（水蓝+暖珊瑚，区别于其它站） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #eef4f6; color: #1f2a33; max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 130px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 顶部搜索栏 */
.hf-search { display: flex; align-items: center; background: linear-gradient(135deg, #0E7C86, #0A5A62); padding: 10px 14px; }
.hf-search input { flex: 1; border: none; border-radius: 18px; padding: 8px 14px; font-size: 14px; outline: none; }

/* 导航 Tab */
.hf-nav { display: flex; gap: 14px; background: #0E7C86; color: #dff0f2; padding: 10px 14px 12px; font-size: 14px; overflow-x: auto; }
.hf-nav a { white-space: nowrap; color: #dff0f2; }
.hf-nav a.active { color: #fff; font-weight: bold; border-bottom: 2px solid #E8743B; padding-bottom: 2px; }

/* 轮播 Banner（固定 170px，避免大图把首屏商品价格挤到折叠线下） */
.hf-banner { margin: 10px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(14,124,134,.15); height: 170px; }
.hf-banner img { width: 100%; height: 170px; object-fit: cover; }

/* 区块标题 */
.hf-sec { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 12px 8px; }
.hf-sec h3 { font-size: 17px; color: #0A5A62; }
.hf-sec span { font-size: 12px; color: #7A8A90; }

/* 商品网格（两列） */
.hf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.hf-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); border: 1px solid #e3edf0; }
.hf-card .hf-thumb { width: 100%; height: 120px; object-fit: cover; background: #eef4f6; }
.hf-card .hf-info { padding: 8px 10px 12px; }
.hf-card .hf-name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hf-card .hf-price { color: #E8743B; font-weight: bold; margin: 6px 0 8px; }

/* 主按钮（卡片购买） */
.hf-buy { background: #E8743B; color: #fff; border: none; border-radius: 14px; padding: 6px 16px; font-size: 13px; }

/* 详情页规格标签 */
.hf-tag { display: inline-block; background: #e7f3f4; color: #0E7C86; border: 1px solid #0E7C86; border-radius: 14px; font-size: 12px; padding: 3px 10px; margin: 2px 4px 2px 0; }

/* 底部 TabBar（前台，水蓝主题） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #0E7C86; display: flex; border-top: 1px solid #0A5A62; z-index: 90; }
.tabbar a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: #cfe9ec; }
.tabbar a .ico { font-size: 20px; display: block; }
.tabbar a.active { color: #fff; }

/* ===== 商品详情页（沿用框架类名，确保 swiper JS 不变） ===== */
.swiper { position: relative; background: #000; overflow: hidden; }
.swiper-track { display: flex; transition: transform .3s ease; will-change: transform; cursor: grab; touch-action: pan-y; }
.swiper-track.dragging { transition: none; cursor: grabbing; }
.swiper .swiper-slide { flex: 0 0 100%; }
.swiper .swiper-slide img { width: 100%; aspect-ratio: 1; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.swiper .counter { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; border-radius: 12px; padding: 2px 10px; pointer-events: none; }
.swiper .arrow-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; line-height: 28px; text-align: center; background: rgba(0,0,0,.35); color: #fff; border-radius: 50%; font-size: 16px; cursor: pointer; }
.swiper .arrow-btn.prev { left: 8px; }
.swiper .arrow-btn.next { right: 8px; }
.swiper .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.swiper .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.swiper .dots i.on { background: #fff; width: 14px; border-radius: 3px; }

.pd-price-row { display: flex; gap: 6px; padding: 8px 12px 0; align-items: center; flex-wrap: wrap; }
.tag { background: #e7f3f4; color: #0E7C86; border: 1px solid #0E7C86; border-radius: 14px; font-size: 12px; padding: 3px 10px; }
.pd-price { font-size: 20px; font-weight: bold; color: #E8743B; }
.pd-title { font-size: 16px; font-weight: bold; padding: 6px 12px; line-height: 1.5; }
.pd-meta { display: flex; justify-content: space-between; color: #999; font-size: 12px; padding: 0 12px 10px; }
.card { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 12px; }
.spec-row { display: flex; justify-content: space-between; align-items: center; }
.arrow { color: #ccc; }

/* 规格弹层 */
.spec-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; z-index: 99; }
.spec-panel { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 14px 14px 0 0; padding: 14px; display: none; z-index: 100; max-height: 70vh; overflow: auto; }
.spec-item { display: inline-block; border: 1px solid #0E7C86; color: #0E7C86; border-radius: 14px; padding: 5px 12px; font-size: 13px; margin: 4px 6px 4px 0; cursor: pointer; }
.spec-item.on { background: #0E7C86; color: #fff; }
.num-ctrl { display: inline-flex; align-items: center; gap: 10px; }
.num-ctrl button { width: 28px; height: 28px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }

/* 底部操作栏 */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 64px; max-width: 480px; margin: 0 auto; background: #fff; display: flex; align-items: center; padding: 8px 12px; gap: 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 90; }
.bottom-bar .op { text-align: center; font-size: 11px; color: #666; width: 44px; }
.bottom-bar .op .ico { font-size: 18px; }
.btn-cart { flex: 1; background: #9aa6bd; color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }
.btn-buy2 { flex: 1; background: #E8743B; color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }

/* 参数表 */
.hf-spec { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.hf-spec th, .hf-spec td { border-bottom: 1px solid #e3edf0; padding: 10px 12px; font-size: 13px; text-align: left; }
.hf-spec th { background: #e7f3f4; color: #0A5A62; width: 86px; font-weight: normal; }
.hf-spec td { color: #333; }
.hf-pay { color: #0E7C86; font-weight: bold; }

/* 移动端收紧首屏：压缩 hero 与卡片图后，再把商品区上边距收到 8px，
   确保审核端手机视口首屏能看到第一排商品价格（规避“没有明确价格”驳回） */
@media (max-width: 480px) {
  .hf-sec { padding: 8px 12px 6px; }
  .hf-grid { padding: 8px 12px 0; }
  .hf-card .hf-thumb { height: 110px; }
}

/* ===== 桌面端铺满：解除 480px 手机壳，商品改 4 列 ===== */
@media (min-width: 768px) {
  body { max-width: none; margin: 0; padding: 0 40px 130px; box-shadow: none; }
  .hf-search { margin: 0 -40px; padding: 12px 40px; }
  .hf-nav { margin: 0 -40px; padding: 12px 40px 14px; gap: 22px; font-size: 15px; }
  .hf-banner { max-width: 1200px; margin: 14px auto; }
  .hf-sec { padding: 16px 2px 10px; }
  .hf-sec h3 { font-size: 20px; }
  .hf-sec span { font-size: 13px; }
  .hf-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; }
  .hf-card .hf-thumb { height: 200px; }
  .hf-card .hf-info { padding: 10px 12px 14px; }
  .hf-card .hf-name { font-size: 14px; height: 40px; }
  .hf-card .hf-price { font-size: 17px; }
  .tabbar, .bottom-bar, .spec-panel { max-width: none; }
  .bottom-bar .op { width: 64px; }
  .swiper { max-width: 640px; margin: 20px auto 0; border-radius: 12px; }
  .pd-price-row, .pd-title, .pd-meta, .card { max-width: 900px; margin-left: auto; margin-right: auto; }
  .pd-meta { padding: 0 0 10px; }
  .swiper .arrow-btn.prev { left: calc(50% - 352px); }
  .swiper .arrow-btn.next { right: calc(50% - 352px); }
}
@media (min-width: 1920px) {
  body { max-width: 1800px; margin: 0 auto; }
}
