/* 优享乐商城 · H5 移动端样式
   独立于 PC 版 style.css：单列布局、底部 Tab、触控友好尺寸（最小点击区 44px） */

:root {
  --h5-primary: #0088cc;
  --h5-primary-soft: #f2f9fd;
  --h5-text: #1a1a1a;
  --h5-muted: #8a8a8a;
  --h5-line: #ececec;
  --h5-bg: #f5f7f9;
  --h5-tab-h: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body.h5 {
  margin: 0;
  padding-bottom: calc(var(--h5-tab-h) + env(safe-area-inset-bottom, 0px));
  background: var(--h5-bg);
  color: var(--h5-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.h5 a { color: inherit; text-decoration: none; }
body.h5 img { max-width: 100%; height: auto; display: block; }

/* 顶部栏 */
.h5-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 14px;
  background: #fff; border-bottom: 1px solid var(--h5-line);
}
.h5-top .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.h5-top .brand img { height: 26px; width: auto; }
.h5-top .brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--h5-primary); }
.h5-top .act { font-size: 13px; color: var(--h5-muted); }

/* 主视觉 */
.h5-hero {
  padding: 22px 16px 24px;
  background: linear-gradient(160deg, #0088cc, #046a9c);
  color: #fff;
}
.h5-hero h1 { margin: 0 0 8px; font-size: 21px; line-height: 1.45; font-weight: 600; }
.h5-hero p { margin: 0 0 16px; font-size: 13px; color: rgba(255,255,255,.86); }
.h5-hero .btns { display: flex; gap: 10px; }
.h5-hero .btns a {
  flex: 1; text-align: center; padding: 10px 0; border-radius: 6px;
  font-size: 14px; font-weight: 500;
}
.h5-hero .btns a.solid { background: #fff; color: var(--h5-primary); }
.h5-hero .btns a.ghost { border: 1px solid rgba(255,255,255,.7); color: #fff; }

/* 快捷入口 */
.h5-quick {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; background: #fff; padding: 16px 6px;
}
.h5-quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 0; font-size: 12px; color: #444; }
.h5-quick .ic {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--h5-primary-soft); color: var(--h5-primary);
  font-size: 19px; font-weight: 600;
}

/* 通用区块 */
.h5-sec { margin-top: 10px; background: #fff; }
.h5-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.h5-sec-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.h5-sec-head a { font-size: 12px; color: var(--h5-muted); }
.h5-list { padding: 0 16px 8px; }
.h5-card {
  display: block; padding: 13px 0; border-bottom: 1px solid var(--h5-line);
}
.h5-card:last-child { border-bottom: 0; }
.h5-card .t { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.h5-card .d { font-size: 12px; color: var(--h5-muted); line-height: 1.6; }
.h5-card .row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h5-card .price { color: #d4380d; font-weight: 600; font-size: 15px; white-space: nowrap; }

/* 公告 */
.h5-notice {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 10px 12px 0; padding: 11px 13px;
  background: #fff8e6; border: 1px solid #ffe2a8; border-radius: 8px;
  font-size: 12px; color: #8a6100; line-height: 1.6;
}
.h5-notice b { flex-shrink: 0; }

/* 底部 Tab */
.h5-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; height: calc(var(--h5-tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff; border-top: 1px solid var(--h5-line);
}
.h5-tab a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: #8a8a8a;
}
.h5-tab a .ic { font-size: 19px; line-height: 1; }
.h5-tab a.on { color: var(--h5-primary); }

.h5-foot { padding: 18px 16px 22px; text-align: center; font-size: 12px; color: var(--h5-muted); line-height: 1.9; }
.h5-foot a { color: var(--h5-primary); }

/* 窄屏微调 */
@media (max-width: 360px) {
  .h5-quick { grid-template-columns: repeat(4, 1fr); }
  .h5-hero h1 { font-size: 19px; }
}
