/**
Theme Name: YM Scientific
Author: June Zhu
Author URI: http://wpastra.com/about/
Description: A child theme for YM Scientific corporate website
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ym-scientific
Template: astra
*/

/* 全局字体 - 排除SVG元素和i标签 */
*:not(svg):not(svg *):not(i):not(i *) {
  font-family: Montserrat ;
}

body {
  font-family: Montserrat ;
}

.container {
  padding-bottom: 50px;
}
.ast-above-header-wrap {
	height: 50px;
}
.ast-above-header-bar {
	box-shadow: 0 2px 10px 0 rgba(17, 100, 168, 0.2);
}

.hp-main-banner {
  height: 800px;
}

.type-page .entry-header .entry-title {
  display: none !important;
}

.breadcrumb-wrapper {
  padding: 20px 0 !important;
}

/************************************
 * 通用字体样式（两表单共享）
 ************************************/
.wpforms-form {
  font-family: 'Montserrat', sans-serif;
}

.wpforms-field label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #AAAAAA;
  line-height: 30px;
}

/************************************
 * 表单 1（两列：Name + Email）
 * 输入框：透明背景 + 深灰边框
 ************************************/
#block-11 {
  margin-bottom: 20px !important;
}

#block-11 .wp-block-heading{
  color: #fff;
  font-size: 20px;
  line-height: 24px;
  font-weight: 400;
}

#block-10 {
  padding-top: 10px;
}

#wpforms-form-1030 {
  margin-top: -15px;
}

#wpforms-form-1030 .wpforms-field-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#wpforms-form-1030 .wpforms-field {
  flex: 1 1 calc(50% - 20px);
  box-sizing: border-box;
}

/* 第二行 message 独占一行 */
#wpforms-form-1030 .wpforms-field.wpforms-full {
  flex: 1 1 100%;
}

/* 输入框样式 */
#wpforms-form-1030 input[type="text"],
#wpforms-form-1030 input[type="email"],
#wpforms-form-1030 input[type="tel"],
#wpforms-form-1030 textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0);
  border: 1px solid #525252;
  opacity: 0.5;
  padding: 12px 15px;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  transition: all 0.3s ease;
}

#wpforms-form-1030 input:focus,
#wpforms-form-1030 textarea:focus {
  opacity: 1;
  border-color: #FFFFFF;
  outline: none;
}

/* 响应式：手机上一列 */
@media (max-width: 768px) {
  #wpforms-form-1030 .wpforms-field {
    flex: 1 1 100%;
  }
}

/* 表单 1030 的 submit button 样式 */
#wpforms-form-1030 .wpforms-submit-container,
#wpforms-form-1030 .wpforms-submit-container .wpforms-submit {
  width: 100% !important;
}

#wpforms-form-1030 .wpforms-submit {
  background: rgba(142, 194, 32, 0) !important;
  border: 1px solid #4CAF50 !important;
  color: #8EC220 !important;
  width: 100% !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  padding: 12px 25px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

#wpforms-form-1030 .wpforms-submit:hover {
  background: rgba(142, 194, 32, 0.1) !important;
  border-color: #8EC220 !important;
}

/************************************
 * 表单 2（三列：Name + Email + Phone）
 * 输入框：白底 + 灰边
 ************************************/
#wpforms-form-893 .wpforms-field-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#wpforms-form-893 .wpforms-field {
  flex: 1 1 calc(33.333% - 20px);
  box-sizing: border-box;
}

/* 第二行 message 独占一行 */
#wpforms-form-893 .wpforms-field.wpforms-full {
  flex: 1 1 100%;
}

/* 输入框样式 */
#wpforms-form-893 input[type="text"],
#wpforms-form-893 input[type="email"],
#wpforms-form-893 input[type="tel"],
#wpforms-form-893 textarea {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  padding: 12px 15px;
  color: #333333;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  transition: all 0.3s ease;
}

#wpforms-form-893 input:focus,
#wpforms-form-893 textarea:focus {
  border-color: #888888;
  outline: none;
}

/* 响应式：手机上一列 */
@media (max-width: 768px) {
  #wpforms-form-893 .wpforms-field {
    flex: 1 1 100%;
  }
}

