:root {
  --van-primary-color: #e93b3d;
  --van-danger-color: #e93b3d;
  --brand: #e93b3d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f5f5f5; }
#app { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }

.page { min-height: 100vh; padding-bottom: 60px; }

/* 顶部搜索 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #ff5345, #e93b3d);
  padding: 8px 12px; display: flex; align-items: center; gap: 10px;
}
.topbar .search {
  flex: 1; background: #fff; border-radius: 18px; height: 34px;
  display: flex; align-items: center; padding: 0 12px; color: #999; font-size: 14px;
}
.topbar .search input { flex: 1; border: none; outline: none; font-size: 14px; }
.topbar .text-btn { color: #fff; font-size: 14px; white-space: nowrap; }

/* 分类九宫格 */
.cat-grid { display: flex; flex-wrap: wrap; background: #fff; padding: 12px 6px; }
.cat-grid .cell { width: 20%; display: flex; flex-direction: column; align-items: center; margin-bottom: 12px; }
.cat-grid .cell .icon {
  width: 44px; height: 44px; border-radius: 50%; background: #ffe9e6; color: #e93b3d;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold;
}
.cat-grid .cell .name { font-size: 12px; color: #333; margin-top: 6px; }

/* 区块标题 */
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px; }
.section-title .main { font-size: 16px; font-weight: bold; color: #222; }
.section-title .main .badge { display: inline-block; background: var(--brand); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; }
.section-title .more { font-size: 12px; color: #999; }

/* 商品网格 */
.product-grid { display: flex; flex-wrap: wrap; padding: 0 8px; }
.product-grid .p-card { width: 50%; padding: 6px; }
.product-grid .p-card .box { background: #fff; border-radius: 8px; overflow: hidden; }
.product-grid .p-card .img { width: 100%; height: 170px; object-fit: cover; display: block; background: #f2f2f2; }
.product-grid .p-card .info { padding: 8px 10px 12px; }
.product-grid .p-card .name { font-size: 13px; color: #333; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-grid .p-card .price-row { display: flex; align-items: baseline; margin-top: 6px; }
.product-grid .p-card .price { color: #e93b3d; font-weight: bold; font-size: 16px; }
.product-grid .p-card .price small { font-size: 12px; }
.product-grid .p-card .sales { font-size: 11px; color: #999; margin-left: 6px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 52px; background: #fff;
  display: flex; border-top: 1px solid #eee; z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; font-size: 11px; }
.tabbar .item.active { color: #e93b3d; }
.tabbar .item .ico { font-size: 22px; line-height: 1; }

/* 备案号页脚 */
.icp-footer { text-align: center; padding: 16px 10px 10px; font-size: 12px; color: #aaa; }
.icp-footer a { color: #999; text-decoration: none; }
.login-page .icp-footer { margin-top: 24px; padding-bottom: 20px; }

/* 通用卡片 */
.card { background: #fff; border-radius: 8px; margin: 8px 12px; overflow: hidden; }

/* 详情页底栏 */
.detail-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff; height: 52px;
  display: flex; align-items: center; border-top: 1px solid #eee; z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.detail-bar .action { flex: 1; text-align: center; color: #555; font-size: 12px; }
.detail-bar .action .ico { font-size: 20px; display: block; }
.detail-bar .btn { width: 100px; height: 52px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.detail-bar .btn.cart { background: #ff9c00; }
.detail-bar .btn.buy { background: var(--brand); }

/* 轮播 banner 容器 */
.banner-wrap { padding: 10px 12px 0; }
.banner-wrap .van-swipe-item { padding: 0 4px; }
.banner-wrap .van-swipe-item img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; }

/* 登录页 */
.login-page { background: #fff; min-height: 100vh; }
.login-logo { text-align: center; padding: 50px 0 30px; }
.login-logo .name { font-size: 26px; font-weight: bold; color: #e93b3d; }
.login-logo .sub { color: #999; font-size: 13px; margin-top: 6px; }

/* 空状态 */
.empty { text-align: center; color: #999; padding: 60px 0; font-size: 14px; }

/* 生活圈 - 商家门店目录 */
.circle-page { background: #f5f5f5; }
.store-topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #ff5345, #e93b3d);
  padding: 10px 12px;
}
.store-topbar .addr-row { display: flex; align-items: center; justify-content: space-between; color: #fff; margin-bottom: 8px; }
.store-topbar .addr-row .addr { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: bold; }
.store-topbar .addr-row .reloc { display: flex; align-items: center; gap: 3px; font-size: 12px; opacity: .95; }
.store-topbar .store-search {
  background: #fff; border-radius: 18px; height: 34px;
  display: flex; align-items: center; padding: 0 4px 0 12px;
}
.store-topbar .store-search .ico { color: #999; font-size: 16px; }
.store-topbar .store-search input { flex: 1; border: none; outline: none; font-size: 13px; margin: 0 6px; }
.store-topbar .store-search .btn {
  color: #fff; background: var(--brand); font-size: 13px;
  padding: 6px 14px; border-radius: 14px;
}
.cat-swiper { background: #fff; }
.cat-grid-store { display: flex; flex-wrap: wrap; padding: 12px 6px 16px; }
.cat-grid-store .cell { width: 20%; display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.cat-grid-store .cell .icon {
  width: 44px; height: 44px; border-radius: 50%; background: #ffe9e6;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.cat-grid-store .cell .name { font-size: 11px; color: #333; margin-top: 5px; text-align: center; }
.cat-grid-store .cell.active .icon { background: var(--brand); }
.cat-grid-store .cell.active .name { color: var(--brand); font-weight: bold; }
.sort-tabs { display: flex; background: #fff; padding: 10px 12px; gap: 8px; border-top: 1px solid #f2f2f2; }
.sort-tabs .tab {
  flex: 1; text-align: center; font-size: 13px; color: #555;
  padding: 6px 0; border: 1px solid #eee; border-radius: 16px;
}
.sort-tabs .tab.active { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: bold; }
.store-card { display: flex; background: #fff; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.store-card:active { background: #fafafa; }
.store-card .thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: #f2f2f2; flex-shrink: 0; }
.store-card .info { flex: 1; margin-left: 10px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.store-card .row1 { display: flex; align-items: center; justify-content: space-between; }
.store-card .row1 .name { font-size: 15px; font-weight: bold; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card .row1 .biz { font-size: 11px; color: #999; flex-shrink: 0; margin-left: 6px; }
.store-card .row1 .biz.open { color: #07c160; }
.store-card .row2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 11px; color: #666; }
.store-card .row2 .pop { color: #ff7a18; }
.store-card .row2 .cat-tag { background: #f5f5f5; color: #555; padding: 1px 6px; border-radius: 8px; }
.store-card .row2 .disc { color: #e93b3d; }
.store-card .row3 { display: flex; align-items: center; margin-top: 6px; font-size: 12px; color: #999; }
.store-card .row3 .ico { font-size: 13px; margin-right: 2px; }
.store-card .row3 .addr { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-card .row3 .dist { color: var(--brand); font-weight: bold; flex-shrink: 0; margin-left: 6px; }
.addr-popup { padding: 14px 16px; }
.addr-popup .title { font-size: 16px; font-weight: bold; margin-bottom: 10px; }
.addr-popup .addr-item { display: flex; align-items: center; gap: 6px; padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; color: #333; }
.addr-popup .addr-item.on { color: var(--brand); font-weight: bold; }

/* 门店详情 */
.store-detail .biz-tag { font-size: 12px; color: #999; padding: 2px 8px; border-radius: 10px; background: #f5f5f5; }
.store-detail .biz-tag.open { color: #07c160; background: #e8f7ee; }
.store-detail .cat-tag { background: #f5f5f5; color: #555; padding: 2px 8px; border-radius: 8px; }


/* 物业 */
.prop-cell { background: #fff; padding: 14px 12px; border-bottom: 1px solid #f2f2f2; }
.prop-cell .title { font-size: 15px; color: #333; font-weight: bold; }
.prop-cell .desc { font-size: 13px; color: #666; margin-top: 6px; line-height: 1.5; }
.prop-cell .sub { font-size: 12px; color: #999; margin-top: 6px; }
.bill-amount { color: #e93b3d; font-weight: bold; font-size: 18px; }

/* 商品详情图文介绍 */
.detail-html { line-height: 1.7; color: #333; }
.detail-html h3 { font-size: 17px; margin: 2px 0 8px; color: #222; }
.detail-html h4 { font-size: 15px; margin: 16px 0 8px; color: #222; padding-left: 8px; border-left: 3px solid #e93b3d; }
.detail-html p { font-size: 13px; color: #666; margin: 6px 0; }
.detail-html img { width: 100%; display: block; margin: 8px 0; border-radius: 6px; background: #f2f2f2; }
.detail-html ul { padding-left: 18px; margin: 8px 0; }
.detail-html li { font-size: 13px; color: #555; margin: 4px 0; }
.detail-html table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.detail-html th, .detail-html td { border: 1px solid #eee; padding: 8px 10px; text-align: left; }
.detail-html th { background: #f7f7f7; color: #666; width: 90px; font-weight: normal; }
