* { 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: #f5f5f5; color: #333; max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 60px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.search-bar { display: flex; align-items: center; background: #16305a; padding: 10px 14px; }
.search-bar input { flex: 1; border: none; border-radius: 18px; padding: 8px 14px; font-size: 14px; outline: none; }

.nav-tabs { display: flex; gap: 18px; background: #16305a; color: #d8d8d8; padding: 10px 14px 12px; font-size: 15px; }
.nav-tabs a.active { color: #fff; font-weight: bold; }

.banner { margin: 10px; border-radius: 10px; overflow: hidden; }
.banner img { width: 100%; }

.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 12px 8px; }
.sec-head h3 { font-size: 17px; }
.sec-head span { font-size: 12px; color: #999; }

.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.goods-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.goods-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
.goods-card .info { padding: 8px 10px 12px; }
.goods-card .name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card .price { color: #333; font-weight: bold; margin: 6px 0 8px; }

.btn-primary { display: block; width: 100%; background: #14a327; color: #fff; border: none; border-radius: 24px; padding: 12px; font-size: 16px; text-align: center; cursor: pointer; }
.btn-buy { background: #16305a; color: #fff; border: none; border-radius: 14px; padding: 6px 16px; font-size: 13px; }

.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: #eef3fb; color: #16305a; border: 1px solid #16305a; border-radius: 14px; font-size: 12px; padding: 3px 10px; }
.pd-price { font-size: 20px; font-weight: bold; }
.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 #16305a; color: #16305a; border-radius: 14px; padding: 5px 12px; font-size: 13px; margin: 4px 6px 4px 0; cursor: pointer; }
.spec-item.on { background: #16305a; 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: 0; 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: #16305a; color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; display: flex; border-top: 1px solid #eee; z-index: 90; }
.tabbar a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: #888; }
.tabbar a .ico { font-size: 20px; display: block; }
.tabbar a.active { color: #16305a; }

.form-item { display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid #eee; padding: 14px 16px; }
.form-item input { flex: 1; border: none; outline: none; font-size: 15px; }

.cell { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }

.me-head { background: #16305a; color: #fff; padding: 18px 16px 0; }
.me-stats { display: flex; text-align: center; padding: 14px 0; }
.me-stats div { flex: 1; }
.me-stats b { display: block; font-size: 18px; }
.me-stats span { font-size: 12px; color: #cfd8ea; }

.order-grid { display: flex; background: #fff; padding: 12px 0; margin-top: 10px; }
.order-grid a { flex: 1; text-align: center; font-size: 12px; color: #555; position: relative; }
.order-grid .ico { font-size: 22px; display: block; margin-bottom: 4px; }
.order-grid .badge { position: absolute; top: -6px; right: 18%; background: #e33; color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; }

.admin-wrap { max-width: 100%; }
.admin-nav { background: #1f2d3d; color: #fff; }
.admin-nav a { color: #c6cbd4; display: block; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-nav a.active { background: #16305a; color: #fff; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid #eee; padding: 10px; font-size: 13px; text-align: left; }
.table th { background: #f8f9fb; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.btn-del { color: #e33; border-color: #e33; }
/* ============================================================
 * tihuo.asia 设计系统 —— 九形态「选购指南」
 * 配色：深青炭 #20302E / 米纸 #F7F2E9 / 陶土 #C2694A / 松石 #3E7C73
 * 刊头衬线，编辑式指南版式，区别于 chensui(场景门店)/huenshi(目录册)
 * ============================================================ */
:root{
  --th-ink:#20302E; --th-paper:#F7F2E9; --th-accent:#C2694A;
  --th-2:#3E7C73; --th-line:#E3D9C9; --th-muted:#8A8174;
  --th-serif:Georgia,"Songti SC","STSong",serif;
}
body.th-guide{ background:var(--th-paper); color:var(--th-ink); max-width:480px; margin:0 auto; padding-bottom:64px; }

.th-topbar{ display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:var(--th-ink); color:#F3EEE3; padding:8px 14px; font-size:13px; }
.th-topbar .th-tb-ico{ font-size:15px; }
.th-topbar a{ color:#F3EEE3; }
.th-topbar .th-tb-phone{ font-weight:bold; letter-spacing:.5px; }

.th-masthead{ background:var(--th-ink); color:var(--th-paper); padding:22px 18px 18px; }
.th-masthead .th-kicker{ font-size:12px; letter-spacing:3px; color:var(--th-accent); text-transform:uppercase; }
.th-masthead h1{ font-family:var(--th-serif); font-size:26px; font-weight:700; margin:6px 0 4px; line-height:1.2; }
.th-masthead .th-sub{ font-size:13px; color:#CFC6B6; }
.th-masthead .th-rule{ height:2px; background:linear-gradient(90deg,var(--th-accent),transparent); margin-top:14px; border:0; }

.th-alipay{ display:flex; align-items:center; gap:10px; margin:12px 14px 0; padding:10px 14px;
  background:#FFF; border:1px solid var(--th-line); border-left:4px solid var(--th-2); border-radius:8px; }
.th-alipay .th-ap-ico{ width:26px; height:26px; border-radius:6px; background:var(--th-2); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:15px; flex:none; }
.th-alipay .th-ap-txt b{ color:var(--th-ink); } .th-alipay .th-ap-txt span{ display:block; font-size:11px; color:var(--th-muted); }

.th-guide-nav{ display:flex; gap:8px; overflow-x:auto; padding:12px 14px; -webkit-overflow-scrolling:touch; }
.th-guide-nav a{ flex:none; padding:7px 14px; border:1px solid var(--th-line); border-radius:18px;
  font-size:13px; color:var(--th-ink); background:#fff; white-space:nowrap; }
.th-guide-nav a.active{ background:var(--th-ink); color:var(--th-paper); border-color:var(--th-ink); }
.th-guide-nav a:hover{ color:var(--th-accent); }

.th-chapter{ padding:6px 14px 4px; }
.th-chapter-h{ display:flex; align-items:baseline; gap:8px; margin:14px 0 8px; }
.th-chapter-h .th-no{ font-family:var(--th-serif); font-size:18px; color:var(--th-accent); font-weight:700; }
.th-chapter-h h2{ font-family:var(--th-serif); font-size:18px; font-weight:700; }
.th-chapter-h .th-en{ font-size:11px; color:var(--th-muted); letter-spacing:1px; }

.th-recs{ display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 14px 8px; }
.th-rec{ background:#fff; border:1px solid var(--th-line); border-radius:10px; overflow:hidden; display:block; }
.th-rec .th-rec-img{ position:relative; aspect-ratio:1/1; background:#EFE8DA; }
.th-rec .th-rec-img img{ width:100%; height:100%; object-fit:cover; }
.th-rec .th-rec-idx{ position:absolute; top:6px; left:6px; background:var(--th-ink); color:var(--th-paper);
  font-family:var(--th-serif); font-size:12px; padding:2px 7px; border-radius:4px; }
.th-rec .th-rec-body{ padding:8px 9px 10px; }
.th-rec .th-rec-name{ font-size:13px; line-height:1.35; height:2.7em; overflow:hidden; }
.th-rec .th-rec-price{ color:var(--th-accent); font-weight:700; margin-top:5px; font-size:14px; }
.th-rec .th-rec-cat{ font-size:11px; color:var(--th-muted); margin-top:2px; }

.th-note{ margin:12px 14px; padding:12px 14px; background:#fff; border:1px dashed var(--th-2);
  border-radius:8px; font-size:13px; color:var(--th-ink); line-height:1.6; }
.th-note b{ color:var(--th-2); }

.th-pay{ display:flex; align-items:center; gap:10px; margin:10px 14px; padding:10px 14px;
  background:#fff; border:1px solid var(--th-line); border-left:4px solid var(--th-2); border-radius:8px; }
.th-pay .th-ap-ico{ background:var(--th-2); }
.th-pay .th-pay-txt b{ color:var(--th-ink); } .th-pay .th-pay-txt span{ display:block; font-size:11px; color:var(--th-muted); }

.th-content{ padding:18px 16px 30px; line-height:1.85; font-size:14px; color:var(--th-ink); }
.th-content h1{ font-family:var(--th-serif); font-size:22px; margin-bottom:6px; }
.th-content .th-c-kicker{ color:var(--th-accent); font-size:12px; letter-spacing:2px; }
.th-content h2{ font-family:var(--th-serif); font-size:17px; margin:20px 0 8px; }
.th-content p{ margin:10px 0; }
.th-content ul{ margin:8px 0 8px 20px; } .th-content li{ margin:5px 0; }
.th-content .th-callout{ background:#fff; border:1px solid var(--th-line); border-left:4px solid var(--th-accent);
  border-radius:8px; padding:12px 14px; margin:14px 0; }

.th-siteinfo{ background:var(--th-ink); color:#CFC6B6; font-size:12px; line-height:1.8; padding:14px 16px; text-align:center; }
.th-siteinfo a{ color:#CFC6B6; } .th-siteinfo b{ color:var(--th-paper); font-weight:600; }
.th-siteinfo .th-si-icp{ margin-top:6px; }


/* ============================================================
 * 2026-11-04 追加：移动端底部双栏分层 + 桌面铺满
 * 原问题：.tabbar 与 .bottom-bar 同为 fixed bottom:0 / z-index:90，
 *         商品页 .bottom-bar 整块盖住 .tabbar，下层按钮点不到。
 * 处理：tabbar 常驻底部（z 80）；bottom-bar 抬到 tabbar 之上（bottom:62px，z 95）。
 * ============================================================ */
.tabbar { z-index: 80; }
.bottom-bar { bottom: 0; z-index: 95; }
/* 只有存在 .tabbar 的页面才把 bottom-bar 抬到 tabbar 之上（结算页无 tabbar，保持贴底） */
body:has(.tabbar) .bottom-bar { bottom: 62px; }
body, body.th-guide { padding-bottom: 130px; }

@media (min-width: 768px) {
  body, body.th-guide { max-width: none; margin: 0; padding: 0 28px 92px; box-shadow: none; }
  .wrap, .main, .container { max-width: none; }
  .tabbar { display: none; }
  .bottom-bar, body:has(.tabbar) .bottom-bar { bottom: 0; max-width: none; margin: 0; padding: 10px 28px 14px; }

  /* 通栏区块拉满视口宽度 */
  .th-topbar, .th-masthead, .th-siteinfo { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
  .th-masthead { padding-top: 12px; padding-bottom: 10px; }
  .th-masthead h1 { font-size: 23px; }
  .th-guide-nav, .th-note, .th-alipay, .th-pay { margin-left: 0; margin-right: 0; }
  .th-guide-nav { padding-top: 8px; padding-bottom: 8px; padding-left: 0; padding-right: 0; }
  .th-alipay { padding-top: 8px; padding-bottom: 8px; }
  .th-chapter { padding-left: 0; padding-right: 0; }
  .th-chapter-h { margin: 6px 0 6px; }
  .th-note { margin-top: 6px; margin-bottom: 6px; padding: 10px 14px; }

  /* 桌面商品栅格：铺满一行 5 件，滚动即见 */
  .th-recs { grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 0; }
  .th-rec .th-rec-img img { object-fit: contain; background: #fff; }
  .th-rec .th-rec-body { padding: 8px 10px 10px; }
  .th-rec .th-rec-name { height: auto; max-height: 2.7em; }

  /* 商品详情：主图不再拉成满屏正方形 */
  .swiper { background: #fff; }
  .swiper .swiper-slide img { height: min(70vh, 620px); aspect-ratio: auto; object-fit: contain; }
  .pd-price-row, .pd-title, .pd-meta { padding-left: 0; padding-right: 0; }
  .card { margin-left: 0; margin-right: 0; }
  .th-content { max-width: 920px; margin: 0 auto; }
  .spec-panel { max-width: 560px; }
}

