/* ============================================================
   政采汇 · 832脱贫地区农副产品  在线版样式
   ============================================================ */
:root {
  --brand: #B3252B;
  --brand-deep: #8E1B20;
  --brand-soft: #FCEFF0;
  --gold: #C8901F;
  --gold-soft: #FDF6E6;
  --green: #2F7A4F;
  --green-soft: #EDF6F1;
  --ink: #1F2329;
  --ink-2: #4E5969;
  --ink-3: #86909C;
  --line: #EBEDF0;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(31, 35, 41, .06);
  --shadow-lg: 0 10px 40px rgba(31, 35, 41, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(100deg, #B3252B 0%, #A22026 50%, #8E1B20 100%);
  color: #fff;
  box-shadow: 0 2px 14px rgba(142, 27, 32, .28);
}
.topbar__inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 20px;
  display: flex; flex-direction: column;
}
/* 品牌行 */
.topbar__brandrow {
  height: 62px;
  display: flex; align-items: center; gap: 18px;
}
/* 菜单独立行 */
.topbar__navrow {
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 9px 0 11px;
  display: flex; align-items: center; justify-content: center;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800;
}
.brand__text { min-width: 0; }
.brand__title { font-size: 18px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.brand__sub { font-size: 11px; opacity: .8; letter-spacing: .5px; }
.topnav { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.topnav__item {
  padding: 8px 26px; border-radius: 999px;
  font-size: 13.5px; color: rgba(255,255,255,.86);
  transition: all .16s;
}
.topnav__item:hover { background: rgba(255,255,255,.14); color: #fff; }
.topnav__item--on { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.topnav__badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: #FFD466; color: #7A4A00; font-size: 11px; font-weight: 700;
  vertical-align: 1px;
}

/* ---------- 布局 ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px; }
.wrap--narrow { max-width: 1000px; }

.section { margin-top: 18px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.card__title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; }
.card__title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: var(--brand); margin-right: 9px;
}
.card__more { font-size: 12.5px; color: var(--ink-3); }
.card__more--link { color: var(--brand); cursor: pointer; }
.card__more--link:hover { text-decoration: underline; }
.card__bd { padding: 14px 20px 20px; }

/* ---------- 公司切换 ---------- */
.switchbar { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.switchbar__label {
  font-size: 11.5px; color: var(--ink-3); letter-spacing: 1px;
  padding: 14px 18px 8px;
}
.tabs { display: flex; gap: 10px; padding: 0 14px 14px; overflow-x: auto; }
.tabs::-webkit-scrollbar { height: 6px; }
.tabs::-webkit-scrollbar-thumb { background: #DDE1E6; border-radius: 3px; }
.tab {
  flex: 1 0 210px; min-width: 210px;
  padding: 12px 14px; border-radius: 12px;
  background: #F6F7F9; border: 2px solid transparent;
  cursor: pointer; transition: all .18s; text-align: left;
}
.tab:hover { background: #F0F2F5; }
.tab--on { background: var(--brand-soft); border-color: rgba(179,37,43,.36); }
.tab__name { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab__meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.tab--on .tab__name { color: var(--brand); }
.tab--on .tab__meta { color: rgba(179,37,43,.74); }

/* ---------- 公司信息 ---------- */
.co { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
@media (max-width: 860px) { .co { grid-template-columns: 1fr; } }

.co__card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.co__head {
  padding: 16px 20px 13px;
  background: linear-gradient(180deg, #FDF3F3, #fff);
}
/* 图标 + 名称：锁定排列，紧贴无多余空隙 */
.co__id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.co__mark {
  width: 38px; height: 38px; flex-shrink: 0; display: block;
  border-radius: 10px; object-fit: cover; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.07), 0 1px 3px rgba(17,24,39,.13);
}
.co__idtext { min-width: 0; }
.co__name { font-size: 17px; font-weight: 800; line-height: 1.4; }
.co__tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.co__grid { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 20px 14px; gap: 2px 16px; }
.co__cell { padding: 8px 0; border-bottom: 1px dashed #F0F2F5; }
.co__k { font-size: 11.5px; color: var(--ink-3); }
.co__v { font-size: 13.5px; font-weight: 500; margin-top: 2px; word-break: break-all; }
.co__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3); gap: 12px;
}
.co__foot span { word-break: break-all; }

/* 概览统计 */
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.stat__v { font-size: 26px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat__k { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat--dark { background: linear-gradient(140deg, #B3252B, #8E1B20); }
.stat--dark .stat__v { color: #fff; }
.stat--dark .stat__k { color: rgba(255,255,255,.78); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; font-size: 11px; line-height: 1.55;
  padding: 1px 8px; border-radius: 5px; white-space: nowrap;
}
.tag--brand { color: var(--brand); background: var(--brand-soft); }
.tag--gold { color: var(--gold); background: var(--gold-soft); }
.tag--green { color: var(--green); background: var(--green-soft); }
.tag--grey { color: var(--ink-2); background: #F2F3F5; }

/* ---------- 公司分类 ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat {
  text-align: left; padding: 14px 16px; border-radius: 12px;
  background: #F7F8FA; cursor: pointer; transition: all .16s;
  border: 1px solid transparent;
}
.cat:hover { background: var(--brand-soft); border-color: rgba(179,37,43,.2); transform: translateY(-1px); }
.cat__name { font-size: 13.5px; font-weight: 600; }
.cat__bar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cat__count { font-size: 11.5px; color: var(--ink-3); }
.cat__go { font-size: 11.5px; color: var(--brand); }
.cat--zero .cat__name { color: var(--ink-3); }
.cat--zero .cat__go { color: var(--ink-3); }

/* 层级公司分类卡片 */.cats { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cat--rich { cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.cat--rich.cat--on { background: var(--brand-soft); border-color: rgba(179,37,43,.36); }
.cat__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cat__row .cat__count { flex: none; color: var(--brand); font-weight: 600; }
.cat__kids { display: flex; flex-wrap: wrap; gap: 6px; }
.cat__kid {
  font-size: 11.5px; padding: 3px 8px; border-radius: 20px;
  background: #F5F6F8; border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; transition: all .15s;
}
.cat__kid i { font-style: normal; color: var(--ink-3); margin-left: 2px; }
.cat__kid:hover { border-color: rgba(179,37,43,.4); color: var(--brand); }
.cat__kid--on, .cat__kid--on i { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat__kid--more { cursor: default; background: transparent; border-style: dashed; color: var(--ink-3); }
.cat--rich .cat__bar { margin-top: auto; }

/* ---------- 产品分类 ---------- */
.ptree { display: flex; flex-direction: column; gap: 12px; }
.plevel1 { }
.plevel1__hd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; background: #F7F8FA;
}
.plevel1__name { font-size: 14px; font-weight: 700; }
.plevel1__count { font-size: 11.5px; color: var(--ink-3); }
.plevel2 { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 6px 4px; }
.pchip {
  padding: 6px 13px; border-radius: 8px; font-size: 12.5px;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid rgba(179,37,43,.14); cursor: pointer;
  transition: all .15s;
}
.pchip:hover { background: var(--brand); color: #fff; }
.pchip__n { font-size: 11px; opacity: .7; margin-left: 5px; }

/* ---------- 商品 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ---------- 商品分页（商品网格下方） ---------- */
.pager {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.pager__info { font-size: 12.5px; color: var(--ink-3); }
.pager__info b { color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager__ctrl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pgbtn {
  min-width: 34px; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 9px; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; font-variant-numeric: tabular-nums;
}
.pgbtn--wide { padding: 0 12px; }
.pgbtn:hover:not(:disabled) { border-color: rgba(179,37,43,.45); color: var(--brand); }
.pgbtn--on, .pgbtn--on:hover { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pgbtn:disabled { opacity: .42; cursor: not-allowed; }
.pgdots { color: var(--ink-3); padding: 0 2px; }
.pager__size { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.pgsize {
  height: 34px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px;
}
.pgsize:focus { outline: none; border-color: rgba(179,37,43,.45); }

@media (max-width: 720px) {
  .pager { justify-content: center; }
  .pager__info { width: 100%; text-align: center; }
  .pager__ctrl { order: 3; width: 100%; justify-content: center; }
  .pager__size { order: 2; }
  .pgbtn { min-width: 32px; height: 32px; padding: 0 8px; }
}

.plist { display: flex; flex-direction: column; gap: 12px; }

.product {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid #EEF0F3; display: flex; flex-direction: column;
  transition: all .18s; position: relative;
}
.product:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #E3E6EA; }
.product__thumb { position: relative; aspect-ratio: 1 / 1; background: #F2F3F5; overflow: hidden; }
.product__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product:hover .product__thumb img { transform: scale(1.04); }
.product__badge {
  position: absolute; left: 0; bottom: 0; max-width: 100%;
  font-size: 10.5px; color: #fff; background: rgba(47,122,79,.9);
  padding: 2px 8px; border-top-right-radius: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product__body { padding: 11px 13px 13px; display: flex; flex-direction: column; flex: 1; }
.product__name {
  font-size: 13.5px; line-height: 1.45; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.product__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.product__co { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product__foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 9px; gap: 8px; }
.product__stat { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.price { color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums; }
.price__sym { font-size: 12px; }
.price__num { font-size: 19px; }
.price__unit { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

/* 列表形态的商品 */
.plist .product { flex-direction: row; align-items: stretch; }
.plist .product__thumb { width: 150px; flex-shrink: 0; aspect-ratio: auto; }
.plist .product__body { flex: 1; min-width: 0; padding: 14px 16px; }
.plist .product__name { font-size: 15px; min-height: 0; -webkit-line-clamp: 3; }
@media (max-width: 640px) {
  .plist .product__thumb { width: 112px; }
  .plist .product__name { font-size: 13.5px; }
}

/* 勾选 */
.pick {
  position: absolute; right: 9px; top: 9px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9); background: rgba(31,35,41,.32);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; backdrop-filter: blur(2px);
  transition: all .15s;
}
.pick:hover { transform: scale(1.08); }
.pick--on { background: var(--brand); border-color: #fff; }

/* ---------- 按钮 ---------- */
.btn {
  height: 40px; padding: 0 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .16s; white-space: nowrap;
}
.btn--primary { background: linear-gradient(100deg, #C22A31, #9C1E24); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(179,37,43,.3); }
.btn--ghost { background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(179,37,43,.2); }
.btn--ghost:hover { background: #F8E2E3; }
.btn--plain { background: #F2F3F5; color: var(--ink-2); }
.btn--plain:hover { background: #E9EBEF; }
.btn--lg { height: 46px; padding: 0 26px; font-size: 14.5px; }
.btn--sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: 999px; font-size: 12.5px;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: rgba(179,37,43,.3); color: var(--brand); }
.chip--on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 16px; height: 40px; min-width: 230px;
}
.search input {
  border: none; outline: none; font-size: 13.5px; flex: 1; min-width: 0; background: transparent;
}

/* ---------- 模态 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,22,26,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.modal--on { opacity: 1; pointer-events: auto; }
.modal__box {
  background: #fff; border-radius: 18px; max-width: 880px; width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.99); transition: transform .2s;
}
.modal--on .modal__box { transform: none; }
.modal__close {
  position: absolute; right: 18px; top: 18px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--ink-2);
}
.modal__close:hover { background: #fff; }

.detail { display: grid; grid-template-columns: 380px 1fr; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
.detail__img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; background: #F2F3F5; }
.detail__body { padding: 26px 26px 22px; }
.detail__name { font-size: 19px; font-weight: 700; line-height: 1.45; }
.detail__tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.detail__price { margin-top: 16px; }
.detail__price .price__num { font-size: 30px; }
.detail__metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail__metric { text-align: center; }
.detail__metric b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.detail__metric span { font-size: 11.5px; color: var(--ink-3); }
.kv { display: flex; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.kv__k { width: 120px; flex-shrink: 0; color: var(--ink-3); }
.kv__v { flex: 1; word-break: break-all; }

/* ---------- 空态 ---------- */
.empty { padding: 60px 24px; text-align: center; color: var(--ink-3); }
.empty__icon { font-size: 40px; display: block; margin-bottom: 12px; opacity: .55; }
.empty__tip { font-size: 12.5px; margin-top: 8px; }

/* ---------- 提示条 ---------- */
.notice {
  font-size: 11.5px; color: var(--ink-3); text-align: center;
  padding: 26px 20px; line-height: 1.8;
}
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translate(-50%, 20px);
  background: rgba(31,35,41,.92); color: #fff;
  padding: 11px 22px; border-radius: 999px; font-size: 13.5px;
  z-index: 500; opacity: 0; pointer-events: none; transition: all .22s;
}
.toast--on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 选品抽屉 ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
  background: #fff; z-index: 190; box-shadow: -8px 0 40px rgba(31,35,41,.16);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .24s cubic-bezier(.3,.7,.3,1);
}
.drawer--on { transform: none; }
.drawer__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer__title { font-size: 16px; font-weight: 700; }
.drawer__bd { flex: 1; overflow: auto; padding: 12px 16px; }
.drawer__ft { padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
/* 空清单：底部操作按钮弱化，提示先选品 */
.drawer--empty .drawer__ft .btn { opacity: .55; }
.drawer__row { display: flex; gap: 10px; }
.mask { position: fixed; inset: 0; background: rgba(20,22,26,.36); z-index: 180; opacity: 0; pointer-events: none; transition: opacity .2s; }
.mask--on { opacity: 1; pointer-events: auto; }

.selitem { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #F5F6F8; }
.selitem__img { width: 62px; height: 62px; border-radius: 9px; background: #F2F3F5; flex-shrink: 0; object-fit: cover; }
.selitem__main { flex: 1; min-width: 0; }
.selitem__name { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.selitem__meta { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.selitem__del { font-size: 11.5px; color: var(--ink-3); cursor: pointer; align-self: flex-start; padding: 2px 6px; border-radius: 6px; }
.selitem__del:hover { background: #F2F3F5; color: var(--brand); }

.groupbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 6px; font-size: 12.5px; font-weight: 700;
  color: var(--brand); border-bottom: 1px solid var(--line); margin-top: 10px;
}
.groupbar span { font-weight: 400; color: var(--ink-3); }

/* ---------- 后台表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th {
  text-align: left; padding: 11px 12px; font-size: 12px; color: var(--ink-3);
  font-weight: 600; background: #FAFBFC; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #F5F6F8; vertical-align: middle; }
.table tr:hover td { background: #FCFCFD; }
.table__thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #F2F3F5; }
.table__name { font-size: 13px; line-height: 1.4; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tablescroll { max-height: 62vh; overflow: auto; border-radius: 12px; }

input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-3); }
.field input, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; outline: none; font-family: inherit; background: #fff;
}
.field input:focus, .field textarea:focus { border-color: rgba(179,37,43,.45); }

.banner {
  background: linear-gradient(120deg, #FFF7F7, #FFFDF8);
  border: 1px solid rgba(179,37,43,.14); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

/* ---------- 打印 ---------- */
@media print {
  .topbar, .toolbar, .drawer, .mask, .btn, .no-print { display: none !important; }
  body { background: #fff; }
}

/* 小屏：公司信息卡双列改单列 */
@media (max-width: 640px) {
  .co__grid { grid-template-columns: 1fr; }
  .pgrid { gap: 10px; }
  .co__head { padding: 14px 16px 12px; }
  .co__id { gap: 8px; }
  .co__mark { width: 32px; height: 32px; border-radius: 9px; }
  .co__name { font-size: 15.5px; }
  .cogitem__logo, .cogitem__logo--mark { width: 42px; height: 42px; }
}
/* ============ 页面最顶部：公司按钮区（位于导航上方） ============ */
.cogtop {
  background: linear-gradient(180deg, #FDF1F1 0%, #F7F8FA 100%);
  border-bottom: 1px solid rgba(179,37,43,.12);
}
.cogtop__inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 20px 16px;
}
.cogtop__hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.cogtop__title {
  font-size: 15.5px; font-weight: 800; color: var(--brand);
  display: flex; align-items: center;
}
.cogtop__title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: var(--brand); margin-right: 9px;
}
.cogtop__note { font-size: 12.5px; color: var(--ink-3); }

/* ============ 公司按钮网格（每行4个） ============ */
.cogrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.cogitem {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: all .15s; text-align: center;
}
.cogitem:hover { border-color: rgba(179,37,43,.35); background: #FFF7F7; transform: translateY(-1px); }
.cogitem--on { background: var(--brand-soft); border-color: rgba(179,37,43,.45); }
.cogitem__logo {
  width: 46px; height: 46px; border-radius: 10px; object-fit: contain;
  background: #F7F8FA; border: 1px solid var(--line); padding: 3px;
}
/* 品牌标为满幅徽章：去衬底/内边距，紧贴名称不留白 */
.cogitem__logo--mark {
  background: transparent; border: 0; padding: 0; object-fit: cover;
  box-shadow: 0 1px 3px rgba(17,24,39,.15);
}
.cogitem__name {
  font-size: 13px; font-weight: 700; color: var(--ink-1); line-height: 1.35;
  max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cogitem--on .cogitem__name { color: var(--brand); }
.cogitem__meta { font-size: 11.5px; color: var(--ink-3); }
.cogitem--on .cogitem__meta { color: rgba(179,37,43,.74); }
.cogitem__check {
  position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 700;
  color: #fff; background: var(--brand); border-radius: 10px; padding: 2px 7px;
}
@media (max-width: 900px) { .cogrid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) { .cogrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ============================================================
   登录与鉴权
   ============================================================ */
/* 顶部用户区 */
.authbox { margin-left: auto; display: flex; align-items: center; }
.authbtn {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.92); color: var(--brand); border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.authbtn:hover { background: #fff; }
.userchip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px 5px 6px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  color: #fff;
}
.userchip__ava {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.92); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.userchip__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.userchip__txt b { font-size: 12.5px; font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip__txt i { font-style: normal; font-size: 10.5px; opacity: .82; }
.userchip__out {
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px;
  background: rgba(0,0,0,.16); color: #fff; cursor: pointer;
}
.userchip__out:hover { background: rgba(0,0,0,.3); }

/* 顶部错误/提示条 */
.authbanner {
  display: none; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 18px; font-size: 13px; text-align: center;
}
.authbanner--error { background: #FDECEC; color: #A22026; border-bottom: 1px solid #F5C9CB; }
.authbanner--info { background: var(--gold-soft); color: #7A4A00; border-bottom: 1px solid #F0DDB2; }
.authbanner__x { color: inherit; opacity: .6; font-size: 16px; cursor: pointer; }
.authbanner__x:hover { opacity: 1; }

/* 整页守卫遮罩 */
.gate {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center;
  background: rgba(244,245,247,.94); backdrop-filter: blur(2px);
}
.gate__box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gate__spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(179,37,43,.18); border-top-color: var(--brand);
  animation: gatespin .8s linear infinite;
}
@keyframes gatespin { to { transform: rotate(360deg); } }
.gate__msg { font-size: 13.5px; color: var(--ink-2); }

/* ---------- 登录页 ---------- */
.loginpage { background: linear-gradient(180deg, #FDF1F1 0%, var(--bg) 320px); }
.loginwrap { max-width: 1000px; }
.logincard {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden; margin-top: 18px;
}
.logincard__hd { padding: 26px 28px 0; text-align: center; }
.logincard__title { font-size: 21px; font-weight: 800; }
.logincard__sub { font-size: 12.5px; color: var(--ink-3); margin-top: 7px; }
.logincard__bd { padding: 18px 28px 24px; }
.logincard__ft {
  padding: 13px 20px; text-align: center; font-size: 11.5px; color: var(--ink-3);
  background: #FAFBFC; border-top: 1px solid var(--line);
}
.logintabs {
  display: flex; gap: 6px; margin: 18px 28px 0;
  background: #F4F5F7; border-radius: 999px; padding: 5px;
}
.logintab {
  flex: 1; padding: 9px 8px; border-radius: 999px; font-size: 13px;
  color: var(--ink-2); cursor: pointer; transition: all .16s; white-space: nowrap;
}
.logintab--on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 6px rgba(31,35,41,.08); }
.loginpane { max-width: 420px; margin: 0 auto; }
.logincard__bd > .loginpane { padding-top: 6px; }
.logincard__bd .btn--block { margin-top: 18px; }
.codefield { display: flex; gap: 8px; }
.codefield input { flex: 1; min-width: 0; }
.codefield .btn { flex: none; height: 42px; padding: 0 14px; font-size: 13px; }
.logincard__bd .field input {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
  font-size: 14px; outline: none; font-family: inherit; width: 100%; background: #fff;
}
.logincard__bd .field input:focus { border-color: rgba(179,37,43,.45); }
.logincard__bd .field label { font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
.fielderr { font-size: 12px; color: #C22A31; margin-top: 6px; }
.loginrow { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.logincheck { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.linkbtn { color: var(--brand); font-size: 12.5px; cursor: pointer; text-decoration: none; background: none; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.loginhint { font-size: 12.5px; color: var(--ink-3); text-align: center; margin-top: 14px; }
.loginalert {
  display: none; padding: 11px 14px; border-radius: 11px; font-size: 12.5px;
  margin: 14px auto 0; max-width: 420px; line-height: 1.6;
}
.loginalert--info { background: var(--gold-soft); color: #7A4A00; border: 1px solid #F0DDB2; }
.loginalert--error { background: #FDECEC; color: #A22026; border: 1px solid #F5C9CB; }
.wechatbox {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: #F7FBF8; border: 1px solid #DCEFE4; border-radius: 14px;
}
.wechatbox__qr {
  width: 86px; height: 86px; flex: none; border-radius: 12px;
  background: #2F7A4F; color: #fff; font-size: 16px; font-weight: 800; line-height: 1.35;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.wechatbox__txt b { font-size: 14px; }
.wechatbox__txt p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; margin-top: 6px; }
.loginnotes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.loginnotes__card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.loginnotes__t { font-size: 13.5px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.loginnotes__card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.loginnotes__card li { font-size: 12px; color: var(--ink-2); line-height: 1.6; padding-left: 12px; position: relative; }
.loginnotes__card li::before { content: '·'; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
@media (max-width: 860px) {
  .loginnotes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .logincard__hd, .logincard__bd { padding-left: 18px; padding-right: 18px; }
  .logintabs { margin-left: 18px; margin-right: 18px; }
  .logintab { font-size: 12px; padding: 8px 4px; }
  .userchip__txt { display: none; }
  .authbox { margin-left: auto; }
}

/* 小屏：顶部两行导航适配 */
@media (max-width: 640px) {
  .topbar__brandrow { height: 56px; }
  .brand__mark { width: 34px; height: 34px; font-size: 17px; }
  .brand__title { font-size: 15px; white-space: normal; line-height: 1.3; }
  .topbar__navrow { padding: 7px 0 9px; }
  .topnav { gap: 6px; }
  .topnav__item { padding: 7px 14px; font-size: 12.5px; }
  .cogtop__inner { padding: 12px 16px 14px; }
}

/* ============ 商品区上方：公司横向快捷条 ============ */
.pquick { display: flex; gap: 8px; padding: 16px 20px 0; }
.pquick__item {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: all .15s;
}
.pquick__item:hover { border-color: rgba(179,37,43,.35); background: #FFF7F7; }
.pquick__item--on { background: var(--brand); border-color: var(--brand); }
.pquick__logo { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; background: #F7F8FA; flex: none; padding: 1px; }
.pquick__name {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.pquick__item--on .pquick__name { color: #fff; }
.pquick__item--on .pquick__logo { background: rgba(255,255,255,.92); }
@media (max-width: 760px) {
  .pquick { flex-wrap: wrap; }
  .pquick__item { flex: 1 1 30%; }
}

/* ============ 礼品专供 ============ */
/* 商品固定每行 3 个 */
.ggrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) {
  .ggrid { gap: 10px; }
  .gcard__body { padding: 9px 10px 11px; }
  .gcard__name { font-size: 12.5px; }
  .gcard__spec, .gcard__config { font-size: 11px; }
  .gcard__info { display: none; }
  .gcard__foot { padding-top: 7px; }
  .gcard__more { font-size: 11px; }
  .gcard__pricelabel { display: none; }
  .gcard__price { padding: 3px 8px; left: 7px; bottom: 7px; }
  .gcard__price .price__num { font-size: 14px; }
}
.gcard {
  background: #fff; border: 1px solid #EEF0F3; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.gcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gcard__thumb { position: relative; aspect-ratio: 1 / 1; background: #F7F8FA; overflow: hidden; }
.gcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gcard:hover .gcard__thumb img { transform: scale(1.04); }
.gcard__noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #C9585C, #9C1E24);
}
.gcard__price {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(255, 255, 255, .94); border-radius: 999px;
  padding: 4px 12px; display: flex; align-items: baseline; gap: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.gcard__price .price__sym { font-size: 12px; }
.gcard__price .price__num { font-size: 17px; }
.gcard__pricelabel { font-size: 10.5px; color: var(--ink-3); margin-left: 2px; }
.gcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.gcard__name {
  font-size: 14.5px; font-weight: 700; line-height: 1.45; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard__spec { font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.gcard__config {
  font-size: 12px; color: var(--ink-3); line-height: 1.6; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard__info { margin-top: 9px; border-top: 1px dashed #F0F2F5; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.gcard__kv { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.5; min-width: 0; }
.gcard__k { color: var(--ink-3); flex: none; }
.gcard__v { color: var(--ink-2); word-break: break-all; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gcard__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gcard__more { font-size: 12px; color: var(--brand); }

/* ============ 选品数量步进器（起订量 1） ============ */
.qtybox { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.qbtn {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  border: 1px solid #E5E8EB; background: #fff; color: var(--ink-2);
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.qbtn:hover:not(:disabled) { border-color: rgba(179,37,43,.45); color: var(--brand); background: var(--brand-soft); }
.qbtn:disabled { opacity: .38; cursor: not-allowed; }
.qinput {
  width: 54px; height: 28px; text-align: center; border-radius: 8px;
  border: 1px solid #E5E8EB; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qinput::-webkit-outer-spin-button, .qinput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qinput:focus { outline: none; border-color: rgba(179,37,43,.45); }
.qtybox__sub { font-size: 11.5px; color: var(--ink-3); margin-left: 2px; }

/* ============ 礼品筛选行（品牌下拉 + 价格区间） ============ */
.filterrow {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 14px; background: #FAFAFB;
  border: 1px solid #F0F2F5; border-radius: 12px;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11.5px; color: var(--ink-3); }
.field--select select {
  height: 34px; min-width: 190px; max-width: 260px; padding: 0 10px;
  border: 1px solid #E5E8EB; border-radius: 9px; background: #fff;
  font-size: 13px; color: var(--ink); cursor: pointer;
}
.field--select select:focus { outline: none; border-color: rgba(179,37,43,.45); }
.pricerange { display: flex; align-items: center; gap: 6px; }
.pricerange input {
  width: 92px; height: 34px; padding: 0 10px; border: 1px solid #E5E8EB;
  border-radius: 9px; font-size: 13px; color: var(--ink);
}
.pricerange input:focus { outline: none; border-color: rgba(179,37,43,.45); }
.pricerange span { color: var(--ink-3); font-size: 12px; }
.filterrow .chips { align-items: center; }
@media (max-width: 640px) {
  .filterrow { gap: 10px; padding: 10px; }
  .field--select select { min-width: 150px; max-width: 100%; }
  .pricerange input { width: 76px; }
}

/* ============ 礼品专供 · 选品勾选 ============ */
.gcard { position: relative; }
/* 勾选框：卡片缩略图右上角圆形按钮 */
.gpick {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(17, 24, 39, .30);
  color: #fff; font-size: 17px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: background .12s, transform .12s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.gpick:hover { transform: scale(1.08); }
.gpick--on { background: var(--brand); }
.gpick--on::before { content: '✓'; }
/* 选中卡片：品牌色描边 + 轻微高亮 */
.gcard--sel { border-color: rgba(179, 37, 43, .55); box-shadow: 0 0 0 1px rgba(179, 37, 43, .35), var(--shadow); }

/* 浮动选品条：有勾选时出现 */
.gselbar {
  display: none; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 80; max-width: calc(100vw - 24px);
  align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; box-shadow: 0 12px 34px rgba(17, 24, 39, .22);
}
.gselbar--on { display: flex; }
.gselbar__info { font-size: 13px; color: var(--ink-1); white-space: nowrap; margin-right: 2px; }
.gselbar__info b { color: var(--brand); font-size: 15px; }
.gselbar .btn--sm { height: 30px; padding: 0 11px; font-size: 12px; }
@media (max-width: 560px) {
  .gselbar { border-radius: 16px; bottom: 10px; padding: 8px 10px; gap: 6px; }
  .gselbar__info { width: 100%; text-align: center; margin-right: 0; }
}

/* ============ 管理后台登录 · 微信扫码（唯一登录方式） ============ */
.btn--wechat {
  background: #07C160; color: #fff; border-color: #07C160;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.btn--wechat:hover:not(:disabled) { background: #06AD56; border-color: #06AD56; }
.btn--wechat:disabled { opacity: .6; cursor: default; }
.wxicon { flex: 0 0 auto; }

.signcard {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #F7F8FA;
  border: 1px solid var(--line); border-radius: 12px;
}
.signcard__ava {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.signcard__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.signcard__txt b { font-size: 15px; }
.signcard__txt i { font-style: normal; font-size: 12px; color: var(--ink-3); }

.bindbox {
  background: #FFF8F0; border: 1px solid #FFE3C2;
  border-radius: 12px; padding: 13px 15px;
}
.bindbox__t { font-size: 14px; font-weight: 800; color: #8A5A00; margin-bottom: 4px; }
.bindbox__d { font-size: 12.5px; line-height: 1.75; color: #8A5A00; }
.bindbox__d b { color: var(--brand); }

.logincard__bd .field input.input--err { border-color: #C22A31; }

/* ---------- 站点页脚（ICP 备案号） ---------- */
.sitefoot {
  font-size: 11.5px; color: var(--ink-3); text-align: center;
  padding: 4px 20px 26px; line-height: 1.9;
}
.sitefoot a { color: var(--ink-3); }
.sitefoot a:hover { color: var(--brand); text-decoration: underline; }
.sitefoot__sep { color: var(--line); padding: 0 2px; }
