/* 
Theme Name: Net158 Child v3.1
Theme URI: https://net158.com
Description: 极致性能展示版 - 专为 Hello Elementor 定制，禁用支付与营销，优化中英混排。
Author: 粹介网络
Author URI: https://net158.com
Template: hello-elementor
Version: 3.1.0
Text Domain: hello-elementor-child
*/

/* =============================================
   1. 字体声明 (@font-face) - 引入字符范围锁定
   ============================================= */

/* Poppins - 标题专用 (U+0000-00FF 覆盖拉丁字母/数字) */
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}

/* Inter - 正文专用 */
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF;
}

/* =============================================
   2. 响应式流体字号 (390px -> 1440px)
   ============================================= */
:root {
    --fluid-12: clamp(0.75rem, 0.05vw + 0.73rem, 0.75rem);
    --fluid-14: clamp(0.8125rem, 0.2vw + 0.75rem, 0.875rem);
    --fluid-16: clamp(0.9375rem, 0.2vw + 0.85rem, 1rem);
    --fluid-18: clamp(1rem, 0.3vw + 0.9rem, 1.125rem);
    --fluid-20: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
    --fluid-22: clamp(1.1875rem, 0.8vw + 1rem, 1.375rem);
    --fluid-24: clamp(1.25rem, 1vw + 1rem, 1.5rem);
    --fluid-26: clamp(1.3125rem, 1.2vw + 1rem, 1.625rem);
    --fluid-28: clamp(1.375rem, 1.5vw + 1rem, 1.75rem);
    --fluid-30: clamp(1.4375rem, 2vw + 0.8rem, 1.875rem); 
    --fluid-32: clamp(1.5rem, 2.5vw + 0.8rem, 2rem);
    --fluid-34: clamp(1.625rem, 2.5vw + 0.9rem, 2.125rem); 
    --fluid-36: clamp(1.6875rem, 2.5vw + 1rem, 2.25rem);
    --fluid-42: clamp(1.875rem, 2.5vw + 1.25rem, 2.625rem);
    --fluid-48: clamp(2.125rem, 6vw + 0.7rem, 3rem);

    /* 语义化映射 */
    --fs-h1: var(--fluid-42); --fs-h2: var(--fluid-32); --fs-h3: var(--fluid-28);
    --fs-h4: var(--fluid-24); --fs-h5: var(--fluid-20); --fs-h6: var(--fluid-18);
    --fs-body: var(--fluid-16); --fs-small: var(--fluid-14);

    --fluid-py: clamp(2.5rem, 4vw + 1.5rem, 5rem);
    --fluid-px: 1.25rem;
}

/* =============================================
   3. 核心感应逻辑 (中英混排优化)
   ============================================= */

/* 默认状态 (英文优先) */
:root {
    --font-main: 'Inter', -apple-system, system-ui, sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

/* 中文站状态：数字/英文用 Inter/Poppins，汉字用系统字体 */
:root:lang(zh) {
    --font-main: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-heading: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 渲染平滑优化 */
*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .elementor-heading-title, .elementor-button, .elementor-nav-menu a {
    font-family: var(--font-heading) !important;
}
body, p, .elementor-text-editor, .elementor-widget-text-editor {
    font-family: var(--font-main) !important;
}

/* 中文排版细节调整 */
:root:lang(zh) body { line-height: 1.8; }
:root:lang(zh) :is(h1, h2, h3, h4, h5, h6, .elementor-heading-title) { line-height: 1.4; letter-spacing: 0; }
:root:lang(zh) :is(p, .elementor-widget-text-editor, body) {
    font-weight: 400 !important;
    letter-spacing: 0.02em; 
}

/* =============================================
   4. WooCommerce 极致展示模式 (去交易化)
   ============================================= */

/* 隐藏所有价格、加入购物车按钮、数量选择器 */
.price, 
.amount, 
.woocommerce-Price-amount,
.button.add_to_cart_button,
.single_add_to_cart_button,
.quantity,
.ajax_add_to_cart,
.woocommerce-variation-add-to-cart {
    display: none !important;
}

/* 隐藏单品页购物车表单区域及边距 */
.summary .cart, 
.product .cart,
.woocommerce div.product form.cart {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 隐藏右上角购物车图标（如果主题自带） */
.elementor-menu-cart__wrapper, 
.cart-contents {
    display: none !important;
}

/* =============================================
   5. 通用 UI 与 布局组件
   ============================================= */

/* 强制取消链接下划线 */
a, a:hover, a:focus, .elementor-widget-text-editor a, .elementor-button {
    text-decoration: none !important;
}

/* 面包屑全局容器样式 (配合 Breadcrumb NavXT) */
.mianbaoxie {
    font-size: 14px !important;
    color: #555555 !important;
    line-height: 1.5;
}
.mianbaoxie a {
    color: #555555;
    transition: color 0.3s;
}
.mianbaoxie a:hover {
    color: #000000;
}
.mianbaoxie .sep {
    margin: 0 8px;
}

/* 响应式 Section 容器 */
.site-section {
    padding: var(--fluid-py) var(--fluid-px);
    width: 100%;
    box-sizing: border-box;
}

/* 基础性能补丁：防止布局跳动 */
img {
    height: auto;
    max-width: 100%;
}
.elementor-top-section {
    min-height: 1px;
}
/* 中文段落自动首行缩进两个汉字 */
:root:lang(zh) .elementor-widget-text-editor p {
    text-indent: 2em;
    margin-bottom: 1.5em; /* 保持段落间的呼吸感 */
}

/* 排除掉不需要缩进的特殊情况（可选） */
:root:lang(zh) .elementor-widget-text-editor p:has(img), 
:root:lang(zh) .elementor-widget-text-editor p:has(iframe) {
    text-indent: 0;
}


