/* ==========================================================================
   五金工具批发零售商城 —— 前台商城样式
   设计原则：简约清爽 / 移动优先 / 克制的工业蓝主色
   ========================================================================== */

:root {
  --brand: #1a6dd8;
  --brand-dark: #145ab3;
  --brand-soft: #eef5fd;
  --price: #e5484d;
  --ok: #16a34a;
  --ok-soft: #e8f7ee;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --danger: #dc2626;

  --text: #1f2937;
  --text-sub: #6b7280;
  --text-mute: #9ca3af;
  --line: #e8eaed;
  --line-soft: #f2f4f7;
  --bg: #f5f7fa;
  --card: #fff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 6px 22px rgba(16, 24, 40, .09);
  --maxw: 1200px;
}

* { box-sizing: border-box; }

body.shop-front {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* 注意：移动端底部导航是 position:fixed，仅在 ≤640px 时显示，
     因此留白也必须放在同一断点内，否则桌面端底部会出现多余空白。 */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------------- 顶部 ---------------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: baseline; gap: 7px; font-size: 19px; font-weight: 700; letter-spacing: .3px; flex-shrink: 0; }
.logo small { font-size: 10.5px; font-weight: 400; color: var(--text-mute); letter-spacing: 1px; text-transform: uppercase; }

