/**
 * CMS 可编辑内容区域样式
 * 仅作用于后端管理中可编辑的正文内容区域
 * 包括：产品规格/正文、案例正文、新闻正文
 */

/* ============================================================================
 * 颜色变量（与 React 项目 Tailwind 对应）
 * ============================================================================ */
:root {
  /* Slate */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Blue */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
}

/* ============================================================================
 * 产品规格区样式（产品详情页侧边栏规格）
 * 对应 React: ProductDetail.tsx 中的 Technical Specifications 区域
 * ============================================================================ */

/* 规格区容器 - 仅作用于规格内容 */
.cms-specs-section {
  background: var(--slate-50);
  border-radius: 3rem;
  padding: 2.5rem;
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.05);
}

@media (min-width: 768px) {
  .cms-specs-section {
    padding: 4rem;
  }
}

/* 规格网格 */
.cms-specs-section .cms-specs-grid {
  display: grid;
  gap: 2rem 3rem;
}

@media (min-width: 768px) {
  .cms-specs-section .cms-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 单个规格项 */
.cms-specs-section .cms-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
}

.cms-specs-section .cms-spec-label {
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-400);
}

.cms-specs-section .cms-spec-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* 规格区标题 */
.cms-specs-section .cms-specs-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--slate-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.cms-specs-section .cms-specs-title span {
  color: var(--blue-600);
}

.cms-specs-section .cms-specs-bar {
  width: 3rem;
  height: 0.375rem;
  background: var(--blue-600);
  border-radius: 9999px;
  margin-bottom: 2rem;
}

.cms-specs-section .cms-specs-desc {
  color: var(--slate-500);
  font-weight: 500;
  line-height: 1.625;
}

/* ============================================================================
 * 产品详情正文区样式
 * 对应 React: ProductDetail.tsx 中的 Detailed Description 区域
 * ============================================================================ */

/* 正文卡片容器 */
.cms-product-body-section {
  margin-top: 0rem;
}

.cms-product-body-section .cms-body-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--slate-900);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.cms-product-body-section .cms-body-card {
  background: white;
  border-radius: 3rem;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.02);
  border: 1px solid var(--slate-50);
}

@media (min-width: 768px) {
  .cms-product-body-section .cms-body-card {
    padding: 5rem;
  }
}

/* 正文内容区 */
.cms-product-body-section .cms-body-content {
  color: var(--slate-600);
  line-height: 1.8;
  font-size: 1.125rem;
  font-weight: 500;
}

.cms-product-body-section .cms-body-content p {
  margin-bottom: 1.5rem;
}

.cms-product-body-section .cms-body-content h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--slate-900);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.cms-product-body-section .cms-body-content h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* 列表样式 */
.cms-product-body-section .cms-body-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.cms-product-body-section .cms-body-content ul li {
  margin-bottom: 0.75rem;
  position: relative;
}

.cms-product-body-section .cms-body-content ul li::marker {
  color: var(--blue-600);
}

.cms-product-body-section .cms-body-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  counter-reset: item;
}

.cms-product-body-section .cms-body-content ol li {
  margin-bottom: 0.75rem;
}

/* 强调文本 */
.cms-product-body-section .cms-body-content strong {
  color: var(--slate-900);
  font-weight: 700;
}

/* 引用块 */
.cms-product-body-section .cms-body-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--blue-600);
  background: var(--blue-50);
  border-radius: 0 1rem 1rem 0;
  color: var(--slate-700);
  font-style: italic;
}

.cms-product-body-section .cms-body-content blockquote p {
  margin: 0;
}

.cms-product-body-section .cms-body-content blockquote footer {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--slate-500);
}

/* 图片样式 */
.cms-product-body-section .cms-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2rem 0;
  display: block;
}

.cms-product-body-section .cms-body-content figure {
  margin: 2rem 0;
}

.cms-product-body-section .cms-body-content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--slate-400);
  margin-top: 0.75rem;
}

/* 表格样式 */
.cms-product-body-section .cms-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--slate-200);
}

