/* === 隐藏 Shop 页面中文排序和数量 === */
.woocommerce-result-count,
.woocommerce-ordering {
    display: none !important;
}

/* === 隐藏产品页底部自动相关产品（用手动推荐代替） === */
.single-product .related.products {
    display: none !important;
}

/* === Contact Us 卡片样式 === */
.alibaba-contact-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 25px;
}
.alibaba-contact-card h4 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.contact-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.contact-person img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.qr-code {
    width: 100px !important;
    display: block;
    margin: 0 auto 15px;
}
.contact-now-btn {
    display: block;
    background: #c8102e;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.contact-now-btn:hover {
    background: #a50d24;
}

/* === 右侧手动推荐产品 === */
.recommend-title {
    font-size: 16px;
    font-weight: 600;
    margin: 30px 0 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.recommend-product {
    margin-bottom: 15px;
}
.recommend-product a {
    text-decoration: none;
    color: #333;
}
.recommend-product img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}
.recommend-product p {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* === 隐藏 Shop 页面分页 === */
.woocommerce-pagination {
    display: none !important;
}

/* === 隐藏 Shop 页面底部多余产品模块 === */
.post-type-archive-product .products ~ .elementor-section,
.post-type-archive-product .products ~ .e-con,
.post-type-archive-product .products ~ .elementor-widget-wrap,
.post-type-archive-product .products ~ .ast-woocommerce-container ~ *,
.post-type-archive-product .products ~ .ast-container ~ .elementor {
    display: none !important;
}

/* === 产品页整体加宽 === */
.single-product .ast-container {
    max-width: 1400px !important;
}

/* === 图片和标题并排，节省高度 === */
.single-product .product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    align-items: flex-start !important;
}

.single-product .woocommerce-product-gallery {
    width: 45% !important;
    max-width: 500px !important;
}

.single-product .entry-summary {
    width: 50% !important;
}

/* === 标题缩小 === */
.single-product .product_title {
    font-size: 26px !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
}

/* === 描述文字宽度放宽 === */
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-tabs {
    width: 100% !important;
    max-width: 100% !important;
}

/* === 隐藏 Tabs 标签（描述/Reviews）和中文"描述" === */
.single-product .woocommerce-tabs .tabs {
    display: none !important;
}

.single-product .woocommerce-Tabs-panel {
    border-top: none !important;
    padding-top: 0 !important;
}

/* === 减小图片下方缩略图大小 === */
.single-product .flex-control-thumbs li {
    width: 60px !important;
    margin-right: 8px !important;
}

/* === 右侧边栏固定宽度 === */
.single-product #secondary {
    width: 260px !important;
}

/* === 右侧边栏加宽 === */
.single-product #secondary {
    width: 320px !important;
    min-width: 320px !important;
}

/* === 主内容区相应调整 === */
.single-product .woocommerce-product-gallery {
    width: 40% !important;
}

.single-product .entry-summary {
    width: 55% !important;
}

/* ===== 强制 Footer Builder 列顶部对齐 ===== */
.site-footer .ast-builder-footer-grid-columns,
.site-footer .ast-builder-grid-row,
.site-footer .site-footer-section,
.ast-builder-layout-element,
.site-footer .widget-area {
    align-items: flex-start !important;
    align-self: flex-start !important;
}

/* ===== 公司信息块样式 + 上移 ===== */
.footer-company-block {
    text-align: right;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin-top: -200px !important;  /* 没对齐就调这个数字，-40 / -50 / -70 / -80 试 */
    padding-top: 0 !important;
}

.footer-company-block .footer-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-bottom: 12px;
}

.footer-company-block .footer-logo img {
    width: 44px;
    height: auto;
}

.footer-company-block .footer-logo h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    color: #ffffff;
}

.footer-company-block .footer-contact-list {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.footer-company-block .footer-contact-list div {
    margin-bottom: 2px;
}

.footer-company-block .footer-contact-list strong {
    color: #ffffff;
    font-weight: 500;
    margin-right: 6px;
}

.footer-company-block .footer-contact-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-company-block .footer-contact-list a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* 移动端：不偏移，正常显示 */
@media (max-width: 768px) {
    .footer-company-block {
        margin-top: 0 !important;
        text-align: left;
    }
    .footer-company-block .footer-logo {
        justify-content: flex-start;
    }
}

.alibaba-contact-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    text-align: center;
}

