/*
Theme Name: 蔚澜商贸
Theme URI: https://wei.webtesting.top
Author: CC
Description: 基于 Crazy 前端改写的工业产品站主题，含产品中心、关于我们、联系我们、留言管理与站点设置。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crazy
*/

/* ------------------------------------------------------------
   主题补充样式：只处理 WordPress 运行环境差异，不改原设计
   ------------------------------------------------------------ */

/* 登录状态下顶部工具条会压住导航，下移一点 */
.admin-bar .crazy-navbar {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .crazy-navbar {
    top: 46px;
  }
}

/* 屏幕阅读器专用文本 */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* 产品卡片悬停显示名称，保持原有构图 */
.crazy-portfolio-item .overlay-color {
  display: flex;
  align-items: center;
  justify-content: center;
}
.crazy-portfolio-item .product-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease-in-out;
  padding: 0 20px;
  text-align: center;
}
.crazy-portfolio-item:hover .product-name {
  opacity: 1;
  transform: translateY(0);
}

/* 产品详情图集 */
.product-gallery {
  margin-bottom: 30px;
}
.product-gallery .owl-item img {
  width: 100%;
}

/* 分页 */
.crazy-pagination {
  text-align: center;
  margin-top: 80px;
}
.crazy-pagination .page-numbers {
  display: inline-block;
  min-width: 42px;
  height: 42px;
  line-height: 36px;
  margin: 0 6px;
  border: 3px solid #0de7cb;
  color: #171717;
  font-weight: 700;
  text-decoration: none;
}
.crazy-pagination .page-numbers.current,
.crazy-pagination .page-numbers:hover {
  background-color: #0de7cb;
  color: #fff;
  text-decoration: none;
}

/* 后台编辑器里不要继承前台字体大小 */
body.wp-admin .return-msg {
  text-transform: none;
}

/* 产品参数表 */
.product-specs {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0 40px;
}
.product-specs tr {
  border-bottom: 1px solid #e5e5e5;
}
.product-specs th {
  width: 28%;
  padding: 14px 20px;
  text-align: left;
  background-color: #f7f7f7;
  font-weight: 700;
  color: #171717;
  font-family: inherit;
}
.product-specs td {
  padding: 14px 20px;
  color: #393939;
}

/* 正文排版 */
.entry-content img {
  max-width: 100%;
  height: auto;
}
.entry-content h2,
.entry-content h3 {
  margin-top: 1.2em;
}
.entry-content ul,
.entry-content ol {
  margin: 0 0 20px 22px;
  padding: 0;
}
.entry-content li {
  margin-bottom: 8px;
}
.blog-item .post-content p {
  margin: 0 0 15px;
}


