/* ===================================================================
   JatonProductInformationWeb —— 前台对外查询样式（工业风 · 响应式）
   主色：工业蓝 #1769d0 / 深色 #1c2b3a
   =================================================================== */

* { box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none; user-select: none; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f9;
  color: #2b3a4a;
  -webkit-font-smoothing: antialiased;
  /* sticky footer：整页纵向 flex，页脚始终贴住视口底部 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: #1769d0; text-decoration: none; }
a:hover { color: #0f52ad; }

/* ---------- 头部导航 ---------- */
.jpi-header {
  background: #1c2b3a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.jpi-header .jpi-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jpi-brand { display: flex; align-items: center; gap: 12px; }
.jpi-logo {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, #1769d0, #2b9aff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff;
}
.jpi-logo-img {
  width: 40px; height: 40px; border-radius: 6px; object-fit: contain;
  display: block;
}
.jpi-brand-name { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.jpi-brand-sub { font-size: 12px; color: #9fb0c0; margin-top: 2px; }
.jpi-nav a {
  color: #c6d2de; font-size: 14px; padding: 8px 14px; border-radius: 6px;
  transition: .2s;
}
.jpi-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- 横幅 ---------- */
.jpi-hero {
  background: linear-gradient(120deg, #1c2b3a 0%, #1769d0 100%);
  color: #fff;
  padding: 24px 16px;
  text-align: center;
}
.jpi-hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: 2px; }
.jpi-hero p { margin: 0 auto; max-width: 640px; color: #d5e2f0; font-size: 14px; line-height: 1.6; }

/* ---------- 主体 ---------- */
.jpi-main { max-width: 100%; margin: 20px auto 40px; padding: 0 24px; width: 100%; box-sizing: border-box; }

/* ---------- 行业筛选 ---------- */
.jpi-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.jpi-chip {
  background: #fff; border: 1px solid #dfe5ec; color: #4a5a6a;
  padding: 8px 18px; border-radius: 20px; cursor: pointer; font-size: 14px;
  transition: .2s; user-select: none;
}
.jpi-chip:hover { border-color: #1769d0; color: #1769d0; }
.jpi-chip.active { background: #1769d0; border-color: #1769d0; color: #fff; }

/* ---------- 项目卡片网格（响应式核心） ---------- */
.jpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.jpi-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20,40,70,.08);
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.jpi-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(20,40,70,.15); }
.jpi-card-cover {
  width: 100%; height: 160px; background: #dde4ec;
  background-size: cover; background-position: center; position: relative;
}
.jpi-card-cover .jpi-cover-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #8aa0b8; font-size: 26px; font-weight: 700;
}
.jpi-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.jpi-card-name { font-size: 16px; font-weight: 600; color: #1c2b3a; }
.jpi-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.jpi-tag {
  font-size: 12px; color: #1769d0; background: #eaf2fd;
  padding: 2px 8px; border-radius: 4px;
}
.jpi-card-intro {
  font-size: 13px; color: #6b7b8b; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.jpi-card-params {
  margin-top: 10px; padding: 10px 12px; border: 1px solid #e3eaf2; border-radius: 8px;
  background: #f8fafc; font-size: 13px; color: #33475c; line-height: 1.7;
  white-space: pre-line; word-break: break-word;
}
.jpi-card-foot { margin-top: auto; padding-top: 12px; font-size: 13px; color: #1769d0; }

/* ---------- 空状态 ---------- */
.jpi-empty { text-align: center; color: #93a3b3; padding: 60px 0; font-size: 15px; }

/* ---------- 页脚 ---------- */
.jpi-footer {
  background: #1c2b3a; color: #8fa2b5; text-align: center;
  padding: 22px 16px; font-size: 13px;
  /* 内容不足一屏时贴住视口底部；内容多时自然排到文档末尾 */
  margin-top: auto;
}

/* ---------- 项目详情页 ---------- */
.jpi-detail-head {
  background: #fff; border-bottom: 1px solid #e6ebf1; padding: 26px 0;
}
.jpi-detail-head .jpi-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; gap: 24px; }
.jpi-detail-cover {
  width: 260px; height: 170px; border-radius: 10px; background: #dde4ec;
  background-size: cover; background-position: center; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #8aa0b8; font-size: 22px;
}
.jpi-detail-info { flex: 1; }
.jpi-detail-info h1 { margin: 0 0 10px; font-size: 24px; color: #1c2b3a; }
.jpi-detail-intro { color: #5d6d7d; line-height: 1.7; font-size: 14px; max-width: 760px; }
.jpi-detail-params {
  width: 320px; flex-shrink: 0; padding: 14px 16px; border: 1px solid #e3eaf2; border-radius: 10px;
  background: #f8fafc; font-size: 13px; color: #33475c; line-height: 1.7;
  white-space: pre-line; word-break: break-word; max-height: 200px; overflow: auto;
}
.jpi-detail-params-title { font-size: 14px; font-weight: 600; color: #1c2b3a; margin-bottom: 8px; }

/* ---------- Tab 区块 ---------- */
.jpi-tabs { max-width: 1200px; margin: 28px auto; padding: 0 16px; }
.jpi-tabbar { display: flex; gap: 8px; border-bottom: 2px solid #e6ebf1; margin-bottom: 20px; flex-wrap: wrap; }
.jpi-tab {
  padding: 10px 22px; cursor: pointer; color: #5d6d7d; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s;
}
.jpi-tab.active { color: #1769d0; border-color: #1769d0; font-weight: 600; }
.jpi-tab .jpi-tab-count { font-size: 12px; background: #eaf2fd; color: #1769d0; border-radius: 10px; padding: 1px 7px; margin-left: 6px; }

/* ---------- 文件列表 ---------- */
.jpi-file-list { list-style: none; margin: 0; padding: 0; }
.jpi-file-item {
  background: #fff; border: 1px solid #e9eef4; border-radius: 10px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.jpi-file-ico {
  width: 42px; height: 42px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff;
}
.jpi-file-ico.pdf { background: #e2574c; }
.jpi-file-ico.doc { background: #2b74d9; }
.jpi-file-ico.xls { background: #1e8f5e; }
.jpi-file-ico.img { background: #7a5cce; }
.jpi-file-ico.video { background: #1769d0; }
.jpi-file-ico.other { background: #8a98a8; }
.jpi-file-info { flex: 1; min-width: 0; }
.jpi-file-title { font-size: 14px; color: #2b3a4a; font-weight: 500; word-break: break-all; }
.jpi-file-meta { font-size: 12px; color: #93a3b3; margin-top: 3px; }
.jpi-file-actions { display: flex; gap: 8px; flex-shrink: 0; }
.jpi-btn {
  border: 1px solid #1769d0; color: #1769d0; background: #fff;
  padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: .2s;
}
.jpi-btn:hover { background: #1769d0; color: #fff; }
.jpi-btn.gray { border-color: #cfd8e2; color: #6b7b8b; }
.jpi-btn.gray:hover { background: #f0f4f8; color: #2b3a4a; }

/* ---------- 视频卡片 ---------- */
.jpi-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.jpi-video-card { background: #1c2b3a; border-radius: 10px; overflow: hidden; cursor: pointer; }
.jpi-video-thumb { height: 130px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; background: linear-gradient(135deg,#2a3f55,#17324f); }
.jpi-video-info { padding: 10px 12px; color: #fff; }
.jpi-video-info .t { font-size: 13px; line-height: 1.4; }
.jpi-video-info .s { font-size: 11px; color: #7f95ab; margin-top: 4px; }

/* ---------- 全屏播放弹层 ---------- */
.jpi-player { width: 860px; max-width: 94vw; background: #000; border-radius: 10px; overflow: hidden; }
.jpi-player video { width: 100%; height: auto; max-height: 70vh; display: block; }

/* ---------- 响应式：手机端 ---------- */
@media (max-width: 768px) {
  .jpi-header .jpi-inner { height: 54px; }
  .jpi-brand { gap: 8px; min-width: 0; flex: 1 1 auto; }
  .jpi-logo-img { width: 32px; height: 32px; flex-shrink: 0; }
  .jpi-brand-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jpi-brand-sub { display: none; }
  .jpi-nav { flex-shrink: 0; margin-left: 8px; }
  .jpi-nav a { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  #currentUser { font-size: 12px !important; margin-right: 6px !important; white-space: nowrap; }
  .jpi-hero { padding: 40px 16px 36px; }
  .jpi-hero h1 { font-size: 22px; }
  .jpi-main { margin-top: -16px; }
  .jpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .jpi-card-cover { height: 110px; }
  .jpi-card-name { font-size: 14px; }
  .jpi-card-intro { display: none; }
  .jpi-detail-head .jpi-inner { flex-direction: column; gap: 14px; }
  .jpi-detail-cover { width: 100%; height: 170px; }
  .jpi-detail-info h1 { font-size: 20px; }
  .jpi-detail-params { width: 100%; max-height: none; }
  .jpi-file-item { flex-wrap: wrap; }
  .jpi-file-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 480px) {
  .jpi-header .jpi-inner { height: 50px; padding: 0 12px; }
  .jpi-logo-img { width: 28px; height: 28px; }
  .jpi-brand-name { font-size: 14px; letter-spacing: 0; }
  .jpi-nav a { padding: 5px 6px; font-size: 12px; }
  #currentUser { display: none; }
  .jpi-grid { grid-template-columns: 1fr; }
  .jpi-tab { padding: 9px 14px; font-size: 14px; }
  .jpi-video-grid { grid-template-columns: 1fr; }
  .jpi-hero h1 { font-size: 19px; }
}

/* ===== 预览弹层：扫码未登录时页面内在线查看（2026-10-16） ===== */
.jpi-preview-img { width: 100%; height: 90vh; overflow: auto; text-align: center; }
.jpi-preview-img img { max-width: 100%; max-height: 100%; }
.jpi-pdf-wrap { width: 100%; height: 90vh; overflow: auto; }