.alibaba-contact-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.alibaba-contact-card .contact-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    text-align: left;
}

.alibaba-contact-card .contact-person img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.alibaba-contact-card .contact-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.alibaba-contact-card .contact-info p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.alibaba-contact-card .whatsapp-line {
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.alibaba-contact-card .whatsapp-line a {
    color: #25d366;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.alibaba-contact-card .whatsapp-line a:hover {
    text-decoration: underline;
}

.alibaba-contact-card .contact-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #d3112c;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 10px;
}

.alibaba-contact-card .contact-btn:hover {
    background: #b00e24;
}

.site-search-box {
    max-width: 400px;
    margin: 0 0 0 auto;
}
.site-search-box form {
    display: flex;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.site-search-box input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
}
.site-search-box button {
    border: none;
    background: #d3112c;
    color: #fff;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
}
.site-search-box button:hover {
    background: #b00e24;
}

.site-search-box {
    margin-bottom: 24px;
}
.site-search-box form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.site-search-box input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
}
.site-search-box button {
    border: none;
    background: #d3112c;
    color: #fff;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
}
.site-search-box button:hover {
    background: #b00e24;
}

.site-search-box {
    margin-bottom: 24px;
}
.site-search-box form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.site-search-box input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
}
.site-search-box button {
    border: none;
    background: #d3112c;
    color: #fff;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
}
.site-search-box button:hover {
    background: #b00e24;
}

/* ===== 强制干掉侧边栏分类列表里所有图标/图片 ===== */
.sidebar .product-categories li *,
.sidebar .wc-block-product-categories-list-item *,
.widget_product_categories li *,
.widget .product-categories li *,
aside .widget li .cat-item * {
    background-image: none !important;
}

.sidebar .product-categories li img,
.sidebar .product-categories li svg,
.sidebar .product-categories li i,
.sidebar .product-categories li span:not(.count),
.sidebar .wc-block-product-categories-list-item img,
.sidebar .wc-block-product-categories-list-item svg,
.sidebar .wc-block-product-categories-list-item i,
.sidebar .wc-block-product-categories-list-item span:not(.wc-block-product-categories-list-item-count),
.widget_product_categories li img,
.widget_product_categories li svg,
.widget_product_categories li i,
.widget_product_categories li span:not(.count) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 干掉伪元素图标 */
.sidebar .product-categories li::before,
.sidebar .product-categories li::after,
.sidebar .product-categories li a::before,
.sidebar .product-categories li a::after,
.sidebar .wc-block-product-categories-list-item::before,
.sidebar .wc-block-product-categories-list-item::after,
.widget_product_categories li::before,
.widget_product_categories li::after {
    content: none !important;
    display: none !important;
}

/* 修正行高和截断 */
.sidebar .product-categories,
.sidebar .wc-block-product-categories-list,
.widget_product_categories ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.sidebar .product-categories li,
.sidebar .wc-block-product-categories-list-item,
.widget_product_categories li {
    line-height: 1.8 !important;
    min-height: auto !important;
    overflow: visible !important;
    padding-left: 0 !important;
    margin-bottom: 8px !important;
}

/* 把旧邮箱隐藏，显示新邮箱 */
a[href="mailto:sales@kstcasting.com"] {
    font-size: 0 !important;
    color: inherit;
    text-decoration: none;
}
a[href="mailto:sales@kstcasting.com"]::after {
    content: "sales@cnsandcasting.com";
    font-size: 16px;
    color: inherit;
}

.footer-company-block {
    text-align: right;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.footer-company-block .footer-logo h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 12px 0;
    color: #ffffff;
}

.footer-company-block .footer-contact-list {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.footer-company-block .footer-contact-list div {
    margin-bottom: 4px;
}

.footer-company-block .footer-contact-list strong {
    color: #ffffff;
    font-weight: 500;
    margin-right: 6px;
}

.footer-company-block .footer-contact-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.footer-company-block .footer-contact-list a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-company-block {
        text-align: left;
    }
}

