/* ============================================================
   B2B 光学元件商城 — 设计系统「浅色商务 · 深藏青」
   白/浅灰底 + 深藏青品牌色，干净克制的正式商务风（对标光品汇）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ---- 底色 ---- */
  --bg: #F5F6F8;              /* 页面底 */
  --panel: #FFFFFF;           /* 卡片/面板纯白 */
  --panel-2: #F8FAFC;         /* 表头/隔行浅灰 */
  --panel-3: #EEF2F7;         /* hover/强调浅底 */

  /* ---- 品牌主色：深藏青 ---- */
  --accent: #1B3A6B;
  --accent-dark: #16325C;
  --accent-soft: #EAF0F9;     /* hover/浅底 */
  --accent-border: #B8C9E0;

  /* ---- 价格 / 关键 CTA：沉稳红橙（克制使用） ---- */
  --warm: #D44000;
  --warm-dark: #B33600;
  --warm-soft: #FDEEE6;
  --warm-border: rgba(212, 64, 0, .3);

  /* ---- 语义色 ---- */
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --danger-soft: #FDECEC;

  /* ---- 文字三级 ---- */
  --text: #1F2937;
  --text-mid: #4B5563;
  --text-light: #9CA3AF;

  /* ---- 描边 / 阴影 ---- */
  --border: #E5E8EE;
  --border-strong: #D4DAE3;
  --shadow-card: 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-hover: 0 4px 12px rgba(16, 24, 40, .08);

  /* ---- 排版 ---- */
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 6px;
  --radius-sm: 4px;

}

/* ============ 基础 ============ */
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
ul, li { list-style: none; }
::selection { background: rgba(27, 58, 107, .18); color: var(--text); }

