/* ================================================
   CY 移动端样式修复 v2
   仅覆盖视图样式，不修改任何 Elementor 模板数据
   ================================================ */

/* ---------- 1. CTA Before Footer 标题超宽修复 ---------- */
@media (max-width: 767px) {
  body .elementor-element-6120860 {
    width: 100% !important;
    max-width: 100% !important;
    --container-widget-width: 100% !important;
    --container-widget-flex-grow: 0 !important;
  }
  body .elementor-element-6120860 .elementor-heading-title {
    font-size: 30px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
  body .elementor-element-7d5a84e > .elementor-element-populated {
    padding: 0 !important;
  }
}

/* ---------- 产品详情页移动端 ---------- */
@media (max-width: 768px) {
  body:has(.wp-prod-content-area) .elementor-widget-html,
  body:has(.wp-prod-content-area) .elementor-widget-shortcode {
    width: 100% !important;
    max-width: 100% !important;
  }
  body:has(.wp-prod-content-area) .e-con-inner {
    flex-direction: column !important;
  }

  .wp-prod-content-area,
  .wp-prod-main {
    width: 100% !important;
    max-width: 100% !important;
  }
  .wp-prod-top-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .wp-prod-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .wp-prod-title {
    font-size: 22px !important;
    margin: 0 0 14px 0 !important;
  }
  .wp-prod-main-img img,
  .wp-prod-thumb-item img {
    max-width: 100% !important;
    height: auto !important;
  }
  .wp-prod-spec-table th,
  .wp-prod-spec-table td {
    padding: 8px 6px !important;
    font-size: 12px !important;
    word-break: break-word;
  }
  .wp-prod-sidebar,
  .wp-prod-menu-group {
    width: 100% !important;
  }
}

/* ---------- 4. 产品筛选栏默认收起 ---------- */
.wp-prod-menu-group:not(.expanded) .wp-prod-menu-sub {
  display: none !important;
}

/* ================================================
   CY 博客文章页样式修复 v3
   博客 single post：白底深色文字（禁用透明页眉后修正菜单/黑框/标题/评论区）
   ================================================ */

/* 5.1 页眉菜单：白底深色文字（全局链接色为白色，博客页需覆盖） */
body.single-post .ast-builder-menu .main-header-menu .menu-link,
body.single-post .main-header-menu .menu-link {
  color: #0f0f0f !important;
}
body.single-post .ast-builder-menu .main-header-menu .menu-item:hover > .menu-link,
body.single-post .main-header-menu .menu-item:hover > .menu-link,
body.single-post .ast-builder-menu .main-header-menu .current-menu-item > .menu-link,
body.single-post .main-header-menu .current-menu-item > .menu-link {
  color: #b6e925 !important;
}

/* 5.2 下拉子菜单：白底深色字 */
body.single-post .main-header-menu .sub-menu {
  background-color: #ffffff !important;
}
body.single-post .main-header-menu .sub-menu .menu-link {
  color: #0f0f0f !important;
}
body.single-post .main-header-menu .sub-menu .menu-item:hover > .menu-link {
  color: #b6e925 !important;
}

/* 5.3 文章卡片：黑底改白底（消除"黑框一圈"） */
body.single-post .ast-article-single,
body.single-post .ast-article-post {
  background-color: #ffffff !important;
}

/* 5.4 文章标题：深色（含 Elementor 博客的主题标题） */
body.single-post .entry-title,
body.single-post .entry-title a {
  color: #0f0f0f !important;
}

/* 5.4b 普通 Gutenberg 博客：正文/链接深色文字 */
body.single-post:not(.elementor-page) .entry-content,
body.single-post:not(.elementor-page) .entry-content p,
body.single-post:not(.elementor-page) .entry-content li,
body.single-post:not(.elementor-page) .entry-content h1,
body.single-post:not(.elementor-page) .entry-content h2,
body.single-post:not(.elementor-page) .entry-content h3,
body.single-post:not(.elementor-page) .entry-content h4,
body.single-post:not(.elementor-page) .entry-content h5,
body.single-post:not(.elementor-page) .entry-content h6 {
  color: #0f0f0f;
}
body.single-post:not(.elementor-page) .entry-content a {
  color: #0f0f0f;
  text-decoration: underline;
}
body.single-post:not(.elementor-page) .entry-content a:hover {
  color: #b6e925;
}

/* 5.5 评论区：彻底白底深色字（Astra 黑背景规则会命中评论区多个元素，逐一覆盖） */
body.single-post .comments-area,
body.single-post .ast-comment-list,
body.single-post .comment-list,
body.single-post .comment-list li,
body.single-post .ast-comment-list li,
body.single-post .comments-title,
body.single-post .comment-respond {
  background-color: #ffffff !important;
}
body.single-post .comments-area .comments-title,
body.single-post .comments-area .comment-reply-title,
body.single-post .comment-list .comment-content,
body.single-post .comment-list .comment-author .fn,
body.single-post .comment-list .comment-metadata,
body.single-post .comment-list .comment-metadata a,
body.single-post .comment-reply-link,
body.single-post .ast-cmt-post-author {
  color: #0f0f0f !important;
}
body.single-post .comments-area a {
  color: #0f0f0f !important;
}
body.single-post .comments-area a:hover {
  color: #b6e925 !important;
}
body.single-post .comment-respond label,
body.single-post .comment-respond input,
body.single-post .comment-respond textarea {
  color: #0f0f0f;
}

/* 5.6 文章 Meta（作者/日期/分类/标签）/ 面包屑 / 导航：深色文字 */
body.single-post .entry-meta,
body.single-post .entry-meta a,
body.single-post .entry-meta span,
body.single-post .entry-meta .author-name,
body.single-post .entry-meta .posted-by,
body.single-post .entry-meta .posted-on,
body.single-post .entry-meta .cat-links,
body.single-post .entry-meta .tag-links {
  color: #0f0f0f !important;
}
body.single-post .entry-meta a:hover {
  color: #b6e925 !important;
}
body.single-post .ast-breadcrumbs,
body.single-post .ast-breadcrumbs a,
body.single-post .post-navigation a,
body.single-post .post-navigation .nav-links a {
  color: #0f0f0f !important;
}
body.single-post .ast-article-single .ast-breadcrumbs .breadcrumb_last {
  color: #0f0f0f !important;
}

/* 5.7 博客文章页：显示文章标题（Elementor 主题模板 post-1204 将 --page-title-display 设为 none 隐藏了标题） */
body.single-post {
  --page-title-display: block !important;
}
body.single-post h1.entry-title {
  display: block !important;
}