/* 1. 隐藏 Contact 标题上的异常 LOGO/乱码 */
.page .entry-header img,
.page .entry-title img,
.entry-header .custom-logo,
.ast-breadcrumbs img {
    display: none !important;
}

//* ===== 修复 Contact 标题上的异常图标/LOGO ===== */
h1.entry-title::before,
h1.page-title::before,
.entry-header::before,
.page-header::before {
    content: none !important;
    background-image: none !important;
}

h1.entry-title img,
h1.page-title img,
.entry-header img,
.page-header img {
    display: none !important;
}

/* ===== 替换 Contact 页面里的错误邮箱 ===== */
.entry-content ul li:nth-child(2) a,
.elementor-icon-list-items li:nth-child(2) a,
.contact-info-list li:nth-child(2) a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}


.entry-content ul li:nth-child(2) a::after,
.elementor-icon-list-items li:nth-child(2) a::after,
.contact-info-list li:nth-child(2) a::after {content:"sales@cnsandcasting.com";
    font-size: 16px;
    color: inherit;
}

.rc-rq-box {
  margin: 20px 0 24px;
  padding: 18px;
  background: #f6f8fa;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
}
.rc-rq-box a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .15s ease;
}
.rc-rq-box a:hover { opacity: .88; }
.rc-rq-wa   { background: #25D366; color: #fff; }
.rc-rq-mail { background: #fff; color: #1a1a1a; border: 1px solid #d0d7de; }
.rc-ico {
  width: 18px; height: 18px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24'><path d='M12 2a10 10 0 0 0-8.6 15L2 22l5.2-1.4A10 10 0 1 0 12 2Z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24'><path d='M12 2a10 10 0 0 0-8.6 15L2 22l5.2-1.4A10 10 0 1 0 12 2Z'/></svg>") center / contain no-repeat;
}
.rc-ico-mail {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24'><path d='M3 5h18v14H3z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24'><path d='M3 5h18v14H3z'/></svg>");
}
.rc-rq-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}
@media (max-width: 600px) {
  .rc-rq-box a { font-size: 16px; padding: 15px; }
}

/* 全局兜底：所有新版 atomic 容器一律横排 + 居中，图片不超容器 */
.e-flexbox-base {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.e-image-base {
  max-width: 100%;
  height: auto;
}
.e-self-hosted-video-base {
  max-width: 100%;
  height: auto;
}

/* ===== 首页图片/视频尺寸应急修复 =====
   原因：Elementor atomic 组件 CSS 未生成，容器失去布局约束。
   ★ Elementor 重新生成 CSS 并恢复后，请整段删除，避免和官方样式打架。 */

/* 1) 车间照片组：恢复一行四张，不再各占整行 */
.elementor-element-aaaf508 {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  justify-content: center !important;
}
.elementor-element-aaaf508 > img {
  flex: 1 1 200px !important;
  max-width: 280px !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 8px;
}

/* 2) 工厂实拍照 + IATF 证书：左大右小两栏 */
.elementor-element-4adf9d7 {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 30px !important;
  align-items: center !important;
  justify-content: center !important;
}
.elementor-element-4adf9d7 > .elementor-element-a94c333 {
  flex: 1 1 480px !important;
  max-width: 640px !important;
}
.elementor-element-4adf9d7 > .elementor-element-5a665fd {
  flex: 0 1 300px !important;
  max-width: 300px !important;
}
.elementor-element-4adf9d7 img {
  width: 100% !important;
  height: auto !important;
}

/* 3) 视频：限宽居中，保持原始比例不变形 */
.elementor-element-d7f9d58 {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.elementor-element-d7f9d58 video {
  display: block;
  width: 100% !important;
  max-width: 1100px !important;
  height: auto !important;
  margin: 0 auto;
}

/* 4) 移动端兜底：任何图片视频都不许超出屏幕 */
@media (max-width: 767px) {
  .e-image-base,
  .e-flexbox-base > img {
    max-width: 100% !important;
    height: auto !important;
  }
  .elementor-element-d7f9d58 video {
    max-width: 100% !important;
  }
  .elementor-element-aaaf508 > img {
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
}