/* 一块玩 网页版 —— 干净直给：左大图右简介卡片、无装饰冗余 */
:root {
  --ink: #17233a;
  --sub: #6b7688;
  --line: #e6e9ef;
  --bg: #f5f6f8;
  --card: #ffffff;
  --brand: #14335f;
  --gold: #c9a44a;
  --danger: #c0392b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 顶栏 */
.topbar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-in {
  max-width: 1080px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 22px; height: 52px;
}
.logo { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { padding: 4px 12px; border-radius: 6px; font-size: 14px; color: rgba(255,255,255,.82); white-space: nowrap; }
.nav a.on { color: #fff; background: rgba(255,255,255,.14); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right .uname { font-size: 13px; color: rgba(255,255,255,.9); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-login {
  border: 1px solid rgba(255,255,255,.5); color: #fff; font-size: 13px;
  padding: 4px 14px; border-radius: 999px; cursor: pointer; background: transparent;
}
.btn-login:hover { background: rgba(255,255,255,.12); }

/* 主体 */
.view { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; min-height: 62vh; }
.loading { text-align: center; color: var(--sub); padding: 80px 0; }

/* 首页 */
.hero {
  background: linear-gradient(135deg, #14335f 0%, #1d4a86 100%);
  border-radius: 14px; color: #fff; padding: 34px 30px; margin-bottom: 18px;
}
.hero h1 { font-size: 24px; margin-bottom: 8px; }
.hero p { color: rgba(255,255,255,.82); font-size: 14px; max-width: 560px; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.entry {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; display: block; transition: box-shadow .15s;
}
.entry:hover { box-shadow: 0 6px 18px rgba(20,40,70,.08); }
.entry b { font-size: 16px; display: block; margin-bottom: 6px; }
.entry span { font-size: 13px; color: var(--sub); }

/* 卡片：左大图 + 右简介 */
.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer;
}
.card:hover { box-shadow: 0 6px 18px rgba(20,40,70,.08); }
.card .pic {
  width: 150px; height: 106px; border-radius: 8px; object-fit: cover; flex: none; background: #eef1f5;
}
.card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card .info h3 { font-size: 16px; line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .info .meta { font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.card .info .meta.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .info .row-bot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--danger); font-weight: 700; }
.price small { font-weight: 400; color: var(--sub); }
.tag { display: inline-block; font-size: 12px; color: var(--brand); background: #eaf0f9; border-radius: 4px; padding: 1px 7px; margin-right: 6px; }
.tag.gray { color: var(--sub); background: #f0f1f3; }

/* 详情页 */
.detail { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.detail .gallery { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; }
.detail .gallery img { height: 220px; border-radius: 8px; flex: none; object-fit: cover; }
.detail h2 { font-size: 20px; margin: 10px 0 6px; }
.detail .meta { color: var(--sub); font-size: 14px; margin: 4px 0; }
.detail .desc { margin-top: 14px; white-space: pre-wrap; word-break: break-word; color: #2c3850; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.spec { background: #f7f8fa; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.spec b { display: block; color: var(--sub); font-weight: 400; font-size: 12px; margin-bottom: 2px; }
.back { display: inline-block; margin-bottom: 12px; color: var(--sub); font-size: 14px; }

/* 表单 */
.form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 640px; }
.form h2 { font-size: 18px; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.btn {
  display: inline-block; border: none; border-radius: 8px; padding: 10px 26px;
  font-size: 15px; cursor: pointer; background: var(--brand); color: #fff;
}
.btn:hover { opacity: .92; }
.btn.gold { background: var(--gold); color: #fff; }
.btn.plain { background: #eef0f4; color: var(--ink); }
.btn.sm { padding: 6px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.imgs-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.imgs-pick .th { position: relative; width: 76px; height: 76px; }
.imgs-pick .th img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.imgs-pick .th i {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; font-style: normal; text-align: center; line-height: 20px;
  font-size: 12px; cursor: pointer;
}
.imgs-pick .add {
  width: 76px; height: 76px; border: 1px dashed #c4cbd6; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; color: var(--sub); cursor: pointer; font-size: 26px; background: #fafbfc;
}
.tips { background: #f7f8fa; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--sub); margin-bottom: 16px; }

/* 登录页 */
.login-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px; text-align: center; max-width: 420px; margin: 20px auto; }
.login-box h2 { margin-bottom: 8px; }
.login-box .sub { color: var(--sub); font-size: 13px; margin-bottom: 20px; }
.login-box img.qr { width: 230px; height: 230px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 10px; }
.login-state { font-size: 14px; color: var(--sub); margin-bottom: 16px; }
.login-state.ok { color: #1d8a4e; }

/* 分页 */
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.empty { text-align: center; color: var(--sub); padding: 60px 0; }
.sec-title { font-size: 17px; font-weight: 600; margin: 20px 0 12px; }

/* 商城分类标签（与小程序一致） */
.cate-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cate-tab {
  white-space: pre-line; text-align: center; font-size: 13px; line-height: 1.45;
  padding: 8px 16px; border-radius: 10px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.cate-tab:hover { border-color: var(--brand); }
.cate-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 页脚 */
.footer { text-align: center; color: #9aa3b2; font-size: 12px; padding: 26px 0 34px; line-height: 2; }
.footer a { color: #9aa3b2; text-decoration: underline; }

/* toast */
.toast {
  position: fixed; left: 50%; top: 68px; transform: translateX(-50%);
  background: rgba(23,35,58,.92); color: #fff; font-size: 14px;
  padding: 9px 20px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 99; max-width: 80vw;
}
.toast.show { opacity: 1; }

/* 我的页 */
.me-head {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.me-head img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #eef1f5; flex: none; }
.me-info { flex: 1; min-width: 0; }
.me-nick { font-size: 18px; font-weight: 600; }
.me-sub { font-size: 13px; color: var(--sub); margin-top: 2px; }
.me-stats {
  background: linear-gradient(135deg, #14335f, #1d4a86); color: #fff;
  border-radius: 14px; padding: 26px 22px; margin-bottom: 18px;
}
.stat-num { font-size: 40px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 4px; }
.stat-tip { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 14px; }
.log-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.log-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.log-item:last-child { border-bottom: none; }
.log-info { flex: 1; min-width: 0; }
.log-memo { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-time { font-size: 12px; color: var(--sub); margin-top: 2px; }
.log-points { font-weight: 700; font-size: 15px; flex: none; }
.log-points.plus { color: #1d8a4e; }
.log-points.minus { color: var(--danger); }

@media (max-width: 640px) {
  .topbar-in { gap: 10px; height: 48px; }
  .nav a { padding: 4px 8px; font-size: 13px; }
  .hero { padding: 24px 20px; }
  .card .pic { width: 116px; height: 88px; }
  .detail .gallery img { height: 160px; }
}
