/* ==========================================================================
   月映金沙 · 社区商家服务平台 —— 前端框架样式
   仅用于初版框架预览，商家数据均为示例占位数据
   ========================================================================== */

:root {
  --primary: #166f74;
  --primary-600: #0f565a;
  --primary-soft: #e6f1f1;
  --accent: #1a8f95;
  --accent-soft: #e1f2f2;
  --bg: #f5f3f0;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --text: #29251f;
  --muted: #6c6660;
  --border: #e8e2da;
  --green: #2e9e63;
  --red: #d9534f;
  --shadow: 0 1px 2px rgba(45, 34, 20, 0.04), 0 10px 28px rgba(45, 34, 20, 0.07);
  --shadow-sm: 0 1px 2px rgba(45, 34, 20, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 14px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

.container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size:14px;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #24a0a8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1;
  margin-top: 2px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.anon-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size:14px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.anon-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.anon-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
}
.btn-primary:active {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(1px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #14787d;
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.btn-ghost:active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(1px);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
}
.btn-soft:hover {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
}
.btn-soft:active {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
  transform: translateY(1px);
}

/* 购物车卡片底部操作：固定两列、同一基线、紧凑触控高度。 */
#favGrid .activity-card > .fav-bottom {
  margin-top: auto;
}
#favGrid .bj-cart-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  margin-top: 6px;
}
#favGrid .bj-cart-delete-form {
  display: flex;
  width: 100%;
  height: 30px;
  margin: 0 !important;
}
#favGrid .bj-cart-action,
#favGrid .bj-cart-delete-form > .bj-cart-action {
  box-sizing: border-box;
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 0;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 20px;
}

.btn-sm {
  padding: 6px 11px;
  font-size:14px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 48px 0 72px;
  background: #0f565a;
  background-image: linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.58)),
    url("../assets/background.jpg");
  background-size: cover;
  background-position: center;
}

.hero h1,
.hero p {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.3;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size:14px;
}

.searchbar {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  max-width: 720px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.searchbar input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  font-size:14px;
  color: var(--text);
  min-width: 0;
}

.searchbar .btn {
  border-radius: 9px;
  padding: 10px 22px;
}

.quick-cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.quick-cats::-webkit-scrollbar {
  display: none;
}

.quick-cats a {
  flex: 0 0 auto;
}

.quick-cats a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size:14px;
}

.quick-cats a:hover {
  background: rgba(255, 255, 255, 0.24);
}