/* 滚动条（浅色） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C9D2DE; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #AEB9C8; }
::-webkit-scrollbar-track { background: transparent; }

input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

.wrap { width: 1280px; max-width: 100%; margin: 0 auto; padding: 0 16px; }

/* 英文 eyebrow 小标（标题上方字距拉开） */
.eyebrow {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* 等宽数字 */
.num, .price, .total-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ============ 顶部细条（浅灰） ============ */
.top-strip { background: var(--panel-2); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-light); }
.top-strip-inner { display: flex; align-items: center; height: 34px; }
.top-strip-inner .spacer { flex: 1; }
.top-strip-inner a { color: var(--text-mid); margin-left: 18px; }
.top-strip-inner a:hover { color: var(--accent); }
.top-strip-inner a.active { color: var(--accent); font-weight: 600; }
.top-strip-inner .u-phone { color: var(--accent); font-weight: 600; font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ============ 页头（白底 + 细下边框） ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.header-inner { display: flex; align-items: center; gap: 34px; height: 72px; }
.logo { font-size: 22px; font-weight: 700; color: var(--accent); white-space: nowrap; display: flex; align-items: baseline; gap: 8px; }
.logo b { color: var(--accent); }
.logo small { font-size: 10px; font-weight: 600; color: var(--text-light); letter-spacing: .24em; font-family: var(--font-num); }
.logo:hover { color: var(--accent-dark); }
.main-nav { display: flex; flex: 1; }
.main-nav a { position: relative; color: var(--text-mid); font-size: 15px; padding: 8px 16px; line-height: 56px; white-space: nowrap; flex-shrink: 0; }
.main-nav a:hover { color: var(--accent); }
.main-nav a.active { color: var(--accent); font-weight: 700; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 8px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.header-search {
  display: flex; width: 260px; height: 36px; flex-shrink: 0;
  border: 1px solid transparent; border-radius: 18px; overflow: hidden;
  background: var(--panel-3);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27, 58, 107, .1); }
.header-search input { flex: 1; border: none; background: transparent; padding: 0 14px; font-size: 13px; color: var(--text); outline: none; min-width: 0; }
.header-search input::placeholder { color: var(--text-light); }
.header-search button {
  width: 58px; border: none; cursor: pointer; font-size: 13px;
  background: var(--accent); color: #fff; font-weight: 600;
  transition: background .15s;
}
.header-search button:hover { background: var(--accent-dark); }
.header-cart { position: relative; display: flex; align-items: center; gap: 6px; color: var(--text-mid); font-size: 15px; white-space: nowrap; padding: 8px 4px; }
.header-cart:hover { color: var(--accent); }
.header-cart .cart-ico { font-size: 19px; }
.cart-badge {
  position: absolute; top: -2px; left: 12px; min-width: 17px; height: 17px; line-height: 17px;
  text-align: center; background: var(--warm); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 9px; padding: 0 4px; display: none;
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
}
.cart-badge.show { display: block; }

/* ============ 页脚（深藏青底白字，正式感） ============ */
.site-footer { background: #16325C; color: rgba(255, 255, 255, .72); margin-top: 48px; }
.footer-inner { display: flex; gap: 60px; padding: 44px 16px 30px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 16px; font-weight: 600; letter-spacing: .04em; }
.footer-col li { margin-bottom: 10px; font-size: 13px; }
.footer-col a { color: rgba(255, 255, 255, .72); }
.footer-col a:hover { color: #fff; }
.footer-brand { max-width: 280px; }
.footer-brand .f-logo { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-brand .f-logo b { color: rgba(255, 255, 255, .85); }
.footer-brand p { font-size: 12px; line-height: 1.9; color: rgba(255, 255, 255, .6); }
.footer-qr { margin-left: auto; text-align: center; }
.footer-qr img { width: 104px; height: 104px; background: #fff; border-radius: var(--radius); padding: 5px; }
.footer-qr .qr-txt { font-size: 12px; margin-top: 8px; color: rgba(255, 255, 255, .6); }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, .14); text-align: center; font-size: 12px; color: rgba(255, 255, 255, .5); padding: 16px; }
.footer-copy a { color: rgba(255, 255, 255, .6); text-decoration: none; }
.footer-copy a:hover { color: rgba(255, 255, 255, .85); text-decoration: underline; }

/* ============ 布局容器 ============ */
.container { width: 1280px; max-width: 100%; margin: 20px auto; padding: 0 16px; }

/* ============ 首页 Hero（通栏浅色带：左文右图，仅 index.html 用） ============ */
.hero { background: #fff; border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; align-items: center; gap: 48px; min-height: 450px; padding-top: 36px; padding-bottom: 36px; }
.hero-text { flex: 1; min-width: 0; max-width: 580px; }
.hero-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; color: var(--text); letter-spacing: .02em; margin: 12px 0 10px; line-height: 1.3; }
.hero-sub { font-size: 14px; color: var(--text-mid); max-width: 520px; line-height: 1.8; }
/* 加大搜索框：白底 6px 圆角，按钮藏青实底（复用 .header-search 基座） */
.hero-search { width: min(400px, 100%); height: 46px; margin-top: 24px; border-radius: 6px; background: #fff; border: 1px solid var(--border-strong); }
.hero-search button { width: 84px; font-size: 14px; }
.hero-stats { margin-top: 16px; font-size: 13px; color: var(--text-light); }
.hero-stats b { color: var(--accent); font-weight: 700; font-family: var(--font-num); font-variant-numeric: tabular-nums; padding: 0 1px; }
/* 右侧图区：独立浅灰蓝面板，图完整 contain 展示，不用渐变遮罩 */
.hero-img {
  width: 44%; flex-shrink: 0; height: 340px;
  background: #F0F2F5; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; align-items: center; justify-content: center;
}
.hero-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
/* hero 轮播：多张图淡入淡出，圆点切换，悬停暂停 */
.hero-carousel { position: relative; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: inherit; box-sizing: border-box; object-fit: contain;
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.hero-slide.on { opacity: 1; pointer-events: auto; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 10px; }
.hero-dots i { width: 13px; height: 13px; border-radius: 50%; background: #C9CFD9; cursor: pointer; transition: background .3s; }
.hero-dots i.on { background: var(--accent); }

/* ============ 分类分区 / 分类卡片（分类组织重构用） ============ */
/* .cat-sec：一个一级/二级分类的分区块，标题深藏青 + 英文/数量副标 */
.cat-sec { margin-bottom: 40px; }
.cat-sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cat-sec-title { font-size: 20px; font-weight: 700; color: var(--accent); display: flex; align-items: baseline; gap: 10px; }
.cat-sec-title::before { content: ""; width: 4px; height: 17px; background: var(--accent); border-radius: 2px; align-self: center; }
.cat-sec-title small { font-size: 12px; font-weight: 400; color: var(--text-light); letter-spacing: .12em; font-family: var(--font-num); }
.cat-sec-more { margin-left: auto; font-size: 13px; color: var(--accent); }
.cat-sec-more:hover { color: var(--accent-dark); text-decoration: underline; }

/* .cat-cards：分类卡片网格；图区固定高度浅灰底 contain，任何比例图都整齐一致 */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-card {
  background: #fff; border: 1px solid #E5E8EE; border-radius: var(--radius);
  overflow: hidden; display: block;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.cat-card-img { height: 120px; background: #F7F8FA; border-bottom: 1px solid var(--border); padding: 12px; }
.cat-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cat-card-name { padding: 10px 12px 2px; font-size: 14px; font-weight: 600; color: var(--text); text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cat-card:hover .cat-card-name { color: var(--accent); }
.cat-card-count { padding: 0 12px 10px; font-size: 12px; color: var(--text-light); text-align: center; font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ============ 产品中心模块（参考光品汇：居中标题两侧短横条 + 一级分类卡片，左文右图） ============ */
.pc-block { padding: 34px 0 6px; }
.pc-title { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 28px; }
.pc-title::before, .pc-title::after { content: ""; width: 25px; height: 3px; background: var(--accent); }
.pc-title span { font-size: 24px; font-weight: 600; color: var(--text); }
.pc-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pc-card {
  display: flex; align-items: center; justify-content: space-between;
  height: 158px; background: #F6F6F6; border: 1px solid #F6F6F6; border-radius: 10px;
  overflow: hidden; transition: border-color .3s;
}
.pc-card:hover { border-color: var(--accent); }
.pc-card-txt { padding: 19px 0 19px 20px; min-width: 0; }
.pc-card-name { font-size: 18px; font-weight: 500; color: var(--text); line-height: 26px; }
.pc-card:hover .pc-card-name { color: var(--accent); }
.pc-card-count { font-size: 12px; color: var(--text-mid); line-height: 18px; margin-top: 4px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.pc-card-img { width: 130px; height: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding-right: 12px; }
.pc-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .4s; }
.pc-card:hover .pc-card-img img { transform: scale(1.12); }

/* ============ 骨架屏（浅色 shimmer） ============ */
.product-grid { min-height: 320px; }
.skel-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skel-card .sk-img { aspect-ratio: 4/3; }
.skel-card .sk-line { height: 12px; margin: 12px 14px; border-radius: 4px; }
.sk-img, .sk-line {
  background: linear-gradient(90deg, #EFF2F6 25%, #F8FAFC 37%, #EFF2F6 63%);
  background-size: 400% 100%;
  animation: skShimmer 1.2s ease infinite;
}
@keyframes skShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.grid-fade { animation: gridFade .2s ease; }
@keyframes gridFade { from { opacity: 0; } to { opacity: 1; } }

/* ============ 产品网格 / 产品卡 ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.product-card .img-wrap { aspect-ratio: 4/3; background: var(--panel-2); display: block; border-bottom: 1px solid var(--border); }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 12px 14px 14px; }
.product-card .name { font-size: 15px; font-weight: 700; color: var(--text); display: block; margin-bottom: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-card .name:hover { color: var(--accent); }
.product-card .summary { font-size: 12px; color: var(--text-light); height: 34px; overflow: hidden; line-height: 17px; }
.product-card .price { color: var(--warm); font-weight: 700; margin-top: 8px; font-size: 17px; }
.product-card .price small { font-size: 12px; font-weight: 400; color: var(--text-light); }

/* ============ 面板 / 表格 ============ */
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-card);
}
.panel h2 { font-size: 17px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.panel h2 .h2-bar { display: inline-block; width: 4px; height: 16px; background: var(--accent); border-radius: 2px; margin-right: 8px; vertical-align: -2px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
table.data th { background: var(--panel-2); color: var(--text-mid); font-weight: 600; white-space: nowrap; }
table.data td { color: var(--text); }
table.data tbody tr:nth-child(even) { background: #FAFBFC; }
table.data tbody tr:hover { background: var(--accent-soft); }

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  border: none; padding: 9px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.outline { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.outline:hover { background: var(--accent-soft); color: var(--accent); }
.btn.warm { background: var(--warm); color: #fff; }
.btn.warm:hover { background: var(--warm-dark); color: #fff; }
.btn.gray { background: var(--panel-3); color: var(--text-mid); }
.btn.gray:hover { background: #E2E8F0; color: var(--text); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn.small { padding: 4px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn:disabled { background: var(--panel-3); color: var(--text-light); cursor: not-allowed; border: none; }
.btn:disabled:hover { background: var(--panel-3); color: var(--text-light); }

/* ============ 表单 ============ */
input[type=text], input[type=number], input[type=password], input[type=tel], select, textarea {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 8px 12px; font-size: 14px; width: 100%; font-family: inherit;
  background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, .1);
}
select option { background: #fff; color: var(--text); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--text-mid); }
.form-inline { display: flex; gap: 10px; }
.form-inline > * { flex: 1; }

/* ============ 弹窗（白底浅阴影） ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
  width: 440px; max-width: 92vw; max-height: 86vh; overflow: auto;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .16);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 14px; font-size: 16px; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal h3::before { content: ""; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; margin-right: 8px; }
.modal h3 .modal-close { font-size: 20px; line-height: 1; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0 2px; }
.modal h3 .modal-close:hover { color: var(--text); }
.modal .modal-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: flex-end; }

/* ============ 提示：toast / empty / badge ============ */
.toast {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 10px 22px; border-radius: var(--radius); font-size: 14px; z-index: 200;
  display: none;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
}
.toast.show { display: block; animation: toastIn .18s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.empty { text-align: center; color: var(--text-light); padding: 40px 0; font-size: 14px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.badge.warn { background: #FFF6E8; color: var(--warning); border-color: rgba(217, 119, 6, .3); }
.badge.done { background: #EAF7EF; color: var(--success); border-color: rgba(22, 163, 74, .3); }
.badge.info { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 38, 38, .3); }

/* ============ 产品详情 ============ */
.detail-top { display: flex; gap: 28px; }
.detail-top .gallery { width: 420px; flex-shrink: 0; }
.detail-top .gallery .main-img { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); aspect-ratio: 4/3; overflow: hidden; }
.detail-top .gallery .main-img img { width: 100%; height: 100%; object-fit: contain; }
.detail-top .gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; }
.detail-top .gallery .thumbs img { width: 68px; height: 51px; object-fit: cover; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s; }
.detail-top .gallery .thumbs img:hover { border-color: var(--border-strong); }
.detail-top .gallery .thumbs img.active { border-color: var(--accent); }
.detail-info h1 { font-size: 22px; margin-bottom: 12px; color: var(--text); }
.detail-info .summary {
  background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); color: var(--text-mid);
  padding: 12px 14px; margin-bottom: 16px; line-height: 1.7; font-size: 13px;
}
.detail-info .desc { white-space: pre-line; line-height: 1.9; font-size: 14px; color: var(--text-mid); }
.detail-info .desc-tip { margin-top: 16px; font-size: 13px; color: var(--text-light); }

/* 详情页选项卡 */
.detail-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--panel); border-radius: var(--radius) var(--radius) 0 0; padding: 0 10px; }
.detail-tabs button { padding: 14px 22px; font-size: 15px; color: var(--text-mid); cursor: pointer; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; background: transparent; transition: color .15s; }
.detail-tabs button:hover { color: var(--text); }
.detail-tabs button.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.detail-tab-body { background: var(--panel); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 24px; margin-bottom: 16px; min-height: 120px; }
.detail-tab-pane { display: none; }
.detail-tab-pane.show { display: block; }

/* 型号参数表 */
table.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
table.spec th {
  background: var(--panel-2); color: var(--text);
  font-weight: 600; border: 1px solid var(--border-strong);
  padding: 10px 12px; text-align: left; white-space: nowrap;
}
table.spec td { border: 1px solid var(--border); padding: 8px 12px; color: var(--text); }
table.spec tbody tr:nth-child(even) { background: #FAFBFC; }
table.spec tbody tr:hover { background: var(--accent-soft); }
table.spec .price-cell { color: var(--warm); font-weight: 700; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
table.spec .qty-input { width: 64px; text-align: center; padding: 5px 6px; }

/* 图文 / 曲线说明组 */
.section-block { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px dashed var(--border); align-items: flex-start; }
.section-block:last-child { border-bottom: none; }
.section-block img { width: 340px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.section-block .text { flex: 1; line-height: 1.9; font-size: 14px; color: var(--text-mid); white-space: pre-line; }

/* ============ 购物车 / 订单 ============ */
.cart-table td .p-name { color: var(--text); }
.cart-table td .p-name:hover { color: var(--accent); }
.cart-footer { display: flex; align-items: center; margin-top: 18px; gap: 16px; justify-content: flex-end; }
.cart-footer .total-num { color: var(--warm); font-size: 22px; font-weight: 700; }
.order-card { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow-card); transition: border-color .15s; }
.order-card:hover { border-color: var(--border-strong); }
.order-card .order-head { background: var(--panel-2); border-bottom: 1px solid var(--border); padding: 10px 16px; font-size: 13px; display: flex; gap: 24px; flex-wrap: wrap; color: var(--text-mid); }
.order-card .order-head .amt { color: var(--warm); font-weight: 700; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.order-card table.data { border: none; }
.order-card table.data td { border: none; border-bottom: 1px solid var(--border); }
.order-card .order-foot { padding: 10px 16px; font-size: 13px; color: var(--text-light); }

/* ============ 登录 / 注册 ============ */
.login-box {
  max-width: 420px; margin: 56px auto;
  background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 30px 34px 34px;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}
.login-box .tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.login-box .tabs a { flex: 1; text-align: center; padding: 12px 4px; font-size: 15px; color: var(--text-light); cursor: pointer; transition: color .15s; }
.login-box .tabs a:hover { color: var(--text-mid); }
.login-box .tabs a.active { color: var(--accent); font-weight: 600; border-bottom: 2px solid var(--accent); }
.login-box .sub-link { text-align: right; margin: -6px 0 12px; font-size: 13px; }

/* ============ 个人中心 ============ */
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head .avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.profile-head .p-phone { font-size: 18px; font-weight: 700; color: var(--text); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.profile-head .p-company { color: var(--text-mid); margin-top: 4px; font-size: 14px; }
.profile-head .p-meta { color: var(--text-light); font-size: 12px; margin-top: 4px; }

/* ============ 收货地址簿 ============ */
.addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.addr-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; position: relative; background: var(--panel);
  transition: border-color .15s, box-shadow .15s;
}
.addr-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.addr-card.default { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(27, 58, 107, .12); }
.addr-card .addr-name { font-size: 15px; font-weight: 600; color: var(--text); }
.addr-card .addr-name .badge { margin-left: 8px; }
.addr-card .addr-phone { color: var(--text-mid); font-size: 13px; margin-left: 10px; font-weight: 400; font-family: var(--font-num); }
.addr-card .addr-text { color: var(--text-mid); font-size: 13px; line-height: 1.7; margin: 8px 0 10px; min-height: 22px; }
.addr-card .addr-ops { display: flex; gap: 12px; font-size: 13px; }
.addr-card .addr-ops button { color: var(--text-light); cursor: pointer; border: 0; padding: 0; background: transparent; font: inherit; }
.addr-card .addr-ops button:hover { color: var(--accent); }
.addr-add {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  width: 100%; color: var(--text-mid); font-size: 14px; cursor: pointer; min-height: 120px;
  background: var(--panel);
  transition: border-color .15s, color .15s, background .15s;
}
.addr-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ============ 后台布局（侧边栏深藏青底白字，内容区浅灰底白卡） ============ */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side { width: 200px; background: var(--accent-dark); color: rgba(255, 255, 255, .75); flex-shrink: 0; }
.admin-side .brand { padding: 18px 16px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.admin-side a { display: block; padding: 12px 16px; color: rgba(255, 255, 255, .75); font-size: 14px; cursor: pointer; border-left: 3px solid transparent; transition: background .15s, color .15s; }
.admin-side a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-side a.active { background: rgba(255, 255, 255, .12); border-left-color: #fff; color: #fff; font-weight: 600; }
.admin-main { flex: 1; padding: 20px; min-width: 0; background: var(--bg); }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .15s, box-shadow .15s;
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--accent); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.stat-card .label { color: var(--text-light); font-size: 13px; margin-top: 4px; }
.img-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.img-list .img-item { position: relative; }
.img-list img { width: 90px; height: 68px; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.img-list .del { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 12px; line-height: 18px; text-align: center; cursor: pointer; border: none; }
.editor-block { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--panel); }

/* ============ 后台分类树管理 ============ */
.cat-admin-tree { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 14px; background: var(--panel); }
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: var(--accent-soft); }
.cat-row .cat-toggle { width: 20px; height: 20px; line-height: 20px; text-align: center; cursor: pointer; color: var(--text-light); font-size: 12px; flex-shrink: 0; user-select: none; border-radius: 4px; }
.cat-row .cat-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.cat-row .cat-toggle.leaf { cursor: default; background: none; }
.cat-admin-thumb { width: 42px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-light); font-size: 11px; }
.cat-admin-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cat-row .cat-name { font-weight: 600; color: var(--text); }
.cat-row.depth-2 .cat-name { font-weight: 400; color: var(--text-mid); }
.cat-row .cat-count { font-size: 12px; color: var(--text-light); }
.cat-row .cat-sort { font-size: 12px; color: var(--text-light); margin-left: auto; white-space: nowrap; }
.cat-row .cat-ops { display: flex; gap: 6px; flex-shrink: 0; }
.cat-children .cat-row { position: relative; }
.cat-children .cat-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--border); }
.cat-image-editor { display: flex; gap: 12px; align-items: center; }
.cat-image-preview { width: 128px; height: 96px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-light); font-size: 12px; }
.cat-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.cat-image-actions { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.cat-image-actions input[type="file"] { max-width: 100%; }

/* ============ 后台产品分类浏览 ============ */
.admin-product-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-result-count { color: var(--text-light); font-size: 13px; font-variant-numeric: tabular-nums; }
.admin-product-toolbar {
  display: grid; grid-template-columns: minmax(170px, .8fr) minmax(190px, 1fr) minmax(240px, 1.4fr) auto;
  align-items: end; gap: 12px; margin-bottom: 16px;
}
.admin-product-toolbar .form-row { margin-bottom: 0; }
.product-filter-reset { min-height: 38px; white-space: nowrap; }
.admin-product-table-wrap { overflow-x: auto; }
.admin-product-table { min-width: 760px; }
.category-path { display: block; line-height: 1.5; }

/* ============ 动效降级 ============ */
@media (prefers-reduced-motion: reduce) {
  .grid-fade, .sk-img, .sk-line, .modal, .toast.show { animation: none; }
  .btn, .product-card, .cat-card, .main-nav a, .header-search, input, select, textarea { transition: none; }
}

/* ============ 响应式（≤900px） ============ */
@media (max-width: 900px) {
  .detail-top { flex-direction: column; }
  .detail-top .gallery { width: 100%; }
  .detail-tabs { overflow-x: auto; scrollbar-width: thin; }
  .detail-tabs button { flex: 0 0 auto; }
  .top-strip-inner .welcome { display: none; }
  .top-strip-inner { justify-content: flex-end; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 12px; }
  .logo { font-size: 19px; }
  .logo small { display: none; }
  .header-cart { margin-left: auto; }
  .header-search { flex: 0 0 100%; order: 4; width: auto; }
  .main-nav { flex: 0 0 100%; order: 5; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--border); }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { line-height: 40px; padding: 4px 10px; }
  .main-nav a.active::after { bottom: 4px; }
  .footer-inner { flex-wrap: wrap; gap: 28px; }
  .footer-qr { margin-left: 0; }
  .section-block { flex-direction: column; }
  .section-block img { width: 100%; }
  .login-box { margin: 28px auto; padding: 24px 20px 26px; }
  .cat-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .cat-card-img { height: 96px; padding: 10px; }
  .pc-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pc-card { height: 110px; }
  .pc-card-txt { padding: 12px 0 12px 14px; }
  .pc-card-name { font-size: 15px; line-height: 22px; }
  .pc-card-img { width: 84px; padding-right: 8px; }
  .pc-title span { font-size: 20px; }
  .cat-admin-tree { min-width: 720px; }
  .cat-sec { margin-bottom: 30px; }
  .cat-sec-title { font-size: 17px; }
  /* Hero 移动端：纵排，标题等比缩小，图区压缩到文字下方 */
  .hero-inner { flex-direction: column; align-items: stretch; gap: 20px; min-height: 0; padding: 24px 16px 26px; }
  .hero-text { max-width: none; }
  .hero-title { font-size: 27px; }
  .hero-search { width: 100%; margin-top: 18px; }
  .hero-img { width: 100%; height: 180px; padding: 14px; }
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; display: flex; flex-wrap: wrap; }
  .admin-side a { border-left: none; }
  .admin-product-toolbar { grid-template-columns: 1fr 1fr; }
  .product-keyword-filter { grid-column: 1 / -1; }
  .product-filter-reset { justify-self: start; }
}

@media (max-width: 560px) {
  .admin-product-head { align-items: flex-start; flex-direction: column; }
  .admin-product-toolbar { grid-template-columns: 1fr; }
  .product-keyword-filter { grid-column: auto; }
  .product-filter-reset { width: 100%; }
}