.cms-product-body-section .cms-body-content th {
  background: var(--slate-50);
  color: var(--slate-900);
  font-weight: 700;
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--slate-200);
}

.cms-product-body-section .cms-body-content td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-600);
}

.cms-product-body-section .cms-body-content tr:last-child td {
  border-bottom: none;
}

/* 分割线 */
.cms-product-body-section .cms-body-content hr {
  margin: 3rem 0;
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--slate-200), transparent);
}

/* 特点标签（产品页特有） */
.cms-product-body-section .cms-body-features {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .cms-product-body-section .cms-body-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cms-product-body-section .cms-body-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgb(239 246 255 / 0.5);
  padding: 1rem;
  border-radius: 1rem;
  color: var(--blue-800);
  font-weight: 700;
}

.cms-product-body-section .cms-body-feature svg,
.cms-product-body-section .cms-body-feature .icon {
  color: var(--blue-600);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* ============================================================================
 * 案例正文区样式
 * 对应 React: CaseList.tsx 卡片点击后的详情内容
 * ============================================================================ */

/* 案例正文容器 */
.cms-case-body-section {
  padding: 3rem 0;
}

.cms-case-body-section .cms-body-content {
  color: var(--slate-600);
  line-height: 1.75;
  font-size: 1rem;
}

.cms-case-body-section .cms-body-content p {
  margin-bottom: 1.5rem;
}

.cms-case-body-section .cms-body-content h2 {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--slate-900);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue-100);
}

.cms-case-body-section .cms-body-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* 案例中的挑战列表 */
.cms-case-body-section .cms-body-content .challenge-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cms-case-body-section .cms-body-content .challenge-list li {
  padding: 1.25rem;
  background: var(--slate-50);
  border-radius: 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--blue-400);
}

.cms-case-body-section .cms-body-content .challenge-list li strong {
  display: block;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* 客户评价 */
.cms-case-body-section .cms-body-content .testimonial {
  margin: 2.5rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, var(--blue-50) 0%, white 100%);
  border-radius: 1.5rem;
  border-left: 4px solid var(--blue-600);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.05);
}

.cms-case-body-section .cms-body-content .testimonial p {
  font-size: 1.15rem;
  color: var(--slate-700);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.cms-case-body-section .cms-body-content .testimonial footer {
  font-weight: 700;
  color: var(--slate-900);
  font-size: 0.95rem;
  font-style: normal;
}

.cms-case-body-section .cms-body-content .testimonial footer::before {
  content: '— ';
  color: var(--blue-600);
}

/* 项目数据表 */
.cms-case-body-section .cms-body-content .project-data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.cms-case-body-section .cms-body-content .project-data td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
}

.cms-case-body-section .cms-body-content .project-data td:first-child {
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-50);
  width: 35%;
}

.cms-case-body-section .cms-body-content .project-data td:last-child {
  color: var(--slate-900);
  font-weight: 700;
}

.cms-case-body-section .cms-body-content .project-data tr:last-child td {
  border-bottom: none;
}

/* 图片样式 */
.cms-case-body-section .cms-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2rem 0;
  display: block;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.cms-case-body-section .cms-body-content figure {
  margin: 2.5rem 0;
}

.cms-case-body-section .cms-body-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ============================================================================
 * 新闻正文区样式
 * 对应 React: NewsList.tsx 卡片点击后的详情内容
 * ============================================================================ */

/* 新闻正文容器 */
.cms-news-body-section {
  padding: 2rem 0;
}

.cms-news-body-section .cms-body-content {
  color: var(--slate-600);
  line-height: 1.75;
  font-size: 1rem;
}

/* 导语/摘要 */
.cms-news-body-section .cms-body-content .lead {
  font-size: 1.25rem;
  color: var(--slate-700);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
  font-weight: 500;
}

.cms-news-body-section .cms-body-content p {
  margin-bottom: 1.25rem;
}

