/* APack 包装机械网 - 基于 Ant Design 3.x 设计体系 */
:root {
  --primary: #2769DC;
  --primary-hover: #3F85FF;
  --primary-active: #1E60D3;
  --success: #0AB861;
  --warning: #FEA900;
  --error: #FF3131;
  --heading: #262626;
  --text: #595959;
  --text-secondary: #999999;
  --disabled: #A1A1A1;
  --border: #CFD3D8;
  --border-split: #E6E9EF;
  --bg-layout: #F3F5F9;
  --bg-component: #ffffff;
  --radius: 4px;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.09);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.12);
  --ease: cubic-bezier(0.645, 0.045, 0.355, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-layout);
}
::selection { background: rgba(39, 105, 220, 0.2); color: var(--heading); }
.search-form input::placeholder { color: var(--text-secondary); }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 20px; font-size: 0.9375rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text); cursor: pointer;
  transition: all 0.3s var(--ease); white-space: nowrap; user-select: none;
}
.btn i { font-size: 1rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-active); border-color: var(--primary-active); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { height: 44px; padding: 0 28px; font-size: 1rem; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ===== 顶部工具栏 ===== */
.topbar {
  background: #1E2E54; color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem; height: 38px; line-height: 38px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255, 255, 255, 0.65); }
.topbar a:hover { color: #fff; }
.topbar a.tb-auth { background: var(--primary); padding: 0 12px; }
.topbar-left { display: flex; align-items: center; }
.topbar-left .tb-welcome {padding-right:12px;}
.topbar-right { display: flex; align-items: center; gap: 0; }
.topbar-right > a, .topbar-right > .lang-switch { padding: 0 12px; position: relative; }
.topbar-right > a + a::before, .topbar-right > .lang-switch::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 12px; background: rgba(255, 255, 255, 0.2);
}
.topbar .bi { margin-right: 4px; }
.topbar-phone { font-weight: 600; color: #fff !important; }

/* 语言切换 */
.lang-switch { position: relative; cursor: pointer; }
.lang-switch .lang-current { display: flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.65); }
.lang-switch .lang-current:hover { color: #fff; }
.lang-switch .lang-menu {
  position: absolute; top: 100%; right: 0; z-index: 100; min-width: 142px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 5px 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.25s var(--ease);
}
.lang-switch:hover .lang-menu, .lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { list-style: none; }
.lang-menu li a {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  color: var(--text) !important; font-size: 0.875rem; line-height: 1.5;
  white-space: nowrap;
}
.lang-menu li a:hover { background: #EAF1FC; color: var(--primary) !important; }
.lang-menu li a.active { color: var(--primary) !important; }
.lang-menu li a.active::after { content: "\F633"; font-family: "bootstrap-icons"; margin-left: auto; font-size: 0.75rem; }

/* ===== 全局版式节奏（参考 suppliergo：区块间距 24–40px、卡片圆角 4–8px、浅灰阴影、扁平化）
   区块间距由下方 .section（桌面 34px / 移动端 24px）统一控制；.sec-head 为"标题+更多"一行式区块标题 ===== */

/* ===== 通用卡片基础类（首页/列表/详情后续复用） ===== */
.sg-card {
  background: var(--bg-component); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow-1); transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.sg-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

/* ===== 头部 ===== */
.header { background: #fff; padding: 20px 0; border-bottom: 1px solid var(--border-split); }
.header .container { display: flex; align-items: center; gap: 24px; }
.logo { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 46px; height: 46px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
}
.logo-text { display: flex; flex-direction: column; gap: 3px; line-height: 1.2; }
.logo-text .logo-name { font-size: 1.5rem; font-weight: 700; color: var(--heading); letter-spacing: 0.5px; }
.logo-text .logo-name em { font-style: normal; color: var(--primary); }
.logo-text .logo-sub { font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 1px; }

/* 搜索（search-band 内，见下方"搜索带"） */
.search-form { display: flex; border: 2px solid var(--primary); border-radius: var(--radius); overflow: hidden; background: #fff; }
.search-form input {
  flex: 1; border: none; outline: none; padding: 0 12px; height: 40px;
  font-size: 0.9375rem; color: var(--heading);
}
.search-form button {
  border: none; background: var(--primary); color: #fff; padding: 0 30px;
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background 0.3s;
}
.search-form button:hover { background: var(--primary-hover); }
.hot-words { margin-top: 8px; font-size: 0.8125rem; color: var(--text-secondary); display: flex; gap: 12px; flex-wrap: wrap; }
.hot-words a { color: var(--text-secondary); }
.hot-words a:hover { color: var(--primary); }
.header-actions { flex-shrink: 0; margin-left: auto; }

/* 移动端汉堡 */
.menu-toggle { display: none; }

/* ===== 主导航（粘性吸顶） ===== */
.navbar { background: var(--primary); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); position: sticky; top: 0; z-index: 99; transition: box-shadow 0.3s var(--ease); }
.navbar .container { display: flex; }
.navbar .nav-item {
  position: relative; display: block; padding: 0 26px; height: 46px; line-height: 46px;
  color: #fff; font-size: 1.0625rem; font-weight: 500;
  transition: background 0.3s, height 0.25s var(--ease), line-height 0.25s var(--ease);
}
.navbar .nav-item:hover, .navbar .nav-item.active { background: var(--primary-active); color: #fff; }
.navbar .nav-item.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: #fff;
}
/* 吸顶紧凑态（main.js 滚动 >120px 添加 .is-stuck） */
.navbar.is-stuck { box-shadow: var(--shadow-2); }
.navbar.is-stuck .nav-item { height: 40px; line-height: 40px; font-size: 1rem; }

/* ===== 搜索带（导航下方整行，独立于 header） ===== */
.search-band { background: #fff; border-bottom: 1px solid var(--border-split); padding: 18px 0 16px; }
.search-band .container { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.search-band .search-box { flex: 1 1 480px; max-width: 720px; }
.search-band .search-form input { height: 44px; font-size: 1rem; }
.search-band .hot-words { margin-top: 0; flex-shrink: 0; }

/* ===== Hero 区 ===== */
.hero { background: var(--bg-layout); padding: 16px 0; }
.hero .container { display: grid; grid-template-columns: 250px 1fr 290px; gap: 16px; }

/* 分类侧栏（sg-card 卡片感：6px 圆角 + 细边框） */
.side-cat { background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-1); }
.side-cat-title {
  background: var(--primary); color: #fff; padding: 12px 18px;
  font-size: 1.0625rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
  border-radius: 5px 5px 0 0;
}
.side-cat-item { border-bottom: 1px solid var(--border-split); position: relative; transition: background 0.25s var(--ease); }
.side-cat-item:last-child { border-bottom: none; }
.side-cat-link {
  display: flex; align-items: center; padding: 13px 18px; font-size: 0.9375rem;
  color: var(--heading); font-weight: 500;
}
.side-cat-link .cat-num {
  width: 26px; height: 26px; border-radius: 4px; background: #EAF1FC; color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; margin-right: 10px; flex-shrink: 0;
}
.side-cat-link .bi-chevron-right { margin-left: auto; color: var(--text-secondary); font-size: 0.75rem; transition: transform 0.3s; }
.side-cat-item:hover { background: #f7fbff; z-index: 20; }
.side-cat-item:hover .side-cat-link { color: var(--primary); }
.side-cat-item:hover .bi-chevron-right { transform: translateX(3px); color: var(--primary); }
/* hover 左侧主色强调条 */
.side-cat-item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); transform: scaleY(0); transition: transform 0.25s var(--ease);
}
.side-cat-item:hover::before { transform: scaleY(1); }
/* 二级类目弹出层 */
.side-cat-sub {
  position: absolute; left: 100%; top: 0; z-index: 95;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 2px 10px;
  width: min(560px, calc(100vw - 330px)); padding: 18px 22px 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-2);
  border: 1px solid var(--border-split);
  opacity: 0; visibility: hidden; transform: translateX(10px);
  transition: all 0.25s var(--ease);
}
.side-cat-item:hover .side-cat-sub { opacity: 1; visibility: visible; transform: translateX(0); }
.side-cat-sub .sub-head {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.9375rem; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--border-split);
}
.side-cat-sub .sub-head a { color: var(--heading); font-weight: 600; }
.side-cat-sub .sub-head .more { font-size: 0.8125rem; color: var(--primary); font-weight: 400; }
.side-cat-sub a {
  font-size: 0.8125rem; color: var(--text); line-height: 2.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-cat-sub a:hover { color: var(--primary); }

/* 轮播（容器 sg-card 化：圆角/边框/阴影由 .sg-card 提供，此处不再重复定义） */
.carousel { position: relative; overflow: hidden; min-height: 380px; background: #1E2E54; }
.carousel.sg-card:hover { transform: none; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease); pointer-events: none; display: flex; align-items: center; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide-bg { position: absolute; inset: 0; display: flex; align-items: center; }
.slide-bg.s1 { background: linear-gradient(120deg, #0b3d91 0%, #1565c0 45%, #1e88e5 100%); }
.slide-bg.s2 { background: linear-gradient(120deg, #0d4f3c 0%, #137a5b 45%, #17a674 100%); }
.slide-bg.s3 { background: linear-gradient(120deg, #4a1d96 0%, #6d28d9 45%, #8b5cf6 100%); }
.slide-bg::before {
  content: ""; position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 480px; height: 480px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.slide-bg::after {
  content: ""; position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.slide-inner { position: relative; z-index: 2; padding: 0 56px; color: #fff; max-width: 640px; }
.slide-tag {
  display: inline-block; padding: 4px 14px; border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px; font-size: 0.8125rem; margin-bottom: 18px; letter-spacing: 1px;
}
.slide-title { font-size: 2.25rem; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }
.slide-desc { font-size: 1.0625rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 28px; }
.slide-icon { position: absolute; right: 90px; top: 50%; transform: translateY(-50%); font-size: 9rem; color: rgba(255, 255, 255, 0.18); z-index: 1; }
.carousel-dots { position: absolute; bottom: 18px; left: 56px; z-index: 5; display: flex; gap: 8px; }
.carousel-dots span { width: 24px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); cursor: pointer; transition: all 0.3s; }
.carousel-dots span.active { background: #fff; width: 36px; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: #BFBFBF; color: #fff; font-size: 1.125rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.3s;
}
.carousel-arrow:hover { background: #8C8C8C; }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }

/* 右侧用户面板 */
.user-panel { display: flex; flex-direction: column; gap: 16px; }
.panel-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.user-card { padding: 20px; text-align: center; }
.user-card .avatar {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 10px;
  background: #EAF1FC; color: var(--primary); font-size: 1.75rem;
  display: flex; align-items: center; justify-content: center;
}
.user-card p { font-size: 0.9375rem; margin-bottom: 14px; color: var(--text); }
.user-card .btns { display: flex; gap: 10px; }
.user-card .btns .btn { flex: 1; }
.quick-stats { display: flex; text-align: center; border-top: 1px solid var(--border-split); margin-top: 16px; padding-top: 14px; }
.quick-stats div { flex: 1; }
.quick-stats b { display: block; font-size: 1.25rem; color: var(--primary); font-weight: 700; }
.quick-stats span { font-size: 0.75rem; color: var(--text-secondary); }
.notice-card { flex: 1; padding: 16px 18px; }
.notice-card h4 { font-size: 0.9375rem; color: var(--heading); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.notice-card h4 a { font-size: 0.75rem; color: var(--text-secondary); font-weight: 400; }
.notice-card li { font-size: 0.8125rem; line-height: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-card li a { color: var(--text); }
.notice-card li a:hover { color: var(--primary); }
.notice-card li .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin-right: 8px; vertical-align: middle; }

/* ===== 通用 Section ===== */
.section { padding: 34px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.sec-title { font-size: 1.5rem; font-weight: 700; color: var(--heading); display: flex; align-items: baseline; gap: 12px; }
.sec-title::before { content: ""; width: 4px; height: 20px; background: var(--primary); border-radius: 2px; align-self: center; }
.sec-title small { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.sec-more { font-size: 0.875rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; }
.sec-more:hover { color: var(--primary); }

/* ===== 分类展区 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 22px; transition: box-shadow 0.3s, transform 0.3s;
}
.cat-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); }
.cat-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-split); }
.cat-card-head .cat-icon {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff;
}
.cat-icon.i1 { background: linear-gradient(135deg, #2769DC, #1E60D3); }
.cat-icon.i2 { background: linear-gradient(135deg, #13c2c2, #08979c); }
.cat-icon.i3 { background: linear-gradient(135deg, #0AB861, #089450); }
.cat-icon.i4 { background: linear-gradient(135deg, #fa8c16, #d46b08); }
.cat-icon.i5 { background: linear-gradient(135deg, #722ed1, #531dab); }
.cat-icon.i6 { background: linear-gradient(135deg, #eb2f96, #c41d7f); }
.cat-card-head h3 { font-size: 1.125rem; color: var(--heading); font-weight: 600; }
.cat-card-head h3 small { display: block; font-size: 0.75rem; color: var(--text-secondary); font-weight: 400; margin-top: 2px; }
.cat-card-body { line-height: 2.1; font-size: 0.875rem; }
.cat-card-body a { color: var(--text); margin-right: 14px; display: inline-block; }
.cat-card-body a:hover { color: var(--primary); }

/* ===== 供应产品 ===== */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prod-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1);
  overflow: hidden; transition: box-shadow 0.3s, transform 0.3s; display: flex; flex-direction: column;
}
.prod-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); }
/* 首页产品卡套用 sg-card 体系（仅作用于带 .sg-card 的首页卡片，列表页不受影响）：
   6px 圆角 + 细边框（border 由 .sg-card 提供）、16:10 白底 contain 图区、hover 升 shadow-2 */
.prod-card.sg-card { border-radius: 6px; transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.6s var(--ease); }
.prod-card.sg-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.prod-card.sg-card .prod-img { aspect-ratio: 16 / 10; }
.prod-card.sg-card .prod-img.has-img { background: var(--bg-component); }
.prod-card.sg-card .prod-img.has-img img { object-fit: fill; }
.prod-meta a { color: inherit; }
.prod-meta a:hover { color: var(--primary); }
.prod-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.prod-img .bi { font-size: 4.5rem; color: rgba(255, 255, 255, 0.35); position: relative; z-index: 1; transition: transform 0.4s var(--ease); }
.prod-card:hover .prod-img .bi { transform: scale(1.12); }
.prod-img::before { content: ""; position: absolute; inset: 0; opacity: 0.95; }
.prod-img.g1::before { background: linear-gradient(135deg, #10239e, #2f54eb); }
.prod-img.g2::before { background: linear-gradient(135deg, #006d75, #13c2c2); }
.prod-img.g3::before { background: linear-gradient(135deg, #067A44, #0AB861); }
.prod-img.g4::before { background: linear-gradient(135deg, #ad4e00, #fa8c16); }
.prod-img.g5::before { background: linear-gradient(135deg, #391085, #722ed1); }
.prod-img.g6::before { background: linear-gradient(135deg, #9e1068, #eb2f96); }
.prod-img.g7::before { background: linear-gradient(135deg, #16409E, #2769DC); }
.prod-img.g8::before { background: linear-gradient(135deg, #B32020, #FF3131); }
.prod-img.has-img { background: #F3F5F9; }
.prod-img.has-img::before { display: none; }
.prod-img.has-img .bi { display: none; }
.prod-img.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.4s var(--ease); }
.prod-card:hover .prod-img.has-img img { transform: scale(1.06); }
.prod-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--error); color: #fff; font-size: 0.6875rem;
  padding: 2px 8px; border-radius: 3px;
}
.prod-badge.verified { background: var(--success); }
.prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.prod-title { font-size: 0.9375rem; font-weight: 600; color: var(--heading); line-height: 1.5; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod-title:hover { color: var(--primary); }
.prod-meta { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.prod-meta .bi { font-size: 0.8125rem; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-split); }
.prod-price { color: var(--error); font-weight: 700; font-size: 1.0625rem; }
.prod-price small { font-size: 0.75rem; font-weight: 400; }
.prod-foot .btn { flex-shrink: 0; }

/* ===== 求购信息条（行列表精修：卡片边框、统一行高、时间右对齐） ===== */
.buy-wrap { background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-1); overflow: hidden; }
.buy-row { display: flex; align-items: center; gap: 16px; padding: 15px 22px; min-height: 54px; border-bottom: 1px solid var(--border-split); transition: background 0.3s; }
.buy-row:last-child { border-bottom: none; }
.buy-row:hover { background: #fafafa; }
.buy-tag { flex-shrink: 0; background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; font-size: 0.75rem; padding: 2px 10px; border-radius: 3px; }
.buy-title { flex: 1; font-size: 0.9375rem; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-title:hover { color: var(--primary); }
.buy-qty { flex-shrink: 0; font-size: 0.875rem; color: var(--text-secondary); width: 150px; }
.buy-qty b { color: var(--error); font-weight: 600; }
.buy-date { flex-shrink: 0; width: 100px; text-align: right; font-size: 0.8125rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.buy-row .btn { flex-shrink: 0; }

/* ===== 推荐企业（Featured Suppliers 式：sg-card 体系 + 纵向卡片，按钮贴底） ===== */
.co-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.co-card {
  background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-1);
  padding: 24px 20px; text-align: center; display: flex; flex-direction: column;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.6s var(--ease);
}
.co-card.sg-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.co-card .btn { align-self: center; }
.co-logo {
  width: 66px; height: 66px; border-radius: 8px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: #fff;
}
.co-logo.l1 { background: linear-gradient(135deg, #2769DC, #1E60D3); }
.co-logo.l2 { background: linear-gradient(135deg, #13c2c2, #08979c); }
.co-logo.l3 { background: linear-gradient(135deg, #fa8c16, #d46b08); }
.co-logo.l4 { background: linear-gradient(135deg, #0AB861, #089450); }
.co-logo.l5 { background: linear-gradient(135deg, #722ed1, #531dab); }
.co-logo.l6 { background: linear-gradient(135deg, #eb2f96, #c41d7f); }
.co-logo.l7 { background: linear-gradient(135deg, #2f54eb, #10239e); }
.co-logo.l8 { background: linear-gradient(135deg, #fa541c, #ad2102); }
.co-name { font-size: 0.9375rem; font-weight: 600; color: var(--heading); margin-bottom: 6px; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.co-tags { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.co-tags .bi { font-size: 0.75rem; }
.co-tags .vip { color: #d48806; background: #fffbe6; border: 1px solid #ffe58f; padding: 1px 6px; border-radius: 3px; margin-left: 6px; }
.co-main { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 资讯 ===== */
.news-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.news-grid > * { min-width: 0; }
.news-feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; }
.news-feature-img {
  aspect-ratio: 16 / 9; background: linear-gradient(135deg, #061178, #1d39c4);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.news-feature-img .bi { font-size: 4rem; color: rgba(255, 255, 255, 0.3); }
.news-feature-img.has-img { background: #F3F5F9; }
.news-feature-img.has-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.news-feature:hover .news-feature-img.has-img img { transform: scale(1.06); }
.news-feature-body { padding: 18px 20px; }
.news-feature-body h3 { font-size: 1.125rem; color: var(--heading); line-height: 1.5; margin-bottom: 8px; }
.news-feature-body h3 a:hover { color: var(--primary); }
.news-feature-body p { font-size: 0.875rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 18px 22px; }
.news-list h4 { font-size: 1.0625rem; color: var(--heading); font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid var(--border-split); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.news-list h4 a { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 400; }
.news-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border-split); }
.news-list li:last-child { border-bottom: none; }
.news-list li a { flex: 1; font-size: 0.875rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list li a:hover { color: var(--primary); }
.news-list li .date { font-size: 0.75rem; color: var(--text-secondary); flex-shrink: 0; }

/* ===== 平台数据 ===== */
.stats-band { background: linear-gradient(120deg, #1E2E54, #16409E); margin-top: 34px; padding: 36px 0; color: #fff; }
.stats-band .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { text-align: center; position: relative; }
.stat-item + .stat-item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 44px; background: rgba(255, 255, 255, 0.15); }
.stat-item b { display: block; font-size: 2.125rem; font-weight: 700; line-height: 1.2; }
.stat-item b em { font-style: normal; font-size: 1rem; color: var(--warning); margin-left: 2px; }
.stat-item span { font-size: 0.875rem; color: rgba(255, 255, 255, 0.65); }

/* ===== 页脚 ===== */
.footer { background: #1E2E54; color: rgba(255, 255, 255, 0.55); margin-top: 40px; }
.footer-main { padding: 44px 0 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr; gap: 32px; }
.footer h5 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.footer-about p { font-size: 0.8125rem; line-height: 1.9; margin-bottom: 14px; }
.footer-cert { display: inline-grid; gap: 10px; }
.footer-cert span {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2); padding: 4px 10px; border-radius: 3px;
}
.footer-col li { line-height: 2.2; font-size: 0.875rem; }
.footer-col a { color: rgba(255, 255, 255, 0.55); }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; font-size: 0.875rem; line-height: 1.8; margin-bottom: 10px; }
.footer-contact .bi { color: var(--primary); font-size: 1rem; margin-top: 3px; }
.footer-contact .tel-num { font-size: 1.25rem; font-weight: 700; color: #fff; }
.footer-links { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0; font-size: 0.8125rem; line-height: 2; }
.footer-links .fl-label { color: rgba(255, 255, 255, 0.75); margin-right: 10px; }
.footer-links a { color: rgba(255, 255, 255, 0.45); margin-right: 14px; display: inline-block; }
.footer-links a:hover { color: #fff; }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0 26px; text-align: center; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.35); line-height: 2; }
.footer-copy a { color: rgba(255, 255, 255, 0.45); }

/* ===== 移动端底部联系条 / 返回顶部 ===== */
.backtop {
  position: fixed; right: 24px; bottom: 80px; z-index: 99;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #fff; box-shadow: var(--shadow-2); color: var(--primary); font-size: 1.125rem;
  cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.backtop.show { opacity: 1; visibility: visible; }
.mobile-bar { display: none; }

/* ===== 抽屉菜单 ===== */
.drawer-mask { position: fixed; inset: 0; background: #8C8C8C; z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s; }
.drawer-mask.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: -300px; width: 280px; height: 100%; z-index: 201;
  background: #fff; transition: left 0.3s var(--ease); overflow-y: auto;
}
.drawer.open { left: 0; }
.drawer-head { background: var(--primary); color: #fff; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 1.0625rem; font-weight: 600; }
.drawer-head .bi-x { font-size: 1.5rem; cursor: pointer; }
.drawer-menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-split); color: var(--heading); font-size: 0.9375rem; }
.drawer-menu a.active { color: var(--primary); font-weight: 600; }
.drawer-lang { padding: 16px 20px; border-top: 1px solid var(--border-split); }
.drawer-lang p { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 10px; }
.drawer-lang .lang-btns { display: grid; gap: 10px; }
.drawer-lang .lang-btns button { flex: 1; height: 34px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; color: var(--text); }
.drawer-lang .lang-btns button.active { border-color: var(--primary); color: var(--primary); font-weight: 600; background: #EAF1FC; }

/* ===== 滚动进入动画 ===== */
[data-aos] { opacity: 0; transform: translateY(26px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-aos].aos-in { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
/* 首页产品网格：≥1200 4 列 / 900–1200 3 列（列表页由 list.css 自行覆盖） */
@media (max-width: 1200px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .hero .container { grid-template-columns: 230px 1fr; }
  .user-panel { display: none; }
  .co-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .news-feature { grid-column: 1 / -1; }
  .footer-main { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .topbar { display: none; }
  .header { padding: 14px 0; }
  .header .container { gap: 14px; }
  .logo-text .logo-name { font-size: 1.25rem; }
  .logo-icon { width: 38px; height: 38px; font-size: 1.25rem; }
  .header-actions { display: none; }
  /* 搜索带移动端折叠：保留表单（整宽），隐藏热词行 */
  .search-band { padding: 10px 0; }
  .search-band .container { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-band .search-box { flex: 1 1 auto; max-width: none; }
  .search-band .search-form input { height: 40px; font-size: 0.9375rem; }
  .search-band .hot-words { display: none; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; font-size: 1.375rem; color: var(--heading); cursor: pointer; margin-left: auto;
  }
  .navbar { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .side-cat { display: none; }
  .carousel { min-height: 220px; }
  .slide-inner { padding: 0 28px; }
  .slide-title { font-size: 1.5rem; }
  .slide-desc { font-size: 0.875rem; margin-bottom: 18px; }
  .slide-inner .btn { display: none; }
  .slide-icon { display: none; }
  .carousel-dots { left: 28px; }
  .mobile-cat { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
  .mobile-cat a {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-1);
    padding: 14px 8px; text-align: center; font-size: 0.8125rem; color: var(--heading); font-weight: 500;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
  }
  .mobile-cat a .cat-icon { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.25rem; }
  .section { padding: 24px 0 4px; }
  .sec-title { font-size: 1.25rem; }
  .cat-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod-body { padding: 12px; }
  .prod-meta { display: none; }
  .prod-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .prod-foot .btn { width: 100%; }
  .buy-row { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .buy-qty, .buy-date { display: none; }
  .buy-row .btn { width: 100%; }
  .co-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-band .container { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .stat-item:nth-child(3)::before { display: none; }
  .footer-main { grid-template-columns: 1fr; gap: 0; padding: 10px 0; }
  .footer-col h5, .footer-about h5 {
    margin: 0; padding: 14px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.9375rem;
  }
  .footer-col h5::after, .footer-about h5::after { content: "\F64D"; font-family: "bootstrap-icons"; font-size: 0.8125rem; transition: transform 0.3s; }
  .footer-col.open h5::after, .footer-about.open h5::after { transform: rotate(180deg); }
  .footer-col .f-body, .footer-about .f-body { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
  .footer-col.open .f-body, .footer-about.open .f-body { max-height: 400px; padding: 12px 0; }
  .footer-main > .footer-about { order: 1; }
  .footer-contact-col { order: 0; }
  .footer-links { display: none; }
  .footer-copy { padding-bottom: 76px; }
  .backtop { bottom: 130px; right: 14px; }
  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    background: #fff; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  }
  .mobile-bar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 0 6px; font-size: 0.6875rem; color: var(--text-secondary);
  }
  .mobile-bar a .bi { font-size: 1.25rem; }
  .mobile-bar a.primary { color: var(--primary); }
}
@media (max-width: 560px) {
  /* 首页产品网格窄屏单列 */
  .prod-grid { grid-template-columns: 1fr; }
  .prod-card.sg-card .prod-meta { display: flex; }
}
.mobile-cat { display: none; }

/* ===== 表单：语言 Tab / 图片上传 / Markdown 编辑器 ===== */
.lang-tab-group { display: inline-flex; flex-wrap: wrap; border-bottom: 1px solid #E6E9EF; }
.lang-tab { position: relative; padding: 8px 18px; border: none; background: transparent; color: #595959; font-size: 14px; cursor: pointer; transition: color .2s; }
.lang-tab:hover { color: #2769DC; }
.lang-tab.active { color: #2769DC; font-weight: 500; }
.lang-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #2769DC; }
.lang-tab[disabled], .lang-tab[aria-disabled="true"] { color: #bfbfbf; cursor: not-allowed; }
.lang-tab[disabled]:hover, .lang-tab[aria-disabled="true"]:hover { color: #bfbfbf; }
.lang-badge { display: inline-block; padding: 0 8px; font-size: 12px; line-height: 20px; border-radius: 3px; background: #EAF1FC; color: #2769DC; border: 1px solid #B7CCF2; }

.img-upload { display: block; }
.img-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.img-cell { position: relative; width: 96px; height: 96px; border-radius: 4px; overflow: hidden; border: 1px solid #E6E9EF; background: #fafafa; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-cell.uploading { display: flex; align-items: center; justify-content: center; }
.img-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 18px; text-align: center; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; padding: 0; }
.img-del:hover { background: #FF3131; }
.img-add-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px dashed #CFD3D8; border-radius: 4px; background: #fff; color: #595959; font-size: 13px; cursor: pointer; }
.img-add-btn:hover { border-color: #2769DC; color: #2769DC; }
.img-spin { width: 22px; height: 22px; border: 3px solid #E6E9EF; border-top-color: #2769DC; border-radius: 50%; animation: imgspin .8s linear infinite; }
@keyframes imgspin { to { transform: rotate(360deg); } }

.md-editor { border: 1px solid #CFD3D8; border-radius: 4px; overflow: hidden; background: #fff; }
.md-editor:focus-within { border-color: #2769DC; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px; background: #fafafa; border-bottom: 1px solid #E6E9EF; }
.md-tool { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #595959; font-size: 13px; cursor: pointer; }
.md-tool:hover { background: #EAF1FC; border-color: #B7CCF2; color: #2769DC; }
.md-editor textarea { display: block; width: 100%; border: none; outline: none; resize: vertical; min-height: 180px; padding: 12px 14px; font-size: 14px; line-height: 1.8; font-family: Consolas, Menlo, "Courier New", monospace; }

/* Markdown 渲染 */
.md-body h2, .md-body h3, .md-body h4 { margin: 18px 0 10px; font-weight: 600; color: var(--heading, #262626); }
.md-body h2 { font-size: 1.25rem; } .md-body h3 { font-size: 1.125rem; } .md-body h4 { font-size: 1rem; }
.md-body p { margin: 0 0 10px; }
.md-body ul, .md-body ol { margin: 0 0 12px; padding-left: 22px; }
.md-body li { margin-bottom: 4px; }
.md-body a { color: #2769DC; } .md-body a:hover { color: #3F85FF; }
.md-body code { background: #f5f5f5; border: 1px solid #E6E9EF; border-radius: 3px; padding: 1px 6px; font-size: .875em; font-family: Consolas, Menlo, monospace; }
.md-body hr { border: none; border-top: 1px solid #E6E9EF; margin: 16px 0; }

/* 详情页图片画廊 */
.detail-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 20px 24px; }
.dg-item { display: block; border-radius: 4px; overflow: hidden; border: 1px solid #E6E9EF; margin:auto; }
.dg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