.quick-cats .quick-more {
  flex: 0 0 auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.quick-cats .quick-more:hover {
  background: rgba(255, 255, 255, 0.24);
}

.quick-cats a.quick-more-item {
  display: none;
}

.quick-cats.expanded a.quick-more-item {
  display: inline-block;
}

/* ---------- 区块标题 ---------- */
.section {
  padding: 8px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-head h2 {
  margin: 0;
  font-size:14px;
}

.section-head .more {
  font-size:14px;
  color: var(--muted);
}

.section-head .more:hover {
  color: var(--primary);
}

.muted {
  color: var(--muted);
}

.sub {
  font-size:14px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 4px 10px rgba(45, 34, 20, 0.06), 4px 10px 24px rgba(45, 34, 20, 0.07);
}

.grid {
  display: grid;
  gap: 8px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.recommend-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid > * {
  min-width: 0;
}

/* ---------- 线上比价：平台图标 ---------- */
.plat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  border-radius: 50%;
  width: 26px;
  height: 26px;
}
.plat-ico.taobao {
  background: linear-gradient(135deg, #ff8f2e, #ff5000);
}
.plat-ico.tmall {
  border-radius: 8px;
  width: 36px;
  font-size: 12px;
  background: linear-gradient(135deg, #ff4444, #c40000);
}
.plat-ico.jd {
  border-radius: 8px;
  width: 36px;
  font-size: 12px;
  background: linear-gradient(135deg, #e1251b, #a80d02);
}
.plat-ico.manual {
  border-radius: 8px;
  width: 36px;
  font-size: 12px;
  background: linear-gradient(135deg, #5aa9a2, #2e7d76);
}

/* ---------- 线上比价：搜索结果与收藏卡片 ---------- */
.fav-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fav-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 6px;
  user-select: none;
}
.fav-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}
.curve-card {
  display: none;
  padding: 10px;
}
.curve-card.open {
  display: block;
}
.curve-card svg {
  width: 100%;
  height: auto;
  display: block;
}

/* 收藏卡底部：左侧历史价格+按钮，右侧迷你价格曲线 */
.fav-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
  align-items: stretch;
}
.fav-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fav-curve {
  width: 100%;
  flex: 0 0 auto;
  min-height: 80px;
  cursor: pointer;
}
.fav-curve svg {
  display: block;
  width: 100%;
  height: auto;
}
.fav-bottom.expanded {
  flex-direction: column;
}
.fav-bottom.expanded .fav-curve {
  width: 100%;
  min-height: 170px;
}

/* 卡片等高校对齐：搜索卡片与收藏卡片在网格行内底部对齐 */
.fav-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fav-cell > .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fav-cell > .card form[method="post"] {
  margin-top: auto;
}
.fav-cell > .card form[method="post"] > button,
.fav-cell > .card > form[method="post"] {
  margin-top: 8px;
}

/* 商品卡“搜同款”：悬停卡片时在图片底部出现（触屏设备常显） */
.bj-similar-overlay {
  display: none;
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  z-index: 5;
}
.card:hover .bj-similar-overlay {
  display: block;
}
.bj-similar-overlay a {
  display: block;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-align: center;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.bj-similar-overlay a:hover {
  background: rgba(0, 0, 0, 0.75);
}
@media (hover: none) {
  .bj-similar-overlay {
    display: block;
  }
}

.merge-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.merge-mask.open {
  display: flex;
}
.merge-panel {
  background: var(--surface);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 76vh;
  overflow: auto;
  padding: 14px;
}
.merge-panel .merge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 13px;
}
.merge-panel .merge-item:last-child {
  border-bottom: 0;
}

/* ---------- 分页条 ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 6px;
}

.pager-info {
  font-size:14px;
  color: var(--muted);
  margin-right: 4px;
}

.pager-btn {
  min-width: 36px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size:14px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pager-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pager-btn.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.pager-btn.disabled {
  color: #bbb;
  background: #f7f5f2;
  cursor: not-allowed;
}

.pager-ellipsis {
  color: var(--muted);
  padding: 0 2px;
}

/* ---------- 移动端导航开关 ---------- */
.nav-toggle {
  display: none;
}

.nav-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 10px 14px 14px;
  z-index: 80;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 图片画廊：封面大图 + 一行可滑动缩略图 ---------- */
.img-gallery {
  margin-bottom: 12px;
}

.gallery-main {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #f2efec;
  aspect-ratio: 16 / 9;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
  padding: 2px 1px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.gallery-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #fff;
  flex: 0 0 auto;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

/* ---------- 商家卡片 ---------- */
.merchant-card {
  padding:9px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
  overflow-wrap: anywhere;
}

.merchant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.merchant-top {
  display: flex;
  gap: 12px;
}

.merchant-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size:14px;
  background: linear-gradient(135deg, #5b7a9d, #8fb3d9);
}

.merchant-name {
  font-weight: 700;
  font-size:14px;
  margin: 0;
}

.merchant-cat {
  font-size: 12px;
  color: var(--muted);
}

.rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.stars {
  position: relative;
  display: inline-block;
  font-size: 14px;
  line-height: 1;
}

.stars::before {
  content: "★★★★★";
  color: #d8d2ca;
  letter-spacing: 1px;
}

.stars::after {
  content: "★★★★★";
  color: #f0a13c;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  width: calc(var(--rating) / 5 * 100%);
  letter-spacing: 1px;
  white-space: nowrap;
}

.rating-num {
  font-weight: 700;
  color: var(--text);
}

.merchant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.tag-teal {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}

.tag-orange {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 5.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 999px;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
}

.vip-gold {
  color: #7a5200;
  background: linear-gradient(135deg, #ffe9a8, #f7c948);
  border: 1px solid #e0b13c;
  box-shadow: 0 1px 4px rgba(214, 158, 32, 0.35);
}

.vip-gray {
  color: #8a8a8a;
  background: #e9e9e9;
  border: 1px solid #d5d5d5;
  cursor: default;
}

.merchant-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.price {
  font-size: 14px;
  color: var(--text);
}

.price strong {
  color: var(--accent);
  font-size:14px;
}

.contact-count {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 榜单 ---------- */
.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 7px;
}

.rank-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  line-height: 0;
}

.rank-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  padding: 3px;
}

.rank-icon-avatar {
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border);
}

.rank-no {
  position: absolute;
  top: -7px;
  left: -7px;
  z-index: 3;
  min-width: 15px;
  height: 20px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 9px;
  color: #fff;
  background: #8a8a8a;
  border-radius: 4px 4px 6px 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}

.rank-1 .rank-no {
  background: #f5c542;
  color: #7a5b00;
}

.rank-2 .rank-no {
  background: #c9d3dc;
  color: #4a5866;
}

.rank-3 .rank-no {
  background: #e2b48a;
  color: #7a4a20;
}

/* 推广置顶日历（后台与业主前台共用） */
.pin-cal-dow {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}
.pin-cal-cell {
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
}
.pin-cal-cell.empty {
  background: transparent;
  border-color: transparent;
}
.pin-cal-cell.today {
  outline: 2px solid var(--primary);
}
.pin-cal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 3px;
}
.cal-wx {
  font-size: 10px;
  padding: 0 5px;
  line-height: 1.6;
}
.pin-cal-day {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}
.pin-cal-date-action {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 4px;
  background: transparent;
  cursor: pointer;
}
.pin-cal-date-action:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-600);
}
.pin-cal-date-action:active {
  background: var(--primary);
  border-color: var(--primary-600);
  color: #fff;
  transform: translateY(1px);
}
.pin-cal-merchant {
  font-size: 11px;
  line-height: 1.4;
  border-radius: 5px;
  padding: 1px 4px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}