.cms-news-body-section .cms-body-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.cms-news-body-section .cms-body-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* 新闻要点列表 */
.cms-news-body-section .cms-body-content .highlight-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cms-news-body-section .cms-body-content .highlight-list li {
  padding: 1rem 1.25rem;
  background: var(--blue-50);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--slate-700);
  border-left: 3px solid var(--blue-500);
}

.cms-news-body-section .cms-body-content .highlight-list li strong {
  color: var(--blue-700);
}

/* 新闻引用 */
.cms-news-body-section .cms-body-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--slate-50);
  border-left: 4px solid var(--blue-600);
  border-radius: 0 1rem 1rem 0;
  color: var(--slate-700);
}

.cms-news-body-section .cms-body-content blockquote p {
  margin: 0;
  font-style: italic;
}

.cms-news-body-section .cms-body-content blockquote footer {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--slate-500);
  font-style: normal;
  font-weight: 600;
}

/* 图片样式 */
.cms-news-body-section .cms-body-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2rem 0;
  display: block;
}

/* 视频样式 */
.cms-news-body-section .cms-body-content video,
.cms-news-body-section .cms-body-content iframe {
  width: 100%;
  max-width: 800px;
  border-radius: 1rem;
  margin: 2rem auto;
  display: block;
}

/* ============================================================================
 * 通用富文本编辑器样式
 * 用于后台编辑时的预览和管理后台展示
 * ============================================================================ */

/* 通用正文容器 */
.cms-content-body {
  color: var(--slate-600);
  line-height: 1.75;
  font-size: 1rem;
}

.cms-content-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.cms-content-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.cms-content-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.cms-content-body p {
  margin-bottom: 1rem;
}

.cms-content-body ul,
.cms-content-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.cms-content-body ul li,
.cms-content-body ol li {
  margin-bottom: 0.5rem;
}

.cms-content-body ul li::marker {
  color: var(--blue-600);
}

.cms-content-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--blue-600);
  background: var(--slate-50);
  color: var(--slate-700);
}

.cms-content-body strong {
  color: var(--slate-900);
  font-weight: 700;
}

.cms-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.cms-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.cms-content-body th,
.cms-content-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  text-align: left;
}

.cms-content-body th {
  background: var(--slate-50);
  font-weight: 700;
  color: var(--slate-900);
}

.cms-content-body a {
  color: var(--blue-600);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.cms-content-body a:hover {
  border-bottom-color: var(--blue-600);
}

.cms-content-body hr {
  margin: 2rem 0;
  border: none;
  height: 1px;
  background: var(--slate-200);
}

/* ============================================================================
 * 后台管理编辑器样式
 * ============================================================================ */

/* 编辑器预览区 */
.admin-editor-preview {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--slate-200);
  max-height: 500px;
  overflow-y: auto;
}

/* 编辑器工具栏提示 */
.editor-toolbar-hint {
  font-size: 0.8rem;
  color: var(--slate-500);
  padding: 0.75rem 1rem;
  background: var(--slate-50);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.editor-toolbar-hint code {
  background: var(--slate-200);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* ============================================================================
 * 新闻/案例详情页布局样式
 * 使正文区域宽度与面包屑保持一致
 * ============================================================================ */

/* 新闻详情页正文容器 - 宽度与面包屑对齐 */
.article-detail-wbd .article-body-wbd,
.article-detail-wbd .article-media-wbd {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* 正文卡片样式与面包屑容器一致 */
.article-detail-wbd .inner-prose-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  border: 1px solid var(--slate-200);
}

@media (min-width: 768px) {
  .article-detail-wbd .inner-prose-card {
    padding: 2rem 2.5rem;
  }
}

/* 确保面包屑和正文在同一宽度容器内 */
.article-detail-wbd .products-breadcrumb {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 头部区域与面包屑对齐 */
.article-detail-wbd .article-detail-header {
  max-width: 100%;
}

/* 媒体区域对齐 */
.article-detail-wbd .article-media-wbd {
  width: 100%;
}

.article-detail-wbd .article-media-fig {
  margin: 1.5rem 0;
}

.article-detail-wbd .article-media-fig img {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  display: block;
}
