/* ==========================================================
   UEditor 富文本内容前台展示样式
   覆盖站点原有 .content table 的 table-layout:fixed，
   保证编辑器插入的表格与视频在产品页正常显示、样式不丢失
   作用域：产品详情页 .content（{content:content} 所在容器）
   ========================================================== */

.content .ue-table,
.ue-table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse !important;
  table-layout: auto !important;   /* 覆盖 style.css 的 fixed，避免列宽被均分挤压 */
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  empty-cells: show;
  word-break: break-word;
}

/* ---------- 预设一：深蓝表头科技表格 ---------- */
.content .ue-table.ue-table-tech {
  border: 1px solid #d6e0f0 !important;
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 62, 128, .08);
}
.content .ue-table.ue-table-tech th,
.ue-table.ue-table-tech th {
  background: #14448c !important;
  color: #fff !important;
  font-weight: 600;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid #1c56ad !important;
  letter-spacing: .5px;
}
.content .ue-table.ue-table-tech td,
.ue-table.ue-table-tech td {
  padding: 10px 12px;
  border: 1px solid #d6e0f0 !important;
  color: #444;
  background: #fff;
}
.content .ue-table.ue-table-tech tbody tr:nth-child(even) td,
.ue-table.ue-table-tech tbody tr:nth-child(even) td {
  background: #f4f7fc;
}
.content .ue-table.ue-table-tech tbody tr:hover td,
.ue-table.ue-table-tech tbody tr:hover td {
  background: #e8f0fd;
}

/* ---------- 预设二：简约白底表格 ---------- */
.content .ue-table.ue-table-simple {
  border: 1px solid #e5e5e5 !important;
  background: #fff;
}
.content .ue-table.ue-table-simple th,
.ue-table.ue-table-simple th {
  background: #fafafa !important;
  color: #333 !important;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #e5e5e5 !important;
  border-bottom: 2px solid #ddd !important;
}
.content .ue-table.ue-table-simple td,
.ue-table.ue-table-simple td {
  padding: 10px 12px;
  border: 1px solid #ececec !important;
  color: #555;
  background: #fff;
}
.content .ue-table.ue-table-simple tbody tr:hover td,
.ue-table.ue-table-simple tbody tr:hover td {
  background: #fbfbfb;
}

/* ---------- 兜底：编辑器插入的无 class 表格 ---------- */
.content table:not(.ue-table):not(.pd-table),
.content table:not([class]) {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse !important;
  table-layout: auto !important;
  margin: 18px 0;
}
.content table:not(.ue-table):not(.pd-table) th,
.content table:not([class]) th {
  background: #fafafa;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  font-weight: 600;
}
.content table:not(.ue-table):not(.pd-table) td,
.content table:not([class]) td {
  padding: 10px 12px;
  border: 1px solid #ececec;
}

/* ---------- 视频 ---------- */
.content .ue-video-wrap,
.ue-video-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  padding-top: 56.25%;   /* 16:9 */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.content .ue-video-wrap iframe,
.content .ue-video-wrap video,
.content .ue-video-wrap embed,
.ue-video-wrap iframe,
.ue-video-wrap video,
.ue-video-wrap embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
.content video,
.content video.ue-video {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 18px 0;
}
.content iframe {
  max-width: 100%;
}

/* ---------- 移动端表格横向滚动 ---------- */
@media (max-width: 768px) {
  .content .ue-table {
    display: table;
    min-width: 520px;
  }
  .content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================
   产品详情固定模板（设备特点 + 技术参数）
   规范：正文宋体 / 板块标题加粗且比正文大 2 号 / 参数表边框完整、列宽随内容自适应
   ========================================================== */

/* 正文基准：宋体 */
.content, .content p, .content li, .content td, .content th, .content div, .content span {
  font-family: SimSun, "宋体", "Songti SC", serif;
}

/* 板块标题：加粗，比正文大 2 号（正文 16px -> 标题 20px） */
.pd-title {
  font-family: SimSun, "宋体", "Songti SC", serif;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.6;
  margin: 26px 0 12px !important;
  padding: 0;
  color: #1a1a1a;
}
.pd-title strong { font-weight: 700 !important; }

/* 正文段落 */
.pd-text {
  font-size: 16px;
  line-height: 1.9;
  margin: 0 0 14px;
  color: #333;
  text-align: justify;
}

/* 技术参数表：边框完整 + 列宽随内容自适应 */
.content table.pd-table,
.pd-table {
  width: auto !important;         /* 不设 100%，列宽才会随内容收缩 */
  min-width: 300px;
  max-width: 100%;
  border-collapse: collapse !important;
  table-layout: auto !important;  /* 覆盖站点 style.css 的 fixed */
  margin: 10px 0 22px !important;
  font-size: 16px;
  color: #333;
  background: #fff;
  border: 1px solid #666 !important;
}
.content table.pd-table td,
.pd-table td {
  border: 1px solid #666 !important;   /* 完整边框 */
  padding: 8px 18px !important;
  line-height: 1.8;
  vertical-align: middle;
  background: #fff;
}
/* 首行（参数项 / 参数值）作为表头 */
.content table.pd-table tbody tr:first-child td,
.pd-table tbody tr:first-child td {
  font-weight: 700 !important;
  background: #f4f4f4 !important;
  text-align: center;
  white-space: nowrap;
}
/* 第一列（参数名称）不换行，列宽自动贴合内容 */
.content table.pd-table tbody tr td:first-child,
.pd-table tbody tr td:first-child {
  white-space: nowrap;
  font-weight: 600;
  background: #fafafa;
}

/* 移动端：表格可横向滚动，不挤压列宽 */
@media (max-width: 768px) {
  .content table.pd-table,
.pd-table { font-size: 14px; }
  .content table.pd-table td,
.pd-table td { padding: 6px 10px !important; }
}