/* ===== 蔚澜商贸定制：Logo 尺寸 + 备案号 ===== */
.crazy-logo .site-logo {
  height: 38px;
  width: auto;
  max-width: 100%;
  vertical-align: middle;
}
.footer-icp {
  margin-top: 12px;
}
.footer-icp p {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .65);
}
.footer-icp a {
  color: rgba(255, 255, 255, .65);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-icp a:hover {
  color: #fff;
}
@media (max-width: 767px) {
  .crazy-logo .site-logo { height: 30px; }
  .footer-icp p { font-size: 12px; }
}


/* hero-overlay-tune: 让深色遮罩下的工业纹理可见（原 0.85 会把背景压成纯色） */
.title-home .overlay,
.page-title .overlay,
.clients .overlay,
.video-section .overlay {
  background-color: rgba(2, 0, 51, .72);
}


/* page-title-visible-guard: 防止动画脚本异常时页面大标题永久隐藏 */
.page-title .tlt,
h1.tlt {
  visibility: visible !important;
}


/* ============================================================
   蔚澜商贸 · 化工贸易框架样式（2026-11）
   用于首页 hero 品类、资质卡片、合作伙伴墙、页脚信息区
   ============================================================ */

/* hero 底部品类行：6 个品类为真实链接，长名称需支持换行 */
.goto a {
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  margin: 7px 13px;
  letter-spacing: 0;
  display: inline-block;
}
@media (max-width: 1200px) {
  .goto a { font-size: 13px; margin: 6px 11px; }
}
@media (max-width: 992px) {
  .goto { padding: 36px 0; }
  .goto a { font-size: 13px; margin: 6px 9px; }
}

/* 产品筛选：分类项为链接，样式与 li 内 span 保持一致 */
.filters li { margin: 0 13px; }
.filters li a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.filters li a:hover { text-decoration: none; }
@media (max-width: 1200px) {
  .filters li { margin: 0 10px; }
}
@media (max-width: 767px) {
  .filters li { margin: 6px 9px; }
  .filters li span { font-size: 13px; }
}

/* 合作伙伴墙 */
.clients h2 {
  color: #fff;
  font-size: 34px;
  letter-spacing: 2px;
  margin: 0;
}
.partner-group {
  margin-bottom: 40px;
}
.partner-group:last-child {
  margin-bottom: 0;
}
.partner-label {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 22px;
}
.partner-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.partner-wall span {
  display: inline-block;
  margin: 7px;
  padding: 14px 26px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  transition: all .25s ease;
}
.partner-wall span:hover {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}
@media (max-width: 767px) {
  .clients h2 { font-size: 24px; }
  .partner-wall span { padding: 10px 16px; font-size: 13px; margin: 5px; }
}

/* 经营资质卡片 */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}
.cert-item {
  width: 25%;
  padding: 0 15px 30px;
  box-sizing: border-box;
}
.cert-item > * {
  box-sizing: border-box;
}
.cert-item {
  text-align: center;
}
.cert-item .cert-icon {
  padding: 0;
}
.cert-item .cert-icon i {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #020033;
  margin-bottom: 22px;
}
.cert-item h6 {
  font-size: 16px;
  font-weight: 700;
  color: #171717;
  margin: 0 0 14px;
  letter-spacing: .5px;
  text-transform: none;
  line-height: 1.5;
}
.cert-item p {
  font-size: 14px;
  line-height: 1.9;
  color: #6d6d6d;
  margin: 0;
}
.cert-item::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: #0de7cb;
  margin: 26px auto 0;
}
@media (max-width: 992px) {
  .cert-item { width: 50%; }
}
@media (max-width: 600px) {
  .cert-item { width: 100%; }
}

/* 关于页·核心优势图标 */
.adv-icon {
  display: block;
  font-size: 40px;
  line-height: 1;
  color: #020033;
  margin-bottom: 24px;
}

/* 联系页·询价提示 */
.enquiry-tip {
  font-size: 15px;
  line-height: 1.95;
  color: #6d6d6d;
  margin: 0;
}