.topbar .search { flex: 1; max-width: 460px; display: flex; gap: 0; }
.topbar .search input {
  flex: 1; border: 1px solid var(--line); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 8px 13px; font-size: 14px; font-family: inherit; background: #fafbfc; min-width: 0;
}
.topbar .search input:focus { outline: none; background: #fff; border-color: var(--brand); }
.topbar .search button {
  border: none; background: var(--brand); color: #fff; padding: 0 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-size: 14px; font-family: inherit;
}
.topbar .search button:hover { background: var(--brand-dark); }

.topbar .actions { display: flex; align-items: center; gap: 14px; font-size: 14px; margin-left: auto; }
.topbar .actions a { color: var(--text-sub); white-space: nowrap; }
.topbar .actions a:hover { color: var(--brand); }
.topbar .actions .cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -7px; right: -9px; background: var(--price); color: #fff;
  font-size: 11px; min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------------- 分类导航 ---------------- */
.catbar { background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.catbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  display: flex; gap: 2px; white-space: nowrap;
}
.catbar a {
  padding: 11px 15px; font-size: 14.5px; color: var(--text-sub);
  border-bottom: 2px solid transparent; transition: all .15s;
}
.catbar a:hover { color: var(--brand); }
.catbar a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------- 首页横幅 ---------------- */
.hero {
  background: linear-gradient(120deg, #1e3a5f 0%, #1a6dd8 100%);
  color: #fff; padding: 34px 0 30px; margin-bottom: 20px;
}
.hero .container { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero h1 { margin: 0 0 8px; font-size: 27px; letter-spacing: .5px; }
.hero p { margin: 0 0 16px; opacity: .88; font-size: 14.5px; max-width: 560px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stats .s .v { font-size: 21px; font-weight: 700; }
.hero-stats .s .k { font-size: 12.5px; opacity: .8; }
.hero-img { margin-left: auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); max-width: 300px; }
.hero-img img { width: 100%; height: 190px; object-fit: cover; }

/* ---------------- 卡片 / 区块 ---------------- */
.section { margin-bottom: 26px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .3px; }
.section-head h2 small { font-size: 13px; font-weight: 400; color: var(--text-mute); margin-left: 8px; }
.section-head .more { font-size: 13.5px; color: var(--text-sub); }
.section-head .more:hover { color: var(--brand); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* ---------------- 商品网格 ---------------- */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.goods {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
.goods:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.goods-img { position: relative; aspect-ratio: 4/3; background: #f2f4f7; overflow: hidden; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.goods:hover .goods-img img { transform: scale(1.04); }
.goods-img .flags { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; }
.flag { font-size: 11px; padding: 2px 8px; border-radius: 4px; color: #fff; background: var(--brand); }
.flag.hot { background: var(--price); }
.flag.off { background: var(--text-mute); }
.goods-body { padding: 12px 13px 13px; display: flex; flex-direction: column; flex: 1; }
.goods-title {
  font-size: 14.5px; font-weight: 550; line-height: 1.45; margin: 0 0 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px;
}
.goods-sub { font-size: 12.5px; color: var(--text-mute); margin: 0 0 9px; height: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-meta { display: flex; gap: 6px; margin-bottom: 9px; flex-wrap: wrap; }
.chip { font-size: 11.5px; padding: 1.5px 7px; background: var(--line-soft); color: var(--text-sub); border-radius: 4px; }
.goods-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.price-retail { color: var(--price); font-weight: 700; font-size: 20px; }
.price-retail small { font-size: 12px; font-weight: 400; }
.price-whole { font-size: 12.5px; color: var(--ok); background: var(--ok-soft); padding: 1px 7px; border-radius: 4px; }
.price-member { font-size: 12px; color: var(--brand); }
.goods-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stock-text { font-size: 12.5px; color: var(--text-mute); }
.stock-text.low { color: var(--warn); }
.stock-text.out { color: var(--danger); }
.goods-actions { display: flex; gap: 6px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 15px; border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: var(--radius-sm); font-size: 14px; cursor: pointer;
  transition: all .15s; white-space: nowrap; font-family: inherit; text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { opacity: .9; color: #fff; background: var(--ok); }
.btn-sm { padding: 4px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 11px 26px; font-size: 15.5px; }

/* ---------------- 表单 ---------------- */
input[type=text], input[type=password], input[type=number], input[type=tel],
select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d7dbe0; border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: inherit; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 109, 216, .12); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > label { font-size: 13.5px; color: var(--text-sub); font-weight: 500; }
.field > label .req { color: var(--danger); }
.field .hint { font-size: 12.5px; color: var(--text-mute); }
.err-msg { color: var(--danger); font-size: 12.5px; min-height: 17px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------------- 筛选条 ---------------- */
.filter-bar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input { width: auto; min-width: 140px; }
.filter-bar .count { margin-left: auto; color: var(--text-sub); font-size: 13.5px; }
.sort-tabs { display: flex; gap: 3px; }
.sort-tabs a { padding: 6px 13px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-sub); }
.sort-tabs a:hover { background: var(--line-soft); }
.sort-tabs a.active { background: var(--brand); color: #fff; }

/* ---------------- 标签 / 提示 ---------------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; background: var(--line-soft); color: var(--text-sub); white-space: nowrap; }
.tag-blue { background: var(--brand-soft); color: var(--brand-dark); }
.tag-green { background: var(--ok-soft); color: var(--ok); }
.tag-yellow { background: var(--warn-soft); color: var(--warn); }
.tag-red { background: #fdeaea; color: var(--danger); }
.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #cfe0f8; }
.alert-warn { background: var(--warn-soft); color: #92400e; border: 1px solid #fae0b0; }
.alert-danger { background: #fdeaea; color: var(--danger); border: 1px solid #f7c9c9; }
.empty { padding: 60px 20px; text-align: center; color: var(--text-mute); }
.muted { color: var(--text-sub); }
.mb { margin-bottom: 14px; }
.mt { margin-top: 14px; }
.right { text-align: right; }
.center { text-align: center; }
.money { color: var(--price); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- 商品详情 ---------------- */
.crumb { font-size: 13.5px; color: var(--text-mute); padding: 12px 0; }
.crumb a:hover { color: var(--brand); }

.detail { display: grid; grid-template-columns: 400px 1fr; gap: 30px; margin-bottom: 26px; }
.gallery { position: sticky; top: 74px; align-self: start; }
.gallery .main-img { aspect-ratio: 1; background: #f2f4f7; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs img { width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; }
.gallery .thumbs img.active { border-color: var(--brand); }

.detail-info h1 { margin: 0 0 8px; font-size: 23px; line-height: 1.4; font-weight: 650; }
.detail-sub { color: var(--text-sub); font-size: 14px; margin-bottom: 16px; }
.price-panel { background: linear-gradient(180deg, #f7f9fc, #f2f5f9); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.price-row { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-end; }
.price-item .k { font-size: 12.5px; color: var(--text-sub); display: block; }
.price-item .v { font-size: 24px; font-weight: 700; color: var(--price); font-variant-numeric: tabular-nums; }
.price-item .v.whole { color: var(--ok); font-size: 21px; }
.price-item .v.member { color: var(--brand); font-size: 21px; }

.spec-box { margin-bottom: 18px; }
.spec-box .k { font-size: 13.5px; color: var(--text-sub); margin-bottom: 8px; }
.spec-list { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-item { padding: 7px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; background: #fff; transition: all .15s; }
.spec-item:hover { border-color: var(--brand); }
.spec-item.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.spec-item.disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.qty { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 36px; height: 38px; border: none; background: #f7f8fa; cursor: pointer; font-size: 17px; color: var(--text-sub); font-family: inherit; }
.qty button:hover { background: var(--line-soft); }
.qty input { width: 52px; height: 38px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; border-radius: 0; padding: 0; }
.qty input:focus { box-shadow: none; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.spec-table th, .spec-table td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.spec-table th { background: #fafbfc; font-weight: 550; color: var(--text-sub); font-size: 13px; }

.detail-content { padding: 22px; line-height: 1.85; font-size: 14.5px; }
.detail-content p { margin: 0 0 12px; }
.detail-content img { border-radius: var(--radius-sm); margin: 10px 0; }

/* ---------------- 购物车 ---------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cart-table th { background: #fafbfc; font-size: 13px; color: var(--text-sub); font-weight: 550; text-align: left; }
.cart-goods { display: flex; gap: 12px; align-items: center; }
.cart-goods img { width: 66px; height: 66px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex-shrink: 0; }
.cart-goods .n { font-size: 14.5px; font-weight: 550; line-height: 1.45; }
.cart-goods .s { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }
.cart-table .price { color: var(--text); font-variant-numeric: tabular-nums; }
.cart-table .amount { color: var(--price); font-weight: 650; font-variant-numeric: tabular-nums; }
.cart-table input[type=number] { width: 68px; padding: 6px 8px; text-align: center; }
.remove-link { color: var(--text-mute); font-size: 13px; cursor: pointer; }
.remove-link:hover { color: var(--danger); }

.summary-box { position: sticky; top: 74px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 9px; padding-top: 13px; font-size: 17px; font-weight: 700; }
.summary-row.total .v { color: var(--price); font-variant-numeric: tabular-nums; }

/* ---------------- 订单 ---------------- */
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.order-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 18px; background: #fafbfc; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.order-head .no { font-family: monospace; color: var(--text-sub); }
.order-body { padding: 14px 18px; }
.order-line { display: flex; gap: 12px; padding: 9px 0; align-items: center; }
.order-line img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.order-line .n { flex: 1; font-size: 14px; line-height: 1.45; }
.order-line .s { font-size: 12.5px; color: var(--text-mute); }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 18px; border-top: 1px solid var(--line-soft); }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-soft); }
.tl-item .time { font-size: 12.5px; color: var(--text-mute); }
.tl-item .text { font-size: 14px; }

/* ---------------- 会员中心 ---------------- */
.profile-head { background: linear-gradient(120deg, #1e3a5f, #1a6dd8); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.profile-head .row1 { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 600; }
.profile-head h1 { margin: 0; font-size: 21px; }
.profile-head .lv { display: inline-block; background: rgba(255,255,255,.2); padding: 2px 11px; border-radius: 20px; font-size: 12.5px; margin-top: 5px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 20px; }
.stat-item { background: rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 13px 15px; }
.stat-item .v { font-size: 21px; font-weight: 700; }
.stat-item .k { font-size: 12.5px; opacity: .85; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-page { max-width: 410px; margin: 44px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 28px; }
.auth-card h1 { margin: 0 0 5px; font-size: 21px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-sub); font-size: 14px; margin-bottom: 24px; }
.auth-card .foot { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-sub); }
.auth-card .foot a { color: var(--brand); }

/* ---------------- 分页 ---------------- */
.pager { margin-top: 22px; display: flex; justify-content: center; }
/* ThinkPHP 分页输出类名为 .pagination，这里同时兼容 .ui-pagination */
.pager .pagination, .pager .ui-pagination { display: flex; gap: 5px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.pager .pagination li a, .pager .pagination li span,
.pager .ui-pagination li a, .pager .ui-pagination li span {
  display: block; min-width: 34px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text); background: #fff; text-align: center;
}
.pager .pagination li.active span, .pager .ui-pagination li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pagination li a:hover, .pager .ui-pagination li a:hover { border-color: var(--brand); color: var(--brand); }
/* 禁用态（首尾页箭头）弱化显示 */
.pager .pagination li.disabled span { color: var(--text-mute); background: #fafbfc; cursor: not-allowed; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #1f2937; color: #9ca3af; padding: 30px 0 20px; margin-top: 40px; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 22px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin: 0 0 12px; font-weight: 600; }
.site-footer a { color: #9ca3af; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-text { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 16px;
  font-size: 12.5px;
  /* 左右分列：左版权与备案，右条款链接 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.footer-bottom a { color: #9ca3af; }
.footer-bottom p { margin: 0; }
.footer-bottom .fb-info { flex: 0 0 auto; }
.footer-bottom .footer-terms { flex: 1 1 auto; }

/* 页脚条款链接：单行横向排列，窄屏自然换行但不塌成竖排 */
.footer-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 0;
}
.footer-terms a {
  font-size: 12.5px;
  color: #9ca3af;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 12px;
  line-height: 1.6;
  /* 用相邻选择器画分隔竖线，最后一个不带 */
  border-right: 1px solid #374151;
}
.footer-terms a:last-child { border-right: none; padding-right: 0; }
.footer-terms a:hover { color: var(--brand); }

@media (max-width: 760px) {
  /* 窄屏改为上下两行，避免挤在一起 */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-bottom .footer-terms { justify-content: flex-start; }
  .footer-terms a { padding: 0 10px 0 0; margin-right: 10px; border-right: none; }
  .footer-terms a:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: #4b5563;
  }
}

/* ---------------- 移动端底部导航 ---------------- */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line); padding: 7px 0;
}
.mobile-nav .inner { display: flex; }
.mobile-nav a { flex: 1; text-align: center; font-size: 11.5px; color: var(--text-sub); }
.mobile-nav .ic { font-size: 19px; display: block; line-height: 1.3; }
.mobile-nav a.active { color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .detail { grid-template-columns: 340px 1fr; gap: 22px; }
  .cart-layout { grid-template-columns: 1fr 290px; }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .gallery .main-img { aspect-ratio: 4/3; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-box { position: static; }
  .hero-img { margin-left: 0; max-width: 100%; }
  .hero-img img { height: 150px; }
}
@media (max-width: 640px) {
  /* 仅为固定底栏让位：底栏高约 60px */
  body.shop-front { padding-bottom: 60px; }
  .site-footer { margin-bottom: 0; padding-bottom: 16px; }
  .topbar .inner { flex-wrap: wrap; gap: 8px; padding: 9px 14px; }
  .logo { font-size: 16.5px; }
  .logo small { display: none; }
  /* flex:0 0 100% 而非 width:100% —— 否则会被 flex-shrink 压缩而无法换行 */
  .topbar .search { order: 3; flex: 0 0 100%; width: 100%; max-width: none; }
  .topbar .search button { padding: 0 16px; }
  .topbar .actions { gap: 12px; font-size: 13px; margin-left: auto; }
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 13.5px; }
  .hero-stats { gap: 20px; }
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .goods-title { font-size: 13.5px; min-height: 39px; }
  .goods-body { padding: 10px 11px 11px; }
  .price-retail { font-size: 17px; }
  .price-whole { font-size: 11.5px; }
  .goods-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .goods-actions .btn { flex: 1; padding: 6px 8px; font-size: 13px; }
  .detail-info h1 { font-size: 19px; }
  .price-item .v { font-size: 20px; }
  .filter-bar { padding: 12px; }
  .filter-bar select, .filter-bar input { min-width: 0; flex: 1; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
  .cart-table td { border: none; padding: 2px 0; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .cart-table td:nth-child(2) { grid-column: 1; }
  .form-row { grid-template-columns: 1fr; }
  .mobile-nav { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 17px; }
}
/* ================================================================
   多商户平台：店铺相关
   ================================================================ */

/* 首页筛选条里的店铺快捷入口 */
.filter-bar .store-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-sub);
  font-size: 13px;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: all .15s;
}
.filter-bar .store-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-bar .store-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

/* 商品卡上的店铺标签 */
.goods-meta .shop-tag {
  text-decoration: none;
  border: 1px solid var(--brand-soft);
  color: var(--brand);
  background: var(--brand-soft);
}
.goods-meta .shop-tag:hover { background: #dfeafb; }

/* 店铺列表卡片 */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.shop-card {
  display: block;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.shop-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(26, 109, 216, .10);
  transform: translateY(-2px);
}
.shop-head { display: flex; align-items: center; gap: 12px; }
.shop-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  background: var(--bg);
  flex-shrink: 0;
}
.shop-meta { min-width: 0; flex: 1; }
.shop-meta h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-type { margin: 5px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip.star { background: var(--warn-soft); color: var(--warn); }

.shop-scope {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}
.shop-intro {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-mute);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.shop-foot .goods-count { color: var(--text-mute); }
.shop-foot .go { color: var(--brand); font-weight: 500; }

/* 店铺搜索框 */
.shop-search { display: flex; gap: 8px; margin-left: auto; }
.shop-search input {
  width: 220px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}
.shop-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 109, 216, .12);
}
.shop-search button {
  padding: 7px 15px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
}
.shop-search button:hover { background: var(--brand-dark); }

/* 店铺主页头部 */
.shop-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 24px;
  margin-bottom: 20px;
}
.shop-hero-inner { display: flex; align-items: center; gap: 18px; }
.hero-logo {
  width: 72px; height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  background: var(--bg);
  flex-shrink: 0;
}
.hero-meta { min-width: 0; flex: 1; }
.hero-meta h1 { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.35; }
.hero-tags { margin: 9px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-scope { margin: 8px 0 0; font-size: 13.5px; color: var(--text-sub); line-height: 1.6; }
.hero-intro {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.8;
  white-space: pre-wrap;
}
.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-mute);
}

/* 商品详情页的店铺横条 */
.shop-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfd;
}
.sb-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  background: var(--bg);
  flex-shrink: 0;
}
.sb-meta { flex: 1; min-width: 0; }
.sb-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-name:hover { color: var(--brand); }
.sb-scope {
  display: block;
  font-size: 12.5px;
  color: var(--text-mute);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-tag { background: var(--ok-soft); color: var(--ok); }
.sb-btn { flex-shrink: 0; }

/* 首页入驻横幅 */
.join-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
  background: linear-gradient(120deg, #f2f7fe 0%, #eef5fd 100%);
}
.jb-text { min-width: 0; }
.jb-text strong { display: block; font-size: 15px; color: var(--text); line-height: 1.5; }
.jb-text span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-sub); line-height: 1.6; }
.jb-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* 窄屏适配 */
@media (max-width: 720px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-search { margin-left: 0; width: 100%; }
  .shop-search input { flex: 1; width: auto; }
  .filter-bar .store-chip { max-width: 130px; font-size: 12px; padding: 4px 10px; }
  .shop-hero { padding: 18px 16px; }
  .shop-hero-inner { gap: 12px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero-meta h1 { font-size: 18px; }
  .shop-bar { flex-wrap: wrap; }
  .sb-meta { width: 100%; order: 3; }
  .join-banner { flex-direction: column; align-items: flex-start; }
  .jb-actions { width: 100%; }
  .jb-actions .btn { flex: 1; }
}

/* 登录页底部的多端入口 */
.auth-card .foot-links {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}
.auth-card .foot-links a { color: var(--brand); text-decoration: none; }
.auth-card .foot-links a:hover { text-decoration: underline; }
.auth-card .foot-links .sep { margin: 0 8px; color: var(--line); }

/* ---------------- 注册页协议勾选 ---------------- */
.form-agree { margin: 4px 0 14px; }
.form-agree .agree-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-sub);
  cursor: pointer;
}
.form-agree input[type="checkbox"] {
  width: 15px; height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--brand);
}
.form-agree a { color: var(--brand); text-decoration: none; }
.form-agree a:hover { text-decoration: underline; }