/* 表单 893 的 submit button 样式 */
#wpforms-form-893 .wpforms-submit {
  background: #1B77D2 !important;
  border: 1px solid #E5E5E5 !important;
  color: #FFFFFF !important;
  width: 200px !important;
  height: 40px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
}

#wpforms-form-893 .wpforms-submit:hover {
  background: #1560B8 !important;
  border-color: #D0D0D0 !important;
}


/***WP Show Posts News***/
/* ====== WP Show Posts (ID: 963) - Two-column Responsive Layout ====== */
/* 针对 News 列表 #wpsp-963 的整体布局 */
.wp-show-posts-columns#wpsp-963{
  margin-left: 0 !important;
}

#wpsp-963 .wp-show-posts-single {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 20px !important;
  position: relative !important;
  padding-bottom: 30px;
}

#wpsp-963 .wp-show-posts-single .wp-show-posts-image::after {
  content: "";
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 5;
}

/* 左边图片 */
#wpsp-963 .wp-show-posts-image {
  width: 230px !important;
  height: 190px !important;
  grid-row: 1 / 3 !important;
  margin: 0 !important;
  position: relative !important;
}

#wpsp-963 .wp-show-posts-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* 右边内容区域 */
#wpsp-963 .wp-show-posts-inner {
  display: grid !important;
  grid-template-columns: 40% 1fr !important;
  grid-template-rows: auto auto !important;
  gap: 0 20px !important;
  margin: 5px !important;
}

/* 标题在第一行第二列 */
#wpsp-963 .wp-show-posts-entry-header {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* 摘要在第二行第二列 */
#wpsp-963 .wp-show-posts-entry-summary {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

/* 标题部分 */
#wpsp-963 .wp-show-posts-entry-header {
  margin-bottom: 10px !important;
}

#wpsp-963 .wp-show-posts-entry-title a {
  font-family: Montserrat !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  color: #000000 !important;
  line-height: 25px !important;
  text-decoration: none !important;
}

#wpsp-963 .wp-show-posts-entry-title a:hover {
  color: #0087D1 !important;
}

/* 当悬停在整个条目上时，标题也变色 */
#wpsp-963 .wp-show-posts-single:hover .wp-show-posts-entry-title a {
  color: #0087D1 !important;
}

/* 摘要部分 */
#wpsp-963 .wp-show-posts-entry-summary {
  font-family: Montserrat !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #666666 !important;
  line-height: 25px !important;
}

/* 加载更多按钮居中 */
.wpsp-load-more {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 20px 0 !important;
  gap: 10px !important;
}

/* 分页器数字链接样式 */
.wpsp-load-more .page-numbers {
  font-family: Montserrat !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  color: #000000 !important;
  line-height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  text-decoration: none !important;
  border-radius: 4px !important;
}

/* 每个page number之间距离60px */
.wpsp-load-more .page-numbers:not(.next):not(:last-child) {
  margin-right: 60px !important;
}

/* Next按钮与数字之间距离 */
.wpsp-load-more .next.page-numbers {
  margin-left: 60px !important;
  margin-right: 0 !important;
}

/* 当前页（active）背景色 */
.wpsp-load-more .page-numbers.current {
  background: #3083D6 !important;
  color: #ffffff !important;
}

/* Hover效果 - 有透明度的相同颜色 */
.wpsp-load-more .page-numbers:hover:not(.current) {
  background: rgba(48, 131, 214, 0.2) !important;
  color: #000000 !important;
  transition: background 0.3s ease !important;
}

/* 响应式：手机端上下排列 */
@media (max-width: 768px) {
  #wpsp-963 .wp-show-posts-single {
    flex-direction: column !important;
  }

  #wpsp-963 .wp-show-posts-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 15px 0 !important;
  }

  /* 图片在第一行 */
  #wpsp-963 .wp-show-posts-image {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 200px !important;
    margin: 0 !important;
  }

  /* 标题在第二行 */
  #wpsp-963 .wp-show-posts-entry-header {
    grid-column: 1 !important;
    grid-row: 2 !important;
    margin-bottom: 10px !important;
  }

  /* 摘要在第三行 */
  #wpsp-963 .wp-show-posts-entry-summary {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }
}