.pin-cal-merchant.pending {
  background: transparent;
  color: #000;
}
.pin-cal-merchant.active {
  background: transparent;
  color: #000;
}
.pin-cal-merchant a {
  color: inherit;
  text-decoration: none;
}
.pin-cal-merchant a:hover {
  color: var(--primary);
  text-decoration: underline;
}
@media (max-width: 768px) {
  .front-promo-calendar .front-promo-calendar-scroll {
    overflow-x: visible !important;
    padding: 7px !important;
  }
  .front-promo-calendar .front-promo-calendar-grid {
    min-width: 0 !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }
  .front-promo-calendar .pin-cal-dow {
    font-size: 10px;
    padding: 2px 0;
  }
  .front-promo-calendar .front-promo-calendar-cell {
    min-width: 0;
    min-height: 48px;
    border-radius: 6px;
    padding: 3px 2px;
  }
  .front-promo-calendar .pin-cal-head {
    justify-content: center;
    margin-bottom: 2px;
  }
  .front-promo-calendar .pin-cal-day {
    font-size: 11px;
    margin: 0;
  }
  .front-promo-calendar .pin-cal-merchant {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 0 1px;
    font-size: 9px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .front-promo-calendar .pin-cal-merchant a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .front-promo-calendar .pin-cal-merchant a:active {
    color: var(--primary-600);
    transform: translateY(1px);
  }
}

.pin-row-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 2px 0 6px;
}

