/*
Theme Name: Astra Child
Template: astra
Description: Child theme for Astra (Product Meta Contact Button)
Version: 1.1.0
*/
/* ================================
Product page – Contact Us button
UAGB-style button clone
================================ */

/* 给 Meta 和按钮之间真正留出空间 */
body.single-product .product_meta {
    padding-bottom: 32px;
    /* 呼吸空间，最稳 */
}

/* Contact Us 包裹容器 */
body.single-product .product-contact-wrapper {
    display: block;
    width: 100%;
    margin-top: 10px;
    clear: both;
    border-top: 0px solid rgba(0, 0, 0, 0.08);
    padding-top: 24px;
}

/* 按钮本身 - 已隐藏（功能重复，保留文字链接即可） */
body.single-product .product-contact-cta {
    display: none;
    /* 原按钮样式保留以便日后需要时恢复 */
    /* display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 24px 0 0;
    padding: 14px 32px;
    min-height: 48px;
    background-color: #d32f2f;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition:
        background-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease; */
}

body.single-product .product-contact-cta:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}



/* 移动端稍微放大 */
@media (max-width: 768px) {
    body.single-product .product-contact-cta {
        width: 100%;
        padding: 16px 20px;
        font-size: 17px;
    }
}

/* Inquiry Status styles moved to dashboard-leads.php for better encapsulation */


/* 针对 CF7 在 Spectra Container 的行间距调整 */
.spectra-container .wpcf7-form .wpcf7-label {
    margin-bottom: 6px;
    /* 原本可能是 10px，缩小行间距 */
    line-height: 1.4;
    /* 调整文字行高，可根据需求微调 */
}

.spectra-container .wpcf7-form .wpcf7-input,
.spectra-container .wpcf7-form .wpcf7-textarea {
    margin-bottom: 8px;
    /* 表单元素之间的间距 */
}

/* ================================
   WooCommerce Catalog - Hide Add to Cart Button
   隐藏产品目录页图片上的购物车图标（B2B模式，不需要快速加购）
   ================================ */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap .ast-on-card-button,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap .added_to_cart {
    display: none !important;
}

/* 隐藏面包屑导航（Home / Products） */
.woocommerce .ast-woocommerce-container .woocommerce-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb {
    display: none !important;
}

/* 隐藏商品数量显示（Showing 1-12 of 23 results） */
.woocommerce .woocommerce-result-count,
.woocommerce-page .woocommerce-result-count {
    display: none !important;
}

/* 数据类区块，彻底脱离动画体系 */
.no-motion,
.no-motion * {
    transform: none !important;
    animation: none !important;
    transition-property: opacity !important;
}

/* ================================
   Shop Page ONLY Spacing Fix
   只针对默认的全部商品页面 (Shop Page) 增加顶部间距
   避免影响其他 Category 页面的 Hero 区域
   ================================ */
body.post-type-archive-product #primary {
    margin-top: 150px;
    /* 用户指定的间距 */
}

/* 移动端可能需要调整，这里先保持一致，或者根据需要修改 */
@media (max-width: 768px) {
    body.post-type-archive-product #primary {
        margin-top: 80px;
        /* 移动端通常Header较矮，可酌情减小 */
    }
}

/* ================================
   Single Product Page - Mobile Layout Fix
   修复单品页移动端布局偏移问题
   问题原因：Astra Customizer 生成的 inline CSS 给 #primary 设置了 120px 四周 margin
   这个 margin 在移动端导致 body 内容右偏（因为 width:100% + margin-left:120px = 溢出）
   ================================ */
@media (max-width: 921px) {

    /* 使用更高特异度选择器覆盖 Astra 的 .site .site-content #primary */
    body.single-product .site .site-content #primary,
    body.single-product.ast-separate-container .site .site-content #primary {
        margin-left: 0;
        margin-right: 0;
        /* 保留适量的顶部和底部 margin */
        margin-top: 60px;
        margin-bottom: 60px;
        /* 添加内边距代替外边距，保持内容不贴边 */
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 确保容器宽度正确 */
    body.single-product #primary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}