/* ====== Single News Banner - 突破容器限制（仅 single-news 页面） ====== */
@media (min-width: 922px) {
    .single-news .site-content .ast-container, 
    .post-type-archive-product .site-content .ast-container, 
    .tax-product_category .site-content .ast-container,
    .single-product .site-content .ast-container{
        display: flex;
        flex-direction: column;
    }
}

.single-news .news-single-article {
  padding: 0px !important;
}

.news-single-hero-wrapper, .product-hero-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.news-single-hero, .product-hero {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  height: 150px; /* 你可以改成想要的高度 */
}

/* 修正正文容器 */
.news-single-content, .products-archive-content {
  max-width: 1440px;
  margin: 0 auto;
}

.news-center-image {
  display: block;
  margin: 20px auto;
  max-width: 100%;
  height: auto;
}

.news-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 50px 0 20px;
  padding-top: 20px;
}

.news-nav-link {
  font-size: 16px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.news-nav-link:hover {
  color: #1B77D2;
}

.news-prev {
  padding-right: 50px;
  text-align: left;
  flex: 1;
}

.news-next {
  padding-left: 50px;
  text-align: right;
  flex: 1;
}

/* ====== Footer ====== */
.site-footer {
  background-color: #181a1b;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
  border-top-color: #181a1b;
}

.site-footer .product-category-list li {
  line-height: 28px !important;
}

/* 针对 footer widget 1 */

#custom_html-1 {
  color: #AAAAAA;
  font-weight: 400;
  font-size: 16px;
  line-height: 30px;
  min-width: 300px; /* 可根据需要调整宽度 */
}

#custom_html-1 .widget-title {
  color: #fff;
  font-size: 20px;
  line-height: 24px;
}

#custom_html-1 .contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#custom_html-1 .contact-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

#custom_html-1 .contact-list img {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  margin-top: 6px;
}

/* ===============================
   Product Categories Widget 样式
   =============================== */

.ast-builder-grid-row-3-equal .ast-builder-grid-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px; /* 可选：增加列间距 */
}

/* 限定只对 Product Categories 小组件生效 */
.widget_product_categories_widget {
  margin-bottom: 30px;
}

/* 小组件标题样式 */
.widget_product_categories_widget .widget-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: #FFFFFF !important;
  line-height: 24px;
  margin-bottom: 15px;
}

/* 分类列表整体 */
.widget_product_categories_widget .product-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 两列布局 */
  gap: 8px 20px; /* 上下间距8px，左右间距20px */
}

/* 每个分类项 */
.widget_product_categories_widget .product-category-list li {
  margin: 0;
}

/* 分类链接样式 */
.widget_product_categories_widget .product-category-list a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #AAAAAA;
  line-height: 30px;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* 悬停效果 */
.widget_product_categories_widget .product-category-list a:hover {
  color: #FFFFFF;
}

/* 小屏幕（手机）单列显示 */
@media (max-width: 768px) {
  .widget_product_categories_widget .product-category-list {
    grid-template-columns: 1fr;
  }
}

/* 产品分类网格 */
.product-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 20px;
}

/* 每个产品卡片 */
.product-category-grid .product-category-card {
  position: relative;
  background: #FFFFFF;
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  overflow: hidden;
  min-height: 240px;
  transition: all 0.3s ease;
}

/* 左侧内容 */
.product-category-grid .product-content {
  flex: 1;
  color: #000;
  padding: 32px 8px 32px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-category-grid .product-title {
  font-family: Montserrat;
  font-weight: 400;
  font-size: 24px;
  color: #000000;
  margin: 0;
}

.product-sublist {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: #444;
  line-height: 24px;
}

/* 右侧图片 */
.product-image {
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  padding: 10px;
}

/* 悬停效果 */
.product-category-card:hover {
  background: #4CAF50 !important;
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1) !important;
  opacity: 0.9 !important;
  color: #fff;
}

.product-category-card:hover .product-title,
.product-category-card:hover .product-sublist li,
.product-category-card:hover .view-more {
  color: #fff;
}

.product-category-card:hover .product-image img {
  opacity: 0.3;
  transform: scale(1.05);
}

