/* ============ russia-b2b 客户前台样式（批发报价平台） ============ */
:root {
  /* 品牌色取自平台 logo 的蓝 → 青渐变 */
  --brand: #1557e6;
  --brand-2: #2b8bff;
  --brand-cyan: #22d3ee;
  --grad: linear-gradient(135deg, #1557e6 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(21,87,230,.10), rgba(34,211,238,.10));

  --primary: #1557e6;
  --primary-dark: #0f42b8;
  --accent: #22d3ee;
  --navy: #06203f;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #0f1b2d;
  --muted: #6b7a90;
  --border: #e6ebf3;
  --green: #14a05a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 14px rgba(15, 27, 45, .05);
  --shadow-lg: 0 18px 44px rgba(15, 27, 45, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(16, 24, 40, 0.04);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #3b8bff);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.brand .logo span { font-size: 16px; }
.topbar-search {
  flex: 1; max-width: 420px; position: relative;
}
.topbar-search input {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 14px 0 38px; font-size: 14px; outline: none; background: var(--bg);
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; }
.topbar-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; }
.topbar-rate {
  font-size: 12px; color: var(--muted); text-align: right; line-height: 1.3;
}
.topbar-rate b { color: var(--text); font-weight: 600; }

/* 语言切换 */
.lang-switch {
  display: inline-flex; align-items: center; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px;
}
.lang-switch button {
  border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 5px 12px; border-radius: 6px; transition: all 0.15s;
}
.lang-switch button.active { background: var(--primary); color: #fff; }
.lang-switch button:not(.active):hover { color: var(--text); }

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px 0 40px; }

/* ---------- 分类侧栏 ---------- */
.sidebar { align-self: start; }
.sidebar-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 0; position: sticky; top: 84px;
}
.cat-title {
  padding: 10px 16px; font-weight: 700; font-size: 13px; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.04em;
}
.cat-item { list-style: none; }
.cat-item a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 16px; font-size: 14px; color: var(--text); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cat-item a:hover { background: #f0f4fb; }
.cat-item a.active { background: #e8f1fe; color: var(--primary); font-weight: 600; }
.cat-item .name { display: flex; align-items: center; gap: 8px; flex: 1; }
.cat-item .arrow { font-size: 11px; color: var(--muted); transition: transform 0.2s; }
.cat-item.open > a .arrow { transform: rotate(90deg); }
.cat-count {
  font-size: 11px; color: var(--muted); background: #eef1f5; border-radius: 20px;
  padding: 1px 8px; font-weight: 600; min-width: 22px; text-align: center;
}
.cat-item a.active .cat-count { background: #cfe2fb; color: var(--primary); }
.subcats { list-style: none; padding-left: 8px; display: none; }
.cat-item.open .subcats { display: block; }
.subcats a {
  display: block; padding: 7px 16px 7px 30px; font-size: 13.5px; color: var(--muted);
  border-left: 2px solid transparent;
}
.subcats a:hover { color: var(--text); }
.subcats a.active { color: var(--primary); border-left-color: var(--primary); background: #e8f1fe; font-weight: 600; }

/* ---------- 商品区 ---------- */
.products-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.products-head h1 { font-size: 22px; font-weight: 700; }
.products-head .count { color: var(--muted); font-size: 13px; }
.products-toolbar { display: flex; align-items: center; gap: 10px; }
.sort-select {
  height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px;
  font-size: 13px; color: var(--text); background: #fff; outline: none; cursor: pointer;
}
.sort-select:focus { border-color: var(--primary); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cdd7e3; }
.card-img { aspect-ratio: 4 / 3; background: #eef1f5; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img .placeholder { font-size: 40px; color: #b8c2cf; }
.card-img .stock-badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; backdrop-filter: blur(4px);
}
.card-img .stock-badge.out { background: rgba(220, 38, 38, 0.9); color: #fff; }
.card-img .stock-badge.low { background: rgba(217, 119, 6, 0.92); color: #fff; }
.card-body { padding: 14px 16px 16px; }
.card-name { font-size: 15px; font-weight: 600; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-spec { font-size: 15px; font-weight: 700; color: var(--text); margin: 8px 0 2px; }
.spec-line { display: inline-block; font-size: 16px; font-weight: 700; color: var(--text); background: #eef2f6; border-radius: 8px; padding: 4px 14px; margin-bottom: 12px; }
.card-stock { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.card-stock .in { color: var(--green); font-weight: 600; }
.card-stock .out { color: var(--danger); font-weight: 600; }
.card-price { display: flex; flex-direction: column; gap: 2px; }
.price-cny { font-size: 17px; font-weight: 700; color: var(--text); }
.price-cny small { font-size: 12px; font-weight: 500; color: var(--muted); }
.price-rub { font-size: 14px; color: var(--primary); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  border-radius: 8px; padding: 10px 18px; transition: background 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #e8f1fe; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 10px; }

/* ---------- 详情页 ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--primary); }
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding: 20px 0 40px; align-items: start; }
.detail-img { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.detail-img img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.detail-info h1 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.chip { background: #eef2f6; border-radius: 20px; padding: 5px 13px; font-size: 13px; color: var(--text); }
.chip.stock-in { background: #e7f6ec; color: var(--green); font-weight: 600; }
.chip.stock-out { background: #fdeaea; color: var(--danger); font-weight: 600; }
.price-box {
  background: #f0f6ff; border: 1px solid #d6e6fb; border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px;
}
.price-box .row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; }
.price-box .label { color: var(--muted); font-size: 14px; }
.price-box .val { font-size: 22px; font-weight: 800; }
.price-box .val.rub { color: var(--primary); }
.price-box .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.desc { margin-top: 28px; }
.desc h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.rich { color: #2a2f36; font-size: 15px; }
.rich img { max-width: 100%; border-radius: 8px; }
.rich h1, .rich h2, .rich h3 { margin: 14px 0 8px; }
.rich p { margin: 8px 0; }
.rich ul, .rich ol { margin: 8px 0 8px 22px; }
.rich table { border-collapse: collapse; margin: 10px 0; }
.rich td, .rich th { border: 1px solid var(--border); padding: 6px 10px; }

/* ---------- 底部提示 ---------- */
.footnote {
  background: #fff8ec; border: 1px solid #f3e0bd; border-radius: var(--radius);
  padding: 14px 18px; font-size: 13px; color: #8a6d1a; margin-top: 22px; line-height: 1.6;
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.2s ease;
}
@keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.modal-close { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; border: none; background: none; }
.modal-body { padding: 20px 22px; max-height: 70vh; overflow: auto; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  font-size: 15px; outline: none; background: #fff; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,107,203,0.12); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.order-summary { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin: 10px 0 4px; }
.order-summary .row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.order-summary .total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-weight: 700; }

/* 成功弹窗 */
.success-box { text-align: center; padding: 10px 6px 6px; }
.success-box .check {
  width: 64px; height: 64px; border-radius: 50%; background: #e7f6ec; color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 16px;
}
.success-box h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.success-box p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.success-box .order-no { display: inline-block; background: var(--bg); border-radius: 8px; padding: 6px 14px; font-weight: 700; margin-top: 8px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--card); padding: 22px 0; margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }

/* ---------- 合规页脚 ---------- */
.footer-inner.footer-stack { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 13px; }
.footer-links a { color: var(--primary); }
.footer-links a:hover { text-decoration: underline; }
.footer-role { font-size: 12.5px; color: #6b7280; line-height: 1.7; max-width: 720px; }
.platform-notice {
  background: #fff8e6; border: 1px solid #f5dfa8; border-radius: 8px; padding: 10px 14px;
  font-size: 12.5px; color: #6b4a00; line-height: 1.7; margin-top: 14px;
}
.platform-notice b { color: #8a5a00; }

/* ---------- 加载 ---------- */
.loading { text-align: center; padding: 60px 20px; color: var(--muted); }
.spinner {
  width: 34px; height: 34px; border: 3px solid #e2e8f0; border-top-color: var(--primary);
  border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 骨架屏 ---------- */
.skeleton-card { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--border); }
.skeleton { background: linear-gradient(90deg, #eef1f5 25%, #e2e7ed 37%, #eef1f5 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.skeleton-img { aspect-ratio: 4 / 3; }
.skeleton-line { height: 14px; border-radius: 6px; margin: 12px 16px; }
.skeleton-line.short { width: 55%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 10px 0; }
  .topbar-search { order: 3; max-width: 100%; flex-basis: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .price-cny { font-size: 15px; }
  .price-rub { font-size: 13px; }
  .container { padding: 0 14px; }
  .modal { max-width: 100%; }
  .brand { font-size: 16px; }
}

/* ============================================================
   品牌升级（v1.3.0）· 高端化视觉
   ============================================================ */

/* ---------- 顶栏：毛玻璃 + 细分割线 ---------- */
.topbar {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 27, 45, .07);
  box-shadow: none;
}
.topbar-inner { height: 66px; }
.topbar::after {
  content: ''; display: block; height: 2px;
  background: var(--grad); opacity: .85;
}

/* ---------- 品牌标 ---------- */
.brand { font-weight: 800; font-size: 19px; letter-spacing: -.012em; gap: 11px; }
.brand .logo,
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; object-fit: contain; display: block;
  flex: 0 0 auto;
}
.brand-mark { filter: drop-shadow(0 6px 14px rgba(21, 87, 230, .26)); }
.brand .logo {
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 16px rgba(21, 87, 230, .30);
}

.topbar-search input {
  height: 42px; border-radius: 11px; background: rgba(15, 27, 45, .04);
  border-color: transparent; font-size: 14.5px;
}
.topbar-search input:focus {
  background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 87, 230, .10);
}
.topbar-rate { font-size: 12.5px; line-height: 1.45; }
.topbar-rate b { color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 按钮：渐变 + 悬浮上浮 ---------- */
.btn { border-radius: 11px; padding: 11px 20px; font-weight: 650; transition: all .18s ease; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 18px rgba(21, 87, 230, .26);
}
.btn-primary:hover {
  background: var(--grad); filter: brightness(1.06);
  transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21, 87, 230, .32);
}
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: #f7faff; transform: translateY(-1px); }

/* ---------- 分类侧栏 ---------- */
.sidebar-card { border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cat-title {
  padding: 15px 18px 11px; letter-spacing: .06em; font-size: 11.5px; font-weight: 800;
  color: #8b9ab2; border-bottom: 1px solid var(--border);
}
.cat-item a { padding: 10px 18px; border-left: 3px solid transparent; }
.cat-item a:hover { background: #f6f9ff; }
.cat-item a.active {
  background: var(--grad-soft); color: var(--brand); font-weight: 700;
  border-left-color: var(--brand);
}
.cat-count { border-radius: 999px; font-variant-numeric: tabular-nums; }
.subcats a { padding-left: 34px; }
.subcats a.active { background: var(--grad-soft); }

/* ---------- 商品卡 ---------- */
.grid { gap: 20px; }
.card {
  border-radius: 16px; box-shadow: var(--shadow); border-color: rgba(15, 27, 45, .07);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 27, 45, .16);
  border-color: rgba(21, 87, 230, .28);
}
.card-body { padding: 15px 17px 17px; }
.card-name { font-size: 15.5px; font-weight: 650; letter-spacing: -.008em; }
.card-spec {
  display: inline-block; font-size: 13.5px; font-weight: 700; color: var(--brand);
  background: var(--grad-soft); border-radius: 8px; padding: 3px 10px; margin: 9px 0 4px;
}
.card-img { background: linear-gradient(135deg, #f2f6fc, #e9eff8); }
.card-img .stock-badge { border-radius: 999px; letter-spacing: .01em; }
.price-cny { font-size: 18px; font-weight: 800; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.price-rub {
  font-size: 14px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* ---------- 详情页 ---------- */
.detail-img { border-radius: 18px; box-shadow: var(--shadow); }
.detail-info h1 { font-size: 27px; letter-spacing: -.02em; }
.spec-line {
  border-radius: 10px; background: var(--grad-soft); color: var(--brand);
  font-size: 16px; font-weight: 800; padding: 6px 16px;
}
.price-box {
  background: linear-gradient(135deg, #f3f8ff, #eef9fd);
  border: 1px solid rgba(21, 87, 230, .16); border-radius: 16px;
  box-shadow: 0 6px 20px rgba(21, 87, 230, .07);
}
.price-box .val { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price-box .val.rub { color: var(--brand); }
.chip { border-radius: 999px; font-weight: 600; }

/* ---------- 弹窗 ---------- */
.modal { border-radius: 20px; box-shadow: 0 28px 70px rgba(15, 27, 45, .28); }
.modal-head { font-size: 17.5px; font-weight: 750; letter-spacing: -.01em; }
.modal-mask { backdrop-filter: blur(3px); }
.form-group input, .form-group textarea, .form-group select { border-radius: 10px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21, 87, 230, .11);
}
.success-box .check {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 26px rgba(21, 87, 230, .30);
}

/* ---------- 报价提示 / 合规提示 ---------- */
.footnote {
  background: #fbfdff; border: 1px solid rgba(21, 87, 230, .16); color: #3f5a7d;
  border-radius: 12px;
}
.platform-notice {
  background: #fffaf0; border: 1px solid #f6e3b4; border-radius: 12px; color: #7a5a10;
}
.platform-notice b { color: #8a5a00; }
.platform-notice a { color: var(--brand); text-decoration: underline; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid rgba(15, 27, 45, .07);
  background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
  margin-top: 40px; padding: 30px 0 26px;
}
.footer-links a { font-weight: 600; }

/* ---------- 骨架屏 / 加载 ---------- */
.spinner { border-width: 3px; border-top-color: var(--brand); }
.skeleton { background: linear-gradient(90deg, #eef2f8 25%, #e3eaf4 37%, #eef2f8 63%); background-size: 400% 100%; }

/* ---------- 滚动条（桌面） ---------- */
@media (min-width: 901px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: #ccd6e4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background: #aebdd2; background-clip: content-box; }
  ::-webkit-scrollbar-track { background: transparent; }
}
