/* ============================================================
   HYSC 汽配线上平台 · 前端样式
   主色 #184469（HYSC 蓝）· B2B 专业风格 · 响应式
   ============================================================ */
:root {
  --primary: #184469;
  --primary-light: #2a5a8c;
  --primary-dark: #0f3355;
  --accent: #c8a951;
  --green: #00a651;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #c0392b;
  --radius: 8px;
  --nav-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- 顶部导航 ---------- */
.topbar { background: var(--primary-dark); color: #cfd8e3; font-size: 12px; padding: 6px 24px; display: flex; justify-content: space-between; }
.topbar a { color: #cfd8e3; margin-left: 16px; cursor: pointer; }
.topbar a:hover { color: #fff; }
.navbar { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(15,51,85,.25); }
.navbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.logo-badge { background: var(--accent); color: var(--primary-dark); border-radius: 6px; padding: 3px 8px; font-size: 13px; font-weight: 800; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.15); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.lang-select { border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; font-family: inherit; }
.lang-select option { color: #1f2d3d; background: #fff; }
.rfq-cart { background: var(--accent); color: var(--primary-dark); font-weight: 700; padding: 7px 14px; border-radius: 6px; cursor: pointer; position: relative; }
.rfq-cart .badge { background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; margin-left: 6px; }

/* ---------- 布局 ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2,1fr);} .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 600px) { .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } .navbar-inner { flex-wrap: wrap; height: auto; padding: 10px; } :root { --nav-h: 116px; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.section-title { font-size: 20px; font-weight: 700; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 20px; background: var(--primary); border-radius: 2px; }
.muted { color: var(--muted); font-size: 13px; }
.link { color: var(--primary-light); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- 首页 Banner ---------- */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%); color: #fff; padding: 48px 20px 44px; }
.hero-inner { max-width: 1280px; margin: 0 auto; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-text { min-width: 0; flex: 1; }
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.hero p { font-size: 16px; opacity: .85; margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 760px) { .hero-actions { width: 100%; } .hero-actions .btn { flex: 1; } }
.btn { display: inline-block; padding: 10px 22px; border-radius: 6px; cursor: pointer; border: none; font-size: 15px; font-weight: 600; }
.btn-primary { background: var(--accent); color: var(--primary-dark); }
.btn-primary:hover { background: #d9bc6a; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }

/* 搜索条 */
.search-bar { background: #fff; border-radius: var(--radius); padding: 8px; display: flex; gap: 8px; margin-top: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 760px; }
.search-bar input { flex: 1; border: none; outline: none; font-size: 15px; padding: 8px 12px; }
.search-bar .btn { border-radius: 6px; }
.vin-box { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border: 1px dashed rgba(255,255,255,.45); border-radius: var(--radius); padding: 10px 14px; margin-top: 14px; max-width: 760px; font-size: 13px; }
.vin-box input { background: rgba(255,255,255,.9); border: none; border-radius: 4px; padding: 6px 10px; width: 220px; }

/* 车型选择器（上移至 hero 蓝色区内） */
.vehicle-selector { background: #fff; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.25); position: relative; padding: 18px 20px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 16px 0 0; }
.vehicle-selector .field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.vehicle-selector label { font-size: 12px; color: var(--muted); font-weight: 600; }
.vehicle-selector select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: #fff; }

/* ---------- 品类导航 ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { padding: 8px 20px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border); background: #fff; font-weight: 600; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-card { display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: all .15s; }
.cat-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(24,68,105,.15); transform: translateY(-2px); }
.cat-card h4 { font-size: 15px; color: var(--primary); }
.cat-card .en { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.cat-card .count { font-size: 12px; color: var(--muted); }
.cat-icon { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }

/* ---------- 子类卡 ---------- */
.sub-card { cursor: pointer; transition: all .15s; position: relative; }
.sub-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(24,68,105,.15); }
.sub-card h5 { font-size: 14px; margin-bottom: 4px; }
.sub-card .en { font-size: 11px; color: var(--muted); }
.sub-card .meta { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.tag-blue { background: #e8f0f8; color: var(--primary); }
.tag-green { background: #e6f7ee; color: var(--green); }
.tag-gold { background: #faf3e3; color: #8a6d1d; }
.tag-gray { background: #eef1f5; color: var(--muted); }
.tag-red { background: #fdecea; color: var(--danger); }

/* ---------- 产品卡 ---------- */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: all .15s; }
.product-card:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(24,68,105,.18); }
.product-card .img { aspect-ratio: 4/3; background: #eef2f6; display: flex; align-items: center; justify-content: center; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .factory { font-size: 12px; color: var(--muted); }
.product-card .fit { font-size: 12px; color: var(--primary-light); }
.product-card .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { color: var(--danger); font-weight: 700; font-size: 13px; }
.product-card .price { color: var(--danger); font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-rfq { background: var(--primary); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.btn-rfq:hover { background: var(--primary-light); }

/* 置信度徽标 */
.conf { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.conf-high { background: #e6f7ee; color: var(--green); }
.conf-mid { background: #faf3e3; color: #8a6d1d; }
.conf-low { background: #eef1f5; color: var(--muted); }

/* ---------- 面包屑 ---------- */
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; position: sticky; top: var(--nav-h, 60px); z-index: 90; background: var(--bg); padding: 10px 0 8px; margin-bottom: 10px; border-bottom: 1px solid var(--border); box-shadow: 0 2px 6px rgba(15,51,85,.06); }
.breadcrumb .sep { color: #cbd5e1; }

/* ---------- 品类知识卡 ---------- */
.intro-card { background: linear-gradient(180deg, #f0f5fa, #ffffff); border: 1px solid #cdd9e5; border-radius: var(--radius); overflow: hidden; }
.intro-card .intro-head { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; background: var(--primary); color: #fff; }
.intro-card .intro-head h3 { font-size: 17px; }
.intro-card .intro-head .en { font-size: 12px; opacity: .8; }
.intro-card .intro-body { padding: 20px; display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
@media (max-width: 900px) { .intro-card .intro-body { grid-template-columns: 1fr; } }
.intro-card h4 { color: var(--primary); font-size: 14px; margin: 14px 0 6px; }
.intro-card h4:first-child { margin-top: 0; }
.intro-card p { font-size: 13px; line-height: 1.7; color: #33445c; }
.intro-card .imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.intro-card .imgs img { border-radius: 6px; border: 1px solid var(--border); width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #fff; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.spec-table th, .spec-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.spec-table th { background: #eef3f8; color: var(--primary); width: 40%; }
.intro-toggle { background: transparent; border: none; color: #fff; cursor: pointer; font-size: 13px; opacity: .9; }

/* ---------- RFQ-only 提示 ---------- */
.rfq-banner { background: linear-gradient(135deg, #fdf6e7, #fff); border: 1px solid #e6d5a3; border-radius: var(--radius); padding: 26px; text-align: center; }
.rfq-banner h3 { color: #8a6d1d; margin-bottom: 8px; }
.rfq-banner p { color: #6b5d33; margin-bottom: 16px; font-size: 13px; line-height: 1.7; }

/* ---------- 列表页 ---------- */
.list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
@media (max-width: 900px) { .list-layout { grid-template-columns: 1fr; } }
.filters { display: flex; flex-direction: column; gap: 14px; align-self: start; position: sticky; top: 80px; }
.filters h4 { font-size: 13px; color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.filters select, .filters input { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.filters label { font-size: 12px; display: flex; gap: 6px; align-items: center; color: var(--text); }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.result-head select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pager button { padding: 6px 14px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; }
.pager button.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- 详情页 ---------- */
.detail-layout { display: grid; grid-template-columns: 460px 1fr; gap: 24px; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1; background: #eef2f6; border-radius: var(--radius); overflow: hidden; display: flex; }
.gallery-main img { width: 100%; object-fit: contain; }
.detail-info h2 { font-size: 22px; margin-bottom: 6px; }
.detail-info .en { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.kv { display: flex; gap: 8px; font-size: 13px; margin: 5px 0; }
.kv b { color: var(--muted); font-weight: 600; min-width: 70px; }
.fitment-group { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.fitment-group .fg-head { background: #eef3f8; padding: 8px 12px; font-weight: 700; color: var(--primary); font-size: 13px; }
.fitment-group .fg-row { padding: 8px 12px; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.empty-fitment { background: #f8f4e8; border: 1px dashed #d5c48a; padding: 14px; border-radius: 6px; font-size: 13px; color: #6b5d33; line-height: 1.7; }

/* ---------- 工厂墙 ---------- */
.factory-card { display: flex; gap: 14px; align-items: flex-start; }
.factory-logo { width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
/* 工厂资质与风采 */
.cert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cert-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; }
.cert-item img { width: 64px; height: 46px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.factory-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.factory-gallery .g-item { overflow: hidden; padding: 0; }
.factory-gallery .g-item img { width: 100%; height: 160px; object-fit: cover; display: block; }
.level-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.lvl-L1 { background: #eef1f5; color: #64748b; }
.lvl-L2 { background: #e8f0f8; color: #1976d2; }
.lvl-L3 { background: #e6f7ee; color: #00a651; }
.lvl-L4 { background: #faf3e3; color: #8a6d1d; }

/* ---------- 工厂：公司实景 / 公司资质 ---------- */
.scene-block { margin-bottom: 18px; }
.scene-block:last-child { margin-bottom: 0; }
.scene-label { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.cert-names { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.pending-tip { background: #f8f9fb; border: 1px dashed var(--border); border-radius: 8px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 工厂产品列表 ---------- */
.plist { padding: 0; overflow: hidden; }
.plist-head, .plist-row {
  display: grid;
  grid-template-columns: 56px minmax(200px, 1.6fr) minmax(170px, 1.4fr) 120px 120px 100px 88px;
  gap: 12px; align-items: center; padding: 12px 16px;
}
.plist-head { background: #f4f7fa; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); }
.plist-row { border-bottom: 1px solid var(--border); font-size: 13px; transition: background .12s; }
.plist-row:last-child { border-bottom: none; }
.plist-row:hover { background: #fafbfd; }
.pl-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; background: #eef2f6; }
.pl-name { line-height: 1.4; min-width: 0; }
.pl-name a { font-weight: 600; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-name a:hover { color: var(--primary); }
.pl-spec { color: var(--muted); font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-no, .pl-oe { color: var(--muted); font-size: 12px; word-break: break-all; }
.pl-price { color: var(--danger); font-weight: 700; white-space: nowrap; }
.pl-btn { text-align: right; }
@media (max-width: 900px) {
  .plist-head { display: none; }
  .plist-row { grid-template-columns: 56px 1fr auto; grid-template-areas: "thumb name btn" "thumb spec btn" "thumb no btn"; row-gap: 4px; }
  .pl-thumb { grid-area: thumb; }
  .pl-name { grid-area: name; }
  .pl-btn { grid-area: btn; }
  .pl-spec { grid-area: spec; }
  .pl-no { grid-area: no; }
  .pl-oe { grid-area: no; }
  .pl-price { grid-area: btn; }
}

/* ---------- RFQ 询价 ---------- */
.rfq-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
@media (max-width: 900px) { .rfq-layout { grid-template-columns: 1fr; } }
.rfq-item { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); padding: 10px 0; }
.rfq-item img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
.rfq-item input[type=number] { width: 70px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { font-size: 12px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; }

/* ---------- RFQ 细化需求面板 ---------- */
.rfq-item-wrap { border-bottom: 1px solid var(--border); }
.rfq-item-wrap:last-of-type { border-bottom: none; }
.rfq-detail { background: #f7f9fc; border-radius: 0 0 var(--radius) var(--radius); padding: 14px; margin: 0 0 10px; }
.rfq-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.rfq-detail-grid .full { grid-column: 1 / -1; }
.rfq-detail-grid .field label { font-size: 11px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 3px; }
.rfq-detail-grid input, .rfq-detail-grid select, .rfq-detail-grid textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff; box-sizing: border-box; }
.rfq-detail-grid textarea { resize: vertical; }
.cert-checks { display: flex; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; }
.cert-checks label { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 16px; }
@media (max-width: 700px) { .kv-grid { grid-template-columns: 1fr; } .rfq-detail-grid { grid-template-columns: 1fr; } }
.completion-box { margin-top: 16px; background: #f7f9fc; border-radius: var(--radius); padding: 12px 14px; }
.completion-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); }
.completion-head b { font-size: 15px; }
.completion-head b.ok { color: var(--green); } .completion-fill.ok { background: var(--green); }
.completion-head b.mid { color: #b7791f; } .completion-fill.mid { background: #d69e2e; }
.completion-head b.low { color: var(--danger); } .completion-fill.low { background: var(--danger); }
.completion-bar { height: 6px; border-radius: 3px; background: #e3e9f0; margin-top: 7px; overflow: hidden; }
.completion-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.success-box { text-align: center; padding: 50px 20px; }
.success-box .big { font-size: 44px; color: var(--green); }
.status-pill { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.st-待受理 { background: #e8f0f8; color: var(--primary); }
.st-对接中 { background: #faf3e3; color: #8a6d1d; }

/* ---------- 帮助 ---------- */
.help-block h3 { color: var(--primary); margin-bottom: 8px; font-size: 16px; }
.help-block p, .help-block li { font-size: 13px; line-height: 1.8; color: #33445c; }
.help-block ul { padding-left: 20px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--primary-dark); color: #93a8bc; margin-top: 50px; padding: 36px 20px 24px; font-size: 13px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h5 { color: #fff; margin-bottom: 10px; font-size: 14px; }
.footer a { display: block; margin-bottom: 6px; cursor: pointer; }
.footer a:hover { color: #fff; }
.footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; text-align: center; font-size: 12px; }

/* 通知 */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--primary-dark); color: #fff; padding: 12px 26px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.3); z-index: 999; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }

.loading { text-align: center; padding: 60px; color: var(--muted); }
.err-box { background: #fdecea; color: var(--danger); padding: 14px; border-radius: 8px; }

/* ---------- 弹窗（离开拦截 / 品类树选品） ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,30,45,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.28); padding: 20px 22px; max-width: 96vw; max-height: 88vh; overflow: auto; }
.leave-card { width: 460px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: var(--primary); }
.tag-warn { background: #fff4e0; color: #9c6a12; }
.draft-banner { background: #fff8ea; border: 1px solid #f0dcae; color: #8a6d1d; font-size: 12px; line-height: 1.7; border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; }

/* 品类树选品器 */
.picker-card { width: 1080px; }
.picker-tabs { display: flex; gap: 8px; margin: 14px 0 12px; }
.picker-tabs button { border: 1px solid var(--border); background: #f5f8fb; border-radius: 6px; padding: 6px 16px; cursor: pointer; font-size: 13px; }
.picker-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.picker-body { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 12px; min-height: 320px; }
.picker-col { border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 52vh; overflow: auto; }
.picker-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.picker-major, .picker-sub { padding: 7px 9px; border-radius: 6px; font-size: 13px; cursor: pointer; line-height: 1.5; }
.picker-major:hover, .picker-sub:hover { background: #eef4fa; }
.picker-major.active, .picker-sub.active { background: var(--primary); color: #fff; }
.picker-major.active .muted { color: rgba(255,255,255,.75); }
.picker-prod { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed var(--border); font-size: 13px; line-height: 1.5; }
.picker-prod:last-child { border-bottom: none; }
.picker-prod .btn { flex-shrink: 0; }
@media (max-width: 800px) { .picker-body { grid-template-columns: 1fr; } .picker-col { max-height: 30vh; } }

/* ---------- 阿拉伯语 RTL ---------- */
[dir="rtl"] body, [dir="rtl"] .navbar-inner, [dir="rtl"] .footer-inner { direction: rtl; }
[dir="rtl"] .rfq-item, [dir="rtl"] .picker-prod, [dir="rtl"] .modal-head { direction: rtl; }
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select { text-align: right; }
[dir="rtl"] .nav-links a { margin-left: 0; }

/* ---------- 移动端专项（≤640px） ---------- */
@media (max-width: 640px) {
  .navbar-inner { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .nav-actions { margin-left: auto; }
  [dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; }
  .logo { font-size: 14px; }
  .logo-badge { font-size: 12px; padding: 3px 6px; }
  .hero-inner { padding: 22px 16px; }
  .hero-text h1 { font-size: 21px; line-height: 1.5; }
  .hero-actions { flex-wrap: wrap; }
  .vehicle-selector { flex-wrap: wrap; }
  .vehicle-selector .field { width: 100%; }
  .rfq-item { flex-wrap: wrap; gap: 8px; }
  .rfq-item img { width: 44px; height: 44px; }
  .rfq-item > div { flex: 1 1 100%; order: -1; }
  .rfq-item input[type=number] { width: 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .spec-table { display: block; overflow-x: auto; white-space: nowrap; }
  .kv-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 16px; }
  .leave-card { width: 100%; }
  .leave-card .btn { flex: 1 1 100%; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .toast { max-width: 88vw; text-align: center; font-size: 13px; }
}

/* ---------- 注册 / 登录 / 管理后台 ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.card .field, .modal-card .field { margin-bottom: 12px; }
.card .field label, .modal-card .field label { font-size: 12px; color: var(--muted); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); box-sizing: border-box;
}
textarea { resize: vertical; }
.req { color: #dc2626; }
.muted { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { background: #f5f7fa; font-weight: 600; color: #475569; font-size: 12px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .btn-sm { padding: 4px 10px; font-size: 12px; }