/* "View More" 链接 */
.product-category-grid .view-more {
  font-weight: 400;
  font-size: 16px;
  color: #000000;
  line-height: 40px;
  opacity: 0.5;
  text-decoration: none;
  display: inline-block;
  margin: 0;
  align-self: flex-start;
}

.product-category-grid .product-card:hover .view-more {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}

/* 响应式布局 */
@media (min-width: 1000px) and (max-width: 1300px) {
  .product-image {
    width: 180px;
    height: 200px;
  }
  .product-category-grid .product-title {
    font-size: 18px !important;
  }
  
  .product-image img {
    padding: 20px;
  }
}

@media (max-width: 1024px) {
  .product-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-category-grid .product-title {
    font-size: 18px !important;
  }
  
  .product-image img {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .product-category-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== Product Archive Categories Sidebar ====== */
.product-categories {
  background: #F6F6F6;
  border: none;
  padding: 0;
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  line-height: 60px;
}

.product-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-category-list li {
  margin: 0;
  line-height: 60px;
}

.product-category-list .category-link {
  display: block;
  padding: 0 15px;
  text-decoration: none;
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  line-height: 60px;
  transition: all 0.3s ease;
}

/* 一级分类 */
.category-level-1 .category-link {
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  line-height: 60px;
  flex: 1;
}

/* 分类项包装器 */
.category-item-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 折叠按钮 */
.category-toggle {
  background: inherit; /* 继承父元素的背景颜色 */
  border: none;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 60px;
  transition: color 0.3s ease, background 0.3s ease;
  color: #333333;
  font-size: 14px;
  line-height: 1;
}

/* 激活状态下的按钮颜色 */
.category-level-1.active .category-toggle, .category-level-1:hover .category-toggle {
  color: #FFFFFF;
  background: #1976D2; /* 跟随一级分类的蓝色背景 */
}

.category-toggle i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* 激活的一级分类 */
.category-level-1.active > .category-item-wrapper > .category-link {
  font-weight: 400;
  font-size: 16px;
  color: #FFFFFF;
  line-height: 60px;
  background: #1976D2;
}

.category-level-1 > .category-item-wrapper > .category-link:hover  {
  background: #1976D2;
  color: #FFFFFF;
}

/* 激活的一级分类对应的所有二级分类区域 */
.sub-categories.active-parent {
  background: #FFFFFF;
}

/* 二级分类 */
.category-level-2 .category-link {
  padding-left: 30px;
  position: relative;
  background: transparent !important; /* 确保二级分类不受一级分类样式影响 */
}

/* 激活的二级分类 - 添加竖线 */
.category-level-2.active .category-link {
  position: relative;
  background: rgba(48, 131, 214, 0.1) !important; /* 使用 !important 确保优先级 */
}

.category-level-2.active .category-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #3083D6;
}

/* 二级分类 hover 效果 */
.category-level-2 .category-link:hover {
  background: rgba(48, 131, 214, 0.1);
}

.sub-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* 默认折叠状态 */
.sub-categories.collapsed {
  max-height: 0;
  opacity: 0;
  display: none;
}

/* 展开状态 */
.sub-categories.expanded {
  max-height: 1000px;
  opacity: 1;
  display: block;
}

/* ====== Product Card Styles ====== */
.product-card {
  background: #FFFFFF;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 4%), 
              0px -2px 10px 0px rgba(0, 0, 0, 4%),
              2px 0px 10px 0px rgba(0, 0, 0, 4%),
              -2px 0px 10px 0px rgba(0, 0, 0, 4%);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  padding: 0px !important;
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 图片区域 */
.product-thumb {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-thumb img {
  height: auto;
  width: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  background: #f5f5f5;
}

/* Hover 覆盖层 */
.product-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 64px; /* 留出标题区域 */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-hover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.product-search-icon {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-category-name {
  color: #FFFFFF;
  font-family: Montserrat;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 标题区域 */
.product-title-wrapper {
  background: #F6F6F6;
  padding: 0;
  text-align: center;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.product-title {
  font-family: Montserrat;
  font-weight: 400;
  font-size: 14px;
  color: #000000;
  line-height: 24px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 48px; /* 2行：24px * 2 = 48px */
}

.product-view-more {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #FFFFFF;
  font-family: Montserrat;
  font-weight: 400;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding-right: 20px;
}

.arrow-icon {
  width: 16px;
  height: 16px;
}

/* Hover 效果 */
.product-card:hover {
  background: #1976D2 !important;
  opacity: 0.9 !important;
}

.product-card:hover .product-thumb {
  background: rgba(25, 118, 210, 0.5); /* hover时图片区域背景为半透明蓝色 */
}

.product-card:hover .product-thumb img {
  opacity: 0.7; /* 提高图片可见度 */
}

.product-card:hover .product-hover-overlay {
  opacity: 1;
  background: rgba(25, 118, 210, 0.5); /* hover时遮罩层背景为半透明蓝色 */
}

.product-card:hover .product-search-icon,
.product-card:hover .product-category-name {
  opacity: 1;
}

.product-card:hover .product-title-wrapper {
  opacity: 1;
  background: rgba(25, 118, 210, 0.5);
}

.product-card:hover .product-title {
  display: none; /* hover时隐藏标题 */
}

.product-card:hover .product-view-more {
  display: flex; /* hover时显示View More */
  opacity: 1;
}

/* ====== Single Product Detail ====== */
/* Product Archive Layout - Desktop */
.products-archive {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}

/* Product Grid - Desktop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* ====== Best Sales Products Carousel ====== */
.best-sales-carousel-outer-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.best-sales-carousel-wrapper {
  position: relative;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  overflow: visible; /* 允许箭头显示在外部 */
  padding: 0;
  box-sizing: border-box;
}

.best-sales-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.best-sales-carousel-container {
  display: flex;
  gap: 24px;
  transition: transform 0.3s ease;
  will-change: transform;
  padding: 10px;
}

.best-sales-item {
  flex-shrink: 0;
  width: calc((100% - 72px) / 4); /* 桌面端：4个item，减去3个gap (24px * 3 = 72px) */
  min-width: calc((100% - 72px) / 4);
  max-width: calc((100% - 72px) / 4);
}

.best-sales-nav {
  position: absolute;
  top: 50%;
  color: #333;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.best-sales-nav:hover {
  width: 24px !important;
  height: 24px !important;
  color: #1976D2;
  background: #EAF5FF !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.best-sales-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.best-sales-nav-prev {
  left: -60px; /* 放在1440px容器外部左侧 */
}

.best-sales-nav-next {
  right: -60px; /* 放在1440px容器外部右侧 */
}

.best-sales-nav i {
  font-size: 16px;
  color: #333;
}

.best-sales-nav:disabled,
.best-sales-nav[style*="opacity: 0.3"] {
  cursor: not-allowed;
  opacity: 0.3;
}

/* 移动端样式 */
@media (max-width: 768px) {
  .best-sales-carousel-outer-wrapper {
    padding: 0 50px !important; /* 移动端减少padding */
  }
  
  .best-sales-carousel-wrapper {
    padding: 0;
  }
  
  .best-sales-item {
    width: 100% !important; /* 移动端：显示1个item */
    min-width: 100% !important;
  }
  
  .best-sales-nav {
    width: 24px;
    height: 24px;
  }
  
  .best-sales-nav:hover {
    width: 24px !important;
    height: 24px !important;
    background: #EAF5FF !important;
  }
  
  .best-sales-nav i {
    font-size: 20px;
  }
  
  .best-sales-nav-prev {
    left: 0; /* 移动端按钮在容器内 */
  }
  
  .best-sales-nav-next {
    right: 0; /* 移动端按钮在容器内 */
  }
}

/* 确保在小于14400px的屏幕上，按钮不会超出视口 */
@media (max-width: 1440px) {
  .best-sales-carousel-outer-wrapper {
    padding: 0 40px; /* 小屏幕上减少padding，按钮在容器内 */
  }
  
  .best-sales-nav-prev {
    left: -40px; /* 小屏幕上按钮在容器内 */
  }
  
  .best-sales-nav-next {
    right: -40px; /* 小屏幕上按钮在容器内 */
  }

  .ast-builder-grid-row-3-equal .ast-builder-grid-row,
  .news-single-content, 
  .products-archive-content,
  .single-product-content {
    padding: 0 20px;
  }
}

.single-product .products-archive {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}

.single-product-detail {        ƒ
  background: #FFFFFF;
  box-shadow: 0 0 10px rgba(0,0,0,0.06);
  padding: 24px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 20px;
  align-items: start;
}

.single-product-header {
  margin-bottom: 20px;
}
.single-product-category {
  font-family: Montserrat;
  font-weight: 400;
  font-size: 16px;
  color: #999;
  margin-bottom: 6px;
}
.single-product-title {
  font-family: Montserrat;
  font-weight: 400;
  font-size: 24px;
  color: #000000;
  line-height: 32px;
  margin: 0;
}

.single-product-shortdesc {
  margin-top: 12px;
  font-weight: 400;
  font-size: 16px;
  color: #666666;
  line-height: 28px;
  color: #666;
}

.product-gallery {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
}

.product-gallery-thumbs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.product-gallery-thumbs .thumb-nav {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  padding: 4px;
  transition: opacity 0.3s ease;
  position: relative;
}

/* 桌面端：显示上下箭头，隐藏左右箭头 */
.product-gallery-thumbs .thumb-nav .desktop-icon {
  display: inline-block;
}

.product-gallery-thumbs .thumb-nav .mobile-icon {
  display: none;
}
.product-gallery-thumbs .thumb-nav:hover {
  color: #333;
}
.product-gallery-thumbs .thumb-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 滚动容器 - 限制显示4个缩略图 */
.thumb-scroll-container {
  height: 352px; /* 4个缩略图：80px + 8px gap = 88px * 4 = 320px */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

/* 隐藏滚动条但保持滚动功能 */
.thumb-scroll-container::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.thumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-gallery-thumbs li {
  margin: 0;
  flex-shrink: 0;
}

.product-gallery-thumbs li a {
  display: block;
  border: 1px solid #EEE;
  width: 80px;
  height: 80px;
  overflow: hidden;
}
.product-gallery-thumbs li a.active { border-color: #1882B3; }
.product-gallery-thumbs img { width: 80px; height: 80px; object-fit: cover; display: block; }

.product-gallery-main {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-gallery-main img { max-width: 100%; height: auto; object-fit: contain; }
.product-main-placeholder { width: 100%; height: 420px; background: #f5f5f5; }

.single-product-body { margin-top: 20px; }
.single-product-content { font-size: 16px; line-height: 28px; color: #333; }

/* Related Products Section */
.single-product-related-products, .single-product-inquery-form {
  margin-top: 40px;
}

.single-product-related-products-list, .single-product-inquery-form-content {
  width: 100%;
}
.single-product-inquery-form-content-title-wrapper {
  background: #F6F6F6;
  border: 1px solid #EEEEEE;
  padding: 8px 12px;
}
.single-product-inquery-form-content-title {
  font-weight: 400;
  font-size: 16px;
  color: #666666;
  line-height: 30px;
}
.single-product-content-title-wrapper { padding: 15px 0; }
.single-product-content-title { font-size: 24px; line-height: 28px; color: #1B77D2; font-weight: 600;}
.product-pdf { margin-top: 16px; }
.product-pdf-button { 
    display: inline-block; 
    width: 250px; 
    height: 42px; 
    background: #4CAF50; 
    font-weight: 500; 
    font-size: 16px; 
    color: #FFFFFF; 
    line-height: 24px; 
    text-align: center; 
    text-decoration: none; 
    border-radius: 4px; 
    padding: 8px; 
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-pdf-button:hover {
    background: #45a049;
    color: #FFFFFF;
}

@media (max-width: 768px) {
  /* Product Archive - 移动端布局 */
  .products-archive {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* 移动端隐藏产品分类侧边栏 */
  .product-categories {
    display: none !important;
  }
  
  /* 移动端产品网格显示为一列 */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* 移动端产品卡片优化 */
  .product-card {
    height: auto !important;
    min-height: 300px;
  }
  
  .product-title-wrapper {
    min-height: 64px !important;
  }
  
  /* Product Detail - 移动端布局 */
  .single-product-detail {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow-x: hidden;
  }
  
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .product-gallery {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 移动端：main 图片先显示 */
  .product-gallery-main {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .product-gallery-main img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* 移动端：thumbs 图片后显示，横向排列 */
  .product-gallery-thumbs {
    order: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 0 !important;
    height: 100px !important; /* 固定高度：80px图片 + 上下padding */
    min-height: 100px !important;
    max-height: 100px !important;
  }

  /* 移动端缩略图滚动容器 - 显示3个（每个80px + gap） */
  .product-gallery-thumbs .thumb-scroll-container {
    flex: 1 !important;
    /* 容器宽度：3个缩略图（80px * 3） + 2个gap（8px * 2） = 256px */
    width: 256px !important;
    max-width: 256px !important;
    height: 80px !important; /* 固定高度与缩略图一致 */
    min-height: 80px !important;
    max-height: 80px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
  }

  .product-gallery-thumbs .thumb-scroll-container::-webkit-scrollbar {
    display: none !important;
  }

  .product-gallery-thumbs ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: max-content !important;
    height: 80px !important; /* 固定高度与缩略图一致 */
    align-items: center !important;
  }

  /* 移动端缩略图保持 80px x 80px */
  .product-gallery-thumbs li {
    flex-shrink: 0 !important;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    height: 80px !important;
    scroll-snap-align: start !important;
  }

  .product-gallery-thumbs li a {
    display: block !important;
    width: 80px !important;
    height: 80px !important;
    border: 1px solid #EEE !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .product-gallery-thumbs li a.active {
    border-color: #1882B3 !important;
  }

  .product-gallery-thumbs li img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* 移动端导航按钮样式 */
  .product-gallery-thumbs .thumb-nav {
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.3s ease !important;
    align-self: center !important; /* 确保按钮与缩略图垂直对齐 */
  }

  /* 移动端：显示左右箭头，隐藏上下箭头 */
  .product-gallery-thumbs .thumb-nav .desktop-icon {
    display: none !important;
  }

  .product-gallery-thumbs .thumb-nav .mobile-icon {
    display: inline-block !important;
    font-size: 14px !important;
    color: #333 !important;
  }

  .product-gallery-thumbs .thumb-nav:hover {
    background: rgba(0, 0, 0, 0.2) !important;
  }

  .product-gallery-thumbs .thumb-nav:hover .mobile-icon {
    color: #333 !important;
  }

  .single-product-header {
    padding: 0 5px !important;
    text-align: left !important;
  }

  .single-product-title {
    font-size: 20px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
  }

  .single-product-shortdesc {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .product-pdf-button {
    font-size: 14px !important;
  }
  
  .single-product-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }
  
  .single-product-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* 确保容器不会超出 */
  .products-archive-content {
    padding: 10px !important;
    box-sizing: border-box !important;
  }
  
  section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .product-category-grid .product-title {
    font-size: 18px !important;
  }
  
  .product-image img {
    padding: 20px;
  }
}

/* Product Category Grid View More Button */
.product-category-grid-view-more {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.product-category-grid-view-more .view-more-button {
  width: 240px;
  height: 48px;
  background: #4CAF50;
  font-family: Montserrat;
  font-weight: 400;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.product-category-grid-view-more .view-more-button:hover {
  background: #45a049;
  opacity: 0.9;
}

.search.search-results .site-main{
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 24px;
}

.search .ast-container section.ast-archive-description {
  padding: 24px 0 !important;
}

.search .ast-container .ast-archive-description .ast-archive-title{
  font-size: 24px;
  font-weight: 600;
}

.search .ast-container .ast-page-builder-template .entry-header {
  margin-top: 24px !important;
}

.search .ast-container img {
  max-width: 360px !important;
}

.header-custom-block{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.header-contact-us-button {
  border-color: #4caf50;
  background-color: #4caf50;
  border-radius: 24px;
  padding: 6px 18px;
  color: #ffffff;
  margin-right: 10px;
}

.header-contact-us-button .contact-us-menu-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-family: Montserrat;
}


.gt_switcher {
  width: 58px !important;
}

.gt_switcher .gt_option {
  width: 58px !important;
  border: none !important;
  background: none !important;
}

.gt_switcher .gt_selected {
  background: none !important;
}

.gt_switcher .gt_selected a {
  width: 58px !important;
  border: none !important;
}