.rank-scroll {
  max-height: 380px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  scrollbar-width: thin;
}

.store-hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 1px 6px;
  scrollbar-width: thin;
}
.store-hscroll .card {
  flex: 0 0 280px;
  width: 280px;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .store-hscroll .card {
    flex: 0 0 240px;
    width: 240px;
  }
  .rank-scroll {
    max-height: 320px;
  }
}

.rank-main {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-weight: 600;
  font-size: 14px;
}

.rank-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 活动卡片 ---------- */
.activity-card {
  padding:9px;
  min-width: 0;
  overflow-wrap: anywhere;
  overflow: hidden;
}
.activity-card > .media-gallery:first-child,
.activity-card > .bj-card-media:first-child {
  margin: -9px -9px 8px;
}
.activity-card > .media-gallery:first-child .media-main,
.activity-card > .img-gallery:first-child .gallery-main,
.activity-card > .bj-card-media:first-child img {
  border-radius: 10px 10px 0 0 !important;
}
.activity-card strong[style*="color:var(--red)"],
.activity-card span[style*="color:var(--red)"] {
  font-size: 12px;
}

.activity-title {
  font-weight: 700;
  margin: 0 0 8px;
}

.activity-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 7px;
}

/* ---------- 页面标题条 ---------- */
.page-head {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding:11px 0;
}

.page-head h1 {
  margin: 0;
  font-size:14px;
}

.page-head .sub {
  margin-top: 4px;
}

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
  gap: 8px;
  padding: 14px;
  margin: 18px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size:14px;
  cursor: pointer;
  flex: 0 0 auto;
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- 表单 ---------- */
.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size:14px;
  font-weight: 600;
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 111, 116, 0.12);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size:14px;
  color: var(--muted);
}