/* 页脚信息区 */
.footer-info {
  display: flex;
  flex-wrap: wrap;
  text-align: left;
  margin-bottom: 70px;
}
.footer-brand {
  width: 32%;
  padding-right: 40px;
  box-sizing: border-box;
}
.footer-brand img {
  height: 34px;
  width: auto;
  max-width: 100%;
  display: block;
}
.footer-brand p {
  margin: 22px 0 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.6;
}
.footer-col {
  width: 34%;
  padding-right: 30px;
  box-sizing: border-box;
}
.footer-col h6 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0 0 22px;
  text-transform: none;
}
.footer-col p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .62);
  font-size: 14px;
  line-height: 1.8;
}
.footer-col p i {
  color: rgba(255, 255, 255, .45);
  margin-right: 10px;
  font-size: 14px;
  vertical-align: middle;
}
.footer-col p a {
  color: rgba(255, 255, 255, .62);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-col p a:hover {
  color: #fff;
}
@media (max-width: 992px) {
  .footer-brand,
  .footer-col {
    width: 50%;
    margin-bottom: 40px;
  }
}
@media (max-width: 600px) {
  .footer-brand,
  .footer-col {
    width: 100%;
    padding-right: 0;
  }
  .footer-info { margin-bottom: 40px; }
}

/* ============================================================
   产品卡片名称（2026-11）
   模板原本只有 hover 遮罩、且 .product-name 无样式，
   导致产品名任何状态都看不见，切换分类时看起来毫无变化。
   现改为卡片下方常驻标题。
   ============================================================ */
.crazy-portfolio-item .card-title {
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  letter-spacing: .5px;
  color: #171717;
  text-transform: none;
}
.crazy-portfolio-item .card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.crazy-portfolio-item .card-title a:hover {
  color: #036eb8;
  text-decoration: none;
}

/* hover 遮罩上的名称 */
.crazy-portfolio-item .overlay-color {
  display: flex;
  align-items: center;
  justify-content: center;
}
.crazy-portfolio-item .overlay-color .product-name {
  color: #020033;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  padding: 0 18px;
}

@media (max-width: 767px) {
  .crazy-portfolio-item .card-title { font-size: 13px; margin-top: 12px; }
  .crazy-portfolio-item .overlay-color .product-name { font-size: 13px; }
}

@media (max-width: 767px) {
  .crazy-portfolio-item .card-caption {
    font-size: 12px;
    padding: 20px 8px 8px;
  }
  .crazy-portfolio-item .overlay-color .product-name { font-size: 13px; }
}

/* 产品卡片：去掉覆盖在缩略图上的十字拼接遮罩（mask-cross.png），
   图片恢复为完整矩形，B2B 场景下更便于看清实物。 */
.crazy-portfolio-item .figure,
.crazy-portfolio-item .figure.cross {
	display: none !important;
}

/* ============================================================
   合作厂商 logo 墙（2026-11）
   关于页「合作厂商」板块与首页「客户与合作伙伴」共用。
   有 logo 的厂商显示图片卡片，没传 logo 的降级为文字块。
   单条可在后台调「Logo 显示比例」，通过 --logo-scale 生效。
   ============================================================ */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.logo-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  padding: 20px 22px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #ececec;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.logo-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.logo-item img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(var(--logo-scale, 1));
  transition: transform .3s ease;
}
.logo-item:hover {
  border-color: #0de7cb;
  box-shadow: 0 12px 28px rgba(2, 0, 51, .08);
}
.logo-item:hover img {
  transform: scale(calc(var(--logo-scale, 1) * 1.04));
}
.logo-item .logo-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1px;
  text-align: center;
  color: #171717;
  text-transform: none;
}

/* 首页深色区块里的文字块：沿用原来的描边样式 */
.clients .logo-item.has-text {
  background: transparent;
  border-color: rgba(255, 255, 255, .16);
}
.clients .logo-item.has-text .logo-text {
  color: rgba(255, 255, 255, .88);
}
.clients .logo-item.has-text:hover {
  border-color: rgba(255, 255, 255, .5);
  box-shadow: none;
}
.clients .logo-item.has-logo {
  background: #fff;
  border-color: transparent;
}
/* 首页一屏放下更多，排得更紧凑 */
.clients .logo-wall {
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.clients .logo-item {
  height: 96px;
  padding: 16px 14px;
}

@media (max-width: 1200px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .clients .logo-wall { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
  .logo-item { height: 122px; padding: 16px 18px; }
  .clients .logo-wall { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .logo-wall { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .logo-item { height: 100px; padding: 12px 14px; }
  .logo-item .logo-text { font-size: 13px; }
  .clients .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .clients .logo-item { height: 82px; padding: 10px; }
}

/* 首页客户墙条目数为 5 时按 5 列均分，避免 6 列布局右侧空出一格 */
@media (min-width: 1201px) {
  .clients .logo-wall.count-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* 手机端两列时，第五个条目居中，避免左侧孤零零一张 */
@media (max-width: 767px) {
  .clients .logo-wall.count-5 > .logo-item:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    margin: 0 auto;
  }
}
