:root {
  --primary: #ff4400;
  --text: #222;
  --muted: #888;
  --line: #eee;
  --bg: #f6f6f6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 60px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.header {
  background: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}
.header .title { font-size: 16px; font-weight: 600; flex: 1; }
.logo { width: 28px; height: 28px; border-radius: 6px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.search { padding: 8px 12px; background: #fff; }
.search input { width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 9px 14px; font-size: 14px; outline: none; }
.banner { margin: 10px 12px; border-radius: 10px; overflow: hidden; background: #ffe9e2; }
.banner img { width: 100%; height: 140px; object-fit: cover; }
.section { background: #fff; margin: 10px 0; padding: 12px; }
.section h3 { margin: 0 0 10px; font-size: 15px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.cat { flex: 0 0 auto; padding: 6px 12px; border-radius: 16px; background: #f2f2f2; font-size: 13px; color: #555; }
.cat.active { background: var(--primary); color: #fff; }
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px; }
.goods-card { background: #fff; border-radius: 10px; overflow: hidden; }
.goods-card .thumb { width: 100%; height: 150px; background: #f0f0f0; object-fit: cover; }
.goods-card .info { padding: 8px 10px 10px; }
.goods-card .name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; }
.price { color: var(--primary); font-weight: 700; font-size: 15px; }
.price small { font-size: 11px; font-weight: 400; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn {
  display: inline-block; border: none; border-radius: 20px; padding: 10px 18px;
  background: var(--primary); color: #fff; font-size: 14px; text-align: center;
  white-space: nowrap; box-sizing: border-box;
}
.btn.block { display: block; width: 100%; }
.btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.gray { background: #eee; color: #555; }
.btn:disabled { opacity: .5; }
.muted { color: var(--muted); font-size: 12px; }
.card { background: #fff; margin: 10px 12px; border-radius: 10px; padding: 12px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; outline: none;
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 20;
}
.tabbar a { flex: 1; text-align: center; padding: 8px 0; font-size: 12px; color: #777; }
.tabbar a.active { color: var(--primary); }
.tabbar .ico { display: block; font-size: 18px; line-height: 1.2; }
.toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 13px; z-index: 99; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }
.empty { text-align: center; color: #999; padding: 60px 20px; font-size: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: none; background: #f7f7f7; font-size: 16px; }
.qty span { width: 40px; text-align: center; font-size: 14px; }
.sku-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sku { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; background: #fff; cursor: pointer; transition: border-color .15s, color .15s, background .15s; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.sku-thumb { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; display: block; }
.sku:hover { border-color: var(--primary); color: var(--primary); }
.sku.active { border-color: var(--primary); color: #fff; background: var(--primary); font-weight: 600; }
.sku.disabled { opacity: .45; cursor: not-allowed; color: #999; background: #f7f7f7; }
.sku.disabled:hover { border-color: var(--line); color: #999; }
.sku small { font-size: 11px; opacity: .8; }
.detail-hero { width: 100%; height: 300px; object-fit: cover; background: #eee; }
.detail-body { background: #fff; padding: 14px; }
.detail-title { font-size: 17px; font-weight: 600; line-height: 1.4; margin: 8px 0; }
.order-item { background: #fff; margin: 10px 12px; border-radius: 10px; padding: 12px; }
.order-head { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 8px; }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.order-actions .btn { padding: 6px 14px; font-size: 12px; }

/* ===== PC 端适配（>=900px） ===== */
.pc-nav { display: none; }
@media (min-width: 900px) {
  body { padding-bottom: 0; background: #f2f4f7; }
  .header {
    max-width: 1200px; margin: 0 auto; padding: 14px 24px;
    border-radius: 0 0 12px 12px;
  }
  .header .title { font-size: 20px; }
  .pc-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
  .pc-nav a { font-size: 14px; color: #555; }
  .pc-nav a:hover { color: var(--primary); }
  .search { max-width: 1200px; margin: 0 auto; padding: 14px 24px 0; background: transparent; }
  .search input { border-radius: 10px; padding: 12px 16px; }
  .banner { max-width: 1200px; margin: 20px auto; }
  .banner img { height: 320px; }
  .section, .card, .order-item, .detail-body {
    max-width: 1200px; margin-left: auto; margin-right: auto;
  }
  .goods-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px; margin: 0 auto; gap: 18px; padding: 16px 24px;
  }
  .goods-card .thumb { height: 240px; }
  .goods-card .name { height: 44px; font-size: 14px; }
  .tabbar { display: none; }
  .detail-wrap {
    display: grid; grid-template-columns: 520px 1fr; gap: 24px;
    max-width: 1200px; margin: 20px auto; align-items: start;
  }
  .detail-hero { height: 520px; border-radius: 12px; }
  .detail-body { border-radius: 12px; padding: 20px; }
  .detail-title { font-size: 22px; }
  .qty button { width: 36px; height: 36px; }
  .qty span { width: 52px; }
}
@media (min-width: 900px) {
  /* 底部固定条居中，避免贴屏幕两侧 */
  body > div[style*="position:fixed"] { max-width: 1200px; left: 50% !important; transform: translateX(-50%); border-radius: 12px 12px 0 0; }
}

/* ===== 频道导航 / 店铺页脚 / 信息页 / 在线客服 ===== */
.channel-nav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.channel-nav::-webkit-scrollbar { display: none; }
.channel-nav a { flex: 0 0 auto; padding: 6px 14px; border-radius: 16px; background: #f3f4f6; color: #4b5563; font-size: 13px; white-space: nowrap; }
.channel-nav a.hot { background: #fff1ec; color: var(--primary); font-weight: 600; }

.store-footer { background: #111827; color: #9ca3af; padding: 22px 16px 92px; margin-top: 14px; font-size: 12px; line-height: 1.9; }
.store-footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.store-footer h4 { color: #fff; font-size: 13px; margin: 0 0 8px; font-weight: 600; }
.store-footer a { color: #9ca3af; display: block; }
.store-footer .brand { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.store-footer .bar { border-top: 1px solid rgba(255,255,255,.08); margin-top: 16px; padding-top: 12px; font-size: 11px; color: #6b7280; }

.info-hero { background: linear-gradient(130deg, #111827, #1f2937); color: #fff; padding: 26px 18px; }
.info-hero h1 { margin: 0 0 8px; font-size: 22px; }
.info-hero p { margin: 0; font-size: 13px; opacity: .8; line-height: 1.7; }
.info-card { background: #fff; margin: 12px; border-radius: 12px; padding: 16px; }
.info-card h3 { margin: 0 0 12px; font-size: 16px; }
.info-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: #9ca3af; flex: 0 0 72px; }
.info-row .v { flex: 1; color: #1f2937; word-break: break-all; }
.info-p { margin: 0; font-size: 14px; line-height: 1.9; color: #374151; white-space: pre-wrap; }
.level-card { background: #fff; margin: 12px; border-radius: 12px; padding: 16px; border: 1px solid #eef0f3; }
.level-card.current { border-color: var(--primary); box-shadow: 0 6px 20px rgba(255,68,0,.10); }
.level-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.level-name { font-size: 17px; font-weight: 700; }
.level-badge { font-size: 11px; color: var(--primary); background: #fff1ec; border-radius: 10px; padding: 2px 8px; }
.level-meta { color: #6b7280; font-size: 12px; margin-top: 6px; }
.level-benefits { margin: 10px 0 0; padding-left: 18px; color: #4b5563; font-size: 13px; line-height: 1.9; }

.chat-fab { position: fixed; right: 16px; bottom: 76px; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; border: 0; box-shadow: 0 8px 20px rgba(255,68,0,.35); z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10px; cursor: pointer; }
.chat-fab .ico { font-size: 20px; line-height: 1; }
.chat-foot .chat-img { background: #f3f4f6; color: #374151; padding: 0 10px; border-radius: 8px; border: 0; height: 34px; font-size: 13px; cursor: pointer; }
.chat-panel { position: fixed; right: 16px; bottom: 140px; width: 320px; max-width: calc(100vw - 32px); height: 440px; max-height: 72vh; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22); z-index: 61; display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-head { background: #111827; color: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.chat-head .sub { font-size: 11px; opacity: .7; margin-top: 2px; }
.chat-head button { background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; background: #f7f8fa; }
.chat-msg { display: flex; margin-bottom: 10px; }
.chat-msg .bubble { max-width: 78%; padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.6; background: #fff; color: #1f2937; border: 1px solid #eef0f3; }
.chat-msg.buyer { justify-content: flex-end; }
.chat-msg.buyer .bubble { background: var(--primary); color: #fff; border-color: transparent; }
.chat-msg.sys { justify-content: center; }
.chat-msg.sys .bubble { background: transparent; border: 0; color: #9ca3af; font-size: 11px; }
.chat-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-foot input { flex: 1; border: 1px solid var(--line); border-radius: 18px; padding: 9px 13px; font-size: 13px; outline: none; }
.chat-foot button { border: 0; background: var(--primary); color: #fff; border-radius: 18px; padding: 0 16px; font-size: 13px; cursor: pointer; }
@media (min-width: 900px) {
  .chat-fab { bottom: 28px; right: 28px; }
  .chat-panel { bottom: 92px; right: 28px; }
}

/* H5 轮播（装修 banner 多图） */
.h5-carousel { position: relative; overflow: hidden; }
.h5-carousel-track { display: flex; transition: transform .45s ease; }
.h5-slide { flex: 0 0 100%; }
.h5-slide img { width: 100%; display: block; }
.h5-banner { position: relative; }
.h5-slide { position: relative; }
.h5-banner-btn { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 16px; background: rgba(17,24,39,.62); color: #fff; font-size: 13px; line-height: 1; text-decoration: none; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.h5-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.h5-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .2s, background .2s; }
.h5-dots span.active { width: 16px; border-radius: 3px; background: #fff; }

/* ---- RTL / 维吾尔语 · 藏语字体 ---- */
[dir="rtl"] body { font-family: "Microsoft Uighur", "Segoe UI", Tahoma, sans-serif; }
[lang="bo"] body { font-family: "Microsoft Himalaya", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] .header .title { direction: rtl; }
[dir="rtl"] .header a.muted { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .pc-crumb { direction: rtl; }
[dir="rtl"] .pc-search input { text-align: right; }
[dir="rtl"] .pc-carousel .copy { text-align: right; }
[dir="rtl"] .pc-carousel .veil { background: linear-gradient(270deg, rgba(17,24,39,.72) 0%, rgba(17,24,39,.35) 52%, rgba(17,24,39,.05) 100%); }