/* ---------- 对比表 ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--surface-2);
  font-size: 14px;
}

.compare-table td:first-child {
  color: var(--muted);
  font-size:14px;
  width: 140px;
}

/* ---------- 评价 ---------- */
.review {
  padding: 16px;
  display: flex;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.review-body {
  flex: 1;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.review-user {
  font-weight: 600;
  font-size: 14px;
}

.review-time {
  font-size: 12px;
  color: var(--muted);
}

.review-text {
  font-size: 14px;
  margin: 0;
}

/* ---------- 登录/表单页 ---------- */
.auth-wrap {
  max-width: 420px;
  margin: 40px auto;
  padding:14px;
}

.auth-wrap h1 {
  margin: 0 0 6px;
  font-size:14px;
}

.auth-note {
  font-size:14px;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
}

/* ---------- 后台 ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding:12px 0;
}

.admin-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.admin-side a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.admin-side a:hover,
.admin-side a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-badge {
  color: var(--red);
  font-weight: 700;
}

.admin-nav-group {
  margin-top: 6px;
}

.admin-nav-group:first-child {
  margin-top: 0;
}

.admin-nav-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .5px;
}

.admin-nav-group-title:hover {
  background: var(--primary-soft);
}

.admin-nav-group-title .nav-badge {
  margin-left: auto;
}

.admin-nav-group-arrow {
  font-size: 12px;
  color: var(--muted);
  width: 14px;
  flex: 0 0 auto;
}

.admin-nav-group-items a {
  padding-left: 24px;
}

.admin-main {
  min-width: 0;
}

.admin-card-collapse-bar {
  display: flex;
  justify-content: flex-end;
  padding: 2px 2px 0;
}

.admin-card-collapse-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.admin-card-collapse-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  padding:9px;
}

.stat-label {
  font-size:14px;
  color: var(--muted);
}

.stat-value {
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
}

.stat-link {
  display: block;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-link:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat-value small {
  font-size:14px;
  font-weight: 500;
  color: var(--muted);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size:14px;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
}

/* 附件上传：预览 / 删除 / 拖动排序 */
.att-item {
  position: relative;
  width: 90px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 10px;
  margin-bottom: 10px;
  vertical-align: top;
}
.att-item.dragging {
  opacity: 0.45;
}
.att-item.drag-over {
  outline: 2px dashed var(--primary);
  outline-offset: -1px;
}
.att-item .att-inner {
  position: relative;
  width: 90px;
  height: 90px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.att-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.att-item .att-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
.att-chip {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  padding: 4px;
  text-align: center;
  max-height: 100%;
  overflow: hidden;
}

/* 短视频播放区 */
.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.video-player {
  width: 100%;
  max-height: 420px;
  background: #111;
  border-radius: var(--radius-sm);
  display: block;
  object-fit: contain;
}

/* 图片 + 短视频混合画廊：同一大框 + 同一行缩略图 */
.media-gallery {
  margin-bottom: 12px;
}
.media-main {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
}
.media-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-main-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}
.media-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
  padding: 2px 1px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery-thumb-video {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #fff;
  flex: 0 0 auto;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.gallery-thumb-video::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.gallery-thumb-video:hover {
  opacity: 1;
}
.gallery-thumb-video.active {
  border-color: var(--primary);
  opacity: 1;
}

/* 图片大图与短视频同一行展示 */
.media-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  align-items: start;
}
.media-col {
  min-width: 0;
}
.media-col .img-gallery {
  margin-bottom: 0;
}
.media-col .video-gallery {
  grid-template-columns: 1fr;
}
.media-col .video-player {
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: cover;
}
.att-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: #d9534f;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.att-drag {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  cursor: grab;
  line-height: 1;
  user-select: none;
}

/* 后台表格优先横向排版，列宽不足时整表横向滚动，避免一列一字的竖排 */
.admin-main .table {
  min-width: 900px;
}
.admin-main .table th,
.admin-main .table td {
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 30px 0;
  margin-top: 20px;
  color: var(--muted);
  font-size:14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
}

/* ---------- 提示气泡 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #29251f;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size:14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
}

/* ---------- 占位图 ---------- */
.thumb {
  border-radius: 10px;
  background: linear-gradient(135deg, #e7eef0, #d8e3e6);
  display: grid;
  place-items: center;
  color: #7c9aa0;
  font-size:14px;
  min-height: 120px;
}

.avatar-placeholder {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .container {
    padding: 0 18px;
  }

  .grid-5 {
    grid-template-columns: repeat(4, 1fr);
  }

  .recommend-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }

  .recommend-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .admin-side a {
    white-space: nowrap;
  }
}

/* 管理后台移动端：侧边栏收进顶部下拉菜单 */
@media (max-width: 900px) {
  .admin-topbar .admin-nav-toggle {
    display: inline-flex;
  }

  .admin-topbar .nav-dropdown.open {
    display: block;
  }

  .admin-topbar .topbar-actions > .muted {
    display: none;
  }

  .admin-side {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 7px;
  }

  /* 顶部导航：品牌 + 导航按钮 + 操作一排，导航链接收进下拉 */
  .topbar-inner {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size:14px;
  }

  .brand small {
    display: none;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 11px;
    font-size:14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
  }

  .nav-toggle .bar {
    display: inline-block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  }

  .nav-dropdown.open {
    display: block;
  }

  .nav-dropdown a {
    display: block;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown a:last-child {
    border-bottom: 0;
  }

  .nav-dropdown a:hover,
  .nav-dropdown a.active {
    background: var(--primary-soft);
    color: var(--primary);
  }

  .admin-topbar .nav-dropdown .admin-nav-group-title {
    margin: 6px 0 0;
    padding: 10px 12px 4px;
    font-size: 15px;
  }

  .admin-topbar .nav-dropdown .admin-nav-group-items {
    padding-left: 6px;
  }

  .topbar-actions {
    margin-left: 0;
    gap: 6px;
  }

  .topbar-actions > .muted {
    display: none;
  }

  .topbar-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding:14px 0 44px;
  }

  .hero p {
    font-size: 14px;
  }

  .searchbar {
    flex-wrap: wrap;
  }

  .searchbar form {
    flex-wrap: wrap;
  }

  .searchbar input {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .searchbar .btn {
    flex: 1 1 100%;
  }

  .quick-cats a {
    font-size: 12px;
    padding: 5px 10px;
  }

  .section {
    padding:12px 0;
  }

  .section-head h2 {
    font-size:14px;
  }

  .merchant-card {
    padding: 7px;
  }

  .merchant-logo {
    width: 48px;
    height: 48px;
    font-size:14px;
  }

  .merchant-name {
    font-size:14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat {
    padding: 7px;
  }

  .stat-value {
    font-size:14px;
  }

  .auth-wrap {
    margin: 24px auto;
    padding:10px;
  }

  .page-head {
    padding:9px 0;
  }

  .page-head h1 {
    font-size: 14px;
  }

  .tab-bar [data-tab] {
    padding: 9px 12px;
    font-size:14px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- 标签页 ---------- */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab-bar [data-tab] {
  border: 0;
  background: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-bar [data-tab].active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

[data-panel] {
  display: none;
}

[data-panel].active {
  display: block;
}

/* ---------- 统一登录中心布局 ---------- */
.login-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  max-width: 780px;
  margin: 36px auto;
  overflow: hidden;
}

.login-roles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.login-roles-title {
  padding: 2px 16px 8px;
  font-size:14px;
  font-weight: 700;
  color: var(--muted);
}

.login-role {
  display: block;
  padding: 13px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-size:14px;
  font-weight: 600;
}

.login-role:hover {
  background: var(--surface);
}

.login-role.active {
  background: var(--primary);
  color: #fff;
}

.login-main {
  min-width: 0;
  padding: 11px 12px;
}

@media (max-width: 640px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-roles {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px;
  }

  .login-role {
    white-space: nowrap;
    padding: 10px 14px;
  }
}

/* ==========================================================================
   移动端适配升级（断点 768px）
   ========================================================================== */

/* 移动端可点击控件的最小点击热区 */
@media (max-width: 768px) {
  .btn,
  .filter-chip,
  .pager-btn,
  .nav-dropdown a,
  .mobile-tabbar a,
  .rank-info-btn {
    min-height: 44px;
  }

  .btn {
    display: inline-flex;
    align-items: center;
  }
}

/* 移动端专属显示 / 桌面端专属显示 */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: inline-flex;
  }
}

/* 首页 Banner：移动端压缩高度与字号 */
@media (max-width: 768px) {
  .hero {
    display: flex;
    align-items: center;
    padding: 16px 0 22px;
    min-height: 150px;
  }

  .hero h1 {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .hero p {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .searchbar {
    flex-wrap: nowrap;
    padding: 6px;
    width: 100%;
    max-width: 100%;
  }

  .searchbar form {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }

  .searchbar input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 14px;
  }

  .searchbar .btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size:14px;
  }

  /* 分类标签：移动端间距微调（单行横滑规则已全局生效） */
  .quick-cats {
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
  }
}

/* 超窄屏：搜索框与按钮保持同一行，输入框可收缩、按钮不换行 */
@media (max-width: 480px) {
  .searchbar {
    flex-wrap: nowrap;
  }

  .searchbar form {
    flex-wrap: nowrap;
  }

  .searchbar input {
    flex: 1;
    min-width: 0;
  }

  .searchbar .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 10px;
  }
}

/* 优质商家榜：移动端单列堆叠，排名说明折叠进弹窗 */
.rank-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.rank-explain {
  display: none;
}

.rank-section .grid-2 {
  grid-template-columns: 1fr;
}

.rank-section .rank-list {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .rank-section .rank-list {
    grid-template-columns: 1fr;
  }
}

/* 商家卡片：移动端紧凑化 + 快速呼叫按钮 */
@media (max-width: 768px) {
  .quick-tel {
    min-width: 44px;
    justify-content: center;
  }

  .quick-tel .tel-text {
    display: none;
  }
}

@media (max-width: 768px) {
  .merchant-card {
    padding: 13px;
    gap: 9px;
  }

  .merchant-logo {
    width: 44px;
    height: 44px;
    font-size:14px;
    border-radius: 10px;
  }

  .merchant-name {
    font-size: 14px;
  }
}

/* ---------- 移动端底部 Tabbar ---------- */
.mobile-tabbar {
  display: none;
}

@media (max-width: 768px) {
  body.has-tabbar {
    padding-bottom: 66px;
  }

body.has-tabbar .topbar-actions,
body.has-tabbar .nav,
body.has-tabbar .nav-toggle {
  display: none !important;
}
body.front-has-tabbar,
body.merchant-has-tabbar {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.front-has-tabbar main,
body.merchant-has-tabbar main {
  flex: 1 0 auto;
  width: 100%;
}

  .mobile-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(45, 34, 20, 0.06);
    z-index: 90;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-tabbar a.active {
    color: var(--primary);
    font-weight: 700;
  }

.mobile-tabbar .tab-icon {
  font-size:14px;
  line-height: 1;
}

/* 线上比价移动端：筛选按钮与卡片操作按钮更紧凑、字号缩小 */
@media (max-width: 768px) {
  #bjFilterForm {
    gap: 4px;
  }
  #bjFilterForm .btn {
    font-size: 11px !important;
    padding: 3px 7px !important;
  }
  .grid {
    gap: 4px;
  }
  #bjSearchResults .activity-card .btn,
  #favGrid .activity-card .btn,
  #bjFilterForm .btn {
    min-height: 0;
    line-height: 1.2;
  }
  #bjSearchResults .activity-card .btn,
  #favGrid .activity-card .btn {
    font-size: 11px !important;
  }
  #bjCompareModal h3 {
    font-size: 12px !important;
  }
  #bjCompareModal .table th,
  #bjCompareModal .table td {
    font-size: 10px !important;
    padding: 5px 4px !important;
  }
  #bjCompareModal .table th {
    font-size: 11px !important;
  }
  #bjCompareModal .btn {
    font-size: 10px !important;
    padding: 3px 5px !important;
  }
  #bjCompareModal .bj-compare-hint {
    font-size: 11px !important;
  }
#bjCompareModal .tag {
  font-size: 11px !important;
}
}

/* 页脚固定悬浮在视口底部：不随页面内容移动 */
.footer {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 80;
  padding: 10px 0;
  margin: 0;
}
body.front-has-tabbar main,
body.merchant-has-tabbar main {
  padding-bottom: 90px;
}
@media (max-width: 768px) {
  .footer {
    display: none !important;
  }
  body.has-tabbar .footer {
    bottom: 58px;
  }
  body.front-has-tabbar main,
  body.merchant-has-tabbar main {
    padding-bottom: 150px;
  }
}

/* 商家中心移动端：保留底部快速导航的同时，顶部“菜单/网页前台/退出”等入口继续可用 */
@media (max-width: 768px) {
  body.front-has-tabbar header.topbar {
    display: none !important;
  }
  body.merchant-has-tabbar .brand {
    display: none !important;
  }
  body.merchant-has-tabbar .topbar-actions,
  body.merchant-has-tabbar .nav-toggle {
    display: inline-flex !important;
  }
  body.admin-has-tabbar .topbar-actions,
  body.admin-has-tabbar .admin-nav-toggle {
    display: inline-flex !important;
  }
}

/* ---------- 首页置顶轮播 ---------- */
.banner-carousel {
  position: relative;
  border-radius: var(--radius);
}

.banner-slide {
  display: none;
}

.banner-slide.active {
  display: block;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfc9c1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.banner-dot.active {
  background: var(--primary);
}
}
