/* ==========================================================================
   Luxe Typography v1  —  全站字体系统
   --------------------------------------------------------------------------
   背景（2026-10-13 全站审计结论）：
   - 全站只实际加载两款字体：Montserrat（无衬线）+ Playfair Display（衬线）
   - 但 CSS 里曾有 7 套字体栈，其中 Didot / Open Sans / Cinzel / Cormorant Garamond
     【从未加载】⇒ 静默回退成浏览器默认字体，同一种角色在不同页面长得完全不一样
   - 同一角色的规格在各页面差异巨大：
       H1     分类页 24px w400 / 产品页 40px w300 / 购物车 24px w400
       H2/H3  Didot 17px w600 / Open Sans 13px w700 / Playfair 16px w700
       按钮    11px / 14px / 16px / 20px 四种，且 text-transform 不统一
       价格    分类页 Montserrat 14px / 产品页 Playfair 13px
       字距    2px / 4px / 2.72px / 1.82px / 0.5px / 1.5px / 0.32px … 12 种，且全是写死 px

   设计目标：高端珠宝电商 —— 两款字体、职责分明

   ┌─ Playfair Display（衬线）＝ 品牌 / 展示层
   │     页面大标题 · 产品名 · 区块标题 · 价格
   │     Didone 高对比衬线，Vogue / Harper's Bazaar 同款的奢华标识
   └─ Montserrat（几何无衬线）＝ 信息 / 界面层
         正文 · 导航 · 按钮 · 标签 · 表格 · 元信息

   三条排版法则（高端珠宝/时装的关键特征）：
   ① 小字一律「大写 + 宽字距」(.15em) —— 奢侈品牌排版的第一特征
     （导航 / 按钮 / 眉题 / 表单标签 / 卡片头 / 表头）
   ② 大字用正体轻字重 + 收紧字距 —— Didone 衬线加粗会显笨重廉价
   ③ 字距一律用 em（不写死 px）—— 同一角色大小不同时视觉才一致

   ⚠ 为什么这里用 `!important`：
   主题原有的字体规则是「到处 !important」的写法，且有几条是 ID 级特异性：
     .btn, button:not(.ci-btn):not(:where(...))      { font-family:var(--font-serif)!important; letter-spacing:3px!important }
     #productName                       { font-size:2.5rem!important; font-weight:300!important; letter-spacing:4px!important }
     #productPrices                     { font-size:1.8rem!important; font-family:var(--font-serif)!important }
     html[data-theme="light"] button:…  { letter-spacing:.08em!important }
   字体系统要成为「唯一权威」，就必须以同等或更高强度声明；
   只用 !important 覆盖【字体相关属性】，不动颜色 / 背景 / 圆角等其他属性。

   加载顺序：本文件在 luxe_base.css 之后、三套页面专属皮肤之前，
   页面专属皮肤（筛选 / 结账 / 下单成功）仍可覆盖此处默认值（它们未用 !important）。
   ========================================================================== */

:root,
html[data-theme] {
    /* ---- 两款字体 ---- */
    --lx-font-display: 'Playfair Display', Georgia, 'Times New Roman',
                       'Songti SC', 'Noto Serif SC', SimSun, serif;
    --lx-font-sans: Montserrat, 'Montserrat Fallback', -apple-system,
                    BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                    'Hiragino Sans GB', 'Microsoft YaHei', Lato, Roboto,
                    'Helvetica Neue', Arial, sans-serif;

    /* ---- 字号阶梯：只允许 7 档 ---- */
    --lx-fs-display: clamp(26px, 1.55rem + .35vw, 34px);  /* 页面大标题 H1 */
    --lx-fs-h2: 21px;                                     /* 区块标题 */
    --lx-fs-h3: 16px;                                     /* 子标题 / 产品名 */
    --lx-fs-price: clamp(17px, 1rem + .4vw, 20px);        /* 价格（衬线） */
    --lx-fs-body: clamp(14px, .85rem + .25vw, 16px);      /* 正文 */
    --lx-fs-sm: 12.5px;                                   /* 辅助文字 */
    --lx-fs-label: 11px;                                  /* 小字大写标签 */

    /* ---- 字距（em：随字号缩放，这是统一视觉的关键）---- */
    --lx-ls-display: .01em;   /* 大字几乎不拉开 */
    --lx-ls-h2: .03em;
    --lx-ls-h3: .05em;
    --lx-ls-body: 0;
    --lx-ls-label: .15em;     /* 小字大写：奢侈品牌标志性宽字距 */

    /* ---- 行高 ---- */
    --lx-lh-display: 1.2;
    --lx-lh-h2: 1.3;
    --lx-lh-h3: 1.35;
    --lx-lh-body: 1.7;
    --lx-lh-label: 1.2;
}

/* ==========================================================================
   0. 主题内按钮的「统一衬线字体」是高端珠宝体系的反模式：
      按钮属于界面层，一律无衬线。这里在主题同强度上把它改回来。
      （只动字体属性，颜色/背景/圆角仍是主题统一按钮规则负责）
   ========================================================================== */
html[data-theme] .btn,
html[data-theme] button.btn,
html[data-theme] input[type="submit"].btn,
html[data-theme] input[type="button"].btn,
html[data-theme] .button_continue_checkout,
html[data-theme] input.cssButton,
html[data-theme] input.cssButtonHover,
html[data-theme] span.cssButtonHover,
html[data-theme] button:not(.ci-btn):not(:where(.mf-btn, .mf-group-head, .mf-subhead,
                                    .modern-filter-clear-all,
                                    .modern-filter-chip-remove)) {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-label) !important;
    font-weight: 600 !important;
    letter-spacing: var(--lx-ls-label) !important;
    text-transform: uppercase !important;
    line-height: var(--lx-lh-label) !important;
}

/* 主 CTA 放大一级，仍保持大写宽字距。
   注意两个坑（实测踩过）：
   ① .btn-add-to-cart 这类元素是 `<button class="btn btn-add-to-cart">`，
      上面的通用规则会以 `html[data-theme] button.btn`（0,2,2）命中它；
      所以这里必须带上 `button.` 前缀凑到 (0,2,2) 才能在同级下靠加载顺序取胜。
   ② 它们故意【不在】上面那条通用规则的列表里，避免同类相争。 */
html[data-theme] .btn-add-to-cart,
html[data-theme] button.btn-add-to-cart,
html[data-theme] .button_confirm_order,
html[data-theme] button.button_confirm_order,
html[data-theme] #opc-order-confirm .cssButton,
html[data-theme] #checkoutOneSubmit .cssButton ,
html[data-theme] #opc-order-confirm .cssButtonHover,
html[data-theme] #checkoutOneSubmit .cssButtonHover {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-sm) !important;
    font-weight: 700 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    line-height: var(--lx-lh-label) !important;
}

/* ==========================================================================
   1. 全局：全站正文一律无衬线（信息层）
   ========================================================================== */
html,
body {
    font-family: var(--lx-font-sans);
    font-size: var(--lx-fs-body);
    line-height: var(--lx-lh-body);
    letter-spacing: var(--lx-ls-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. 展示层：衬线 + 大字 + 紧字距 + 轻字重
   ========================================================================== */
html[data-theme] h1,
html[data-theme] h2,
html[data-theme] h3,
html[data-theme] h4,
html[data-theme] h5,
html[data-theme] h6 {
    font-family: var(--lx-font-display) !important;
    font-weight: 400 !important;                 /* Didone 衬线加粗显笨重 */
}

html[data-theme] h1 {
    font-size: var(--lx-fs-display) !important;
    line-height: var(--lx-lh-display) !important;
    letter-spacing: var(--lx-ls-display) !important;
}

html[data-theme] h2 {
    font-size: var(--lx-fs-h2) !important;
    line-height: var(--lx-lh-h2) !important;
    letter-spacing: var(--lx-ls-h2) !important;
    font-weight: 500 !important;
}

html[data-theme] h3,
html[data-theme] h4 {
    font-size: var(--lx-fs-h3) !important;
    letter-spacing: var(--lx-ls-h3) !important;
    font-weight: 500 !important;
}

html[data-theme] h5,
html[data-theme] h6 {
    font-size: var(--lx-fs-sm) !important;
    font-weight: 600 !important;
}

/* Zen Cart / 主题里的「页面标题」类，与 h1 同规格 */
html[data-theme] .pageHeading,
html[data-theme] .itemTitle,
html[data-theme] #checkoutSuccessDefault-pageHeading,
html[data-theme] #checkoutOneHeading,
html[data-theme] .help-center-title {
    font-family: var(--lx-font-display) !important;
    font-size: var(--lx-fs-display) !important;
    line-height: var(--lx-lh-display) !important;
    letter-spacing: var(--lx-ls-display) !important;
    font-weight: 400 !important;
}

/* 产品名：衬线 + 大写 + 紧字距。
   注意 #productName 是主题用 ID + !important 写死的（2.5rem/300/4px），必须同强度盖回。*/
html[data-theme] .productName,
html[data-theme] .product-name,
html[data-theme] .product-name a,
html[data-theme] #listProductName,
html[data-theme] #productName,
html[data-theme] .filtersProductName {
    font-family: var(--lx-font-display) !important;
    font-size: var(--lx-fs-h3) !important;
    line-height: var(--lx-lh-h3) !important;
    letter-spacing: var(--lx-ls-h3) !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
}

/* ==========================================================================
   3. 信息层：小字一律「大写 + 宽字距」—— 奢侈品牌排版的第一特征
   ========================================================================== */

/* 3.1 导航 */
html[data-theme] #desktop-main-nav .nav-link,
html[data-theme] .nav-link,
html[data-theme] .luxury-cat-name,
html[data-theme] .mega-trending-name,
html[data-theme] .main-nav .nav-link,
html[data-theme] .mobile-nav-link {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-label) !important;
    font-weight: 600 !important;
    letter-spacing: var(--lx-ls-label) !important;
    text-transform: uppercase !important;
    line-height: var(--lx-lh-label) !important;
}

/* 3.2 眉题 / 元信息 / 小字（比正文低一级，不做大写以免满屏大写）*/
html[data-theme] .product-cats,
html[data-theme] .productsModel,
html[data-theme] .smallText,
html[data-theme] .text-muted,
html[data-theme] .navNextPrevCounter,
html[data-theme] .productListing-data small,
html[data-theme] #productsListing-topNumber {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-sm) !important;
    line-height: var(--lx-lh-label) !important;
    letter-spacing: .04em !important;
    font-weight: 400 !important;
}

/* 3.3 区块头 / 卡片头 / 侧栏头 / 表头 —— 小字大写 + 宽字距 */
html[data-theme] .card-header,
html[data-theme] .luxury-sidebox-heading,
html[data-theme] .accordion-header,
html[data-theme] .tableHeading,
html[data-theme] thead th {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-label) !important;
    font-weight: 700 !important;
    letter-spacing: var(--lx-ls-label) !important;
    text-transform: uppercase !important;
    line-height: var(--lx-lh-label) !important;
}

/* 3.4 表单标签 */
html[data-theme] label,
html[data-theme] .inputLabel,
html[data-theme] .centerColumn label {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-sm) !important;
    font-weight: 600 !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    line-height: var(--lx-lh-label) !important;
}

/* ==========================================================================
   4. 价格：衬线 + 略大字号（高端珠宝惯用衬线数字）
   #productPrices 同样是主题 ID + !important 写死的（1.8rem），需同强度盖回
   ========================================================================== */
html[data-theme] .productPrice,
html[data-theme] .productSpecialPrice,
html[data-theme] .productSalePrice,
html[data-theme] .productAdvertisedPrice,
html[data-theme] .normalprice,
html[data-theme] .productBasePrice,
html[data-theme] .productPriceDiscount,
html[data-theme] #productPrices,
html[data-theme] #productPrices .productPrice,
html[data-theme] #ottotal,
html[data-theme] .cartTotalDisplay {
    font-family: var(--lx-font-display) !important;
    font-size: var(--lx-fs-price) !important;
    font-weight: 400 !important;
    line-height: var(--lx-lh-h3) !important;
    letter-spacing: .01em !important;
    font-variant-numeric: lining-nums tabular-nums;
}

/* ==========================================================================
   5. 正文与表格：宽松行高
   ========================================================================== */
html[data-theme] p,
html[data-theme] li,
html[data-theme] td,
html[data-theme] .accordion-content,
html[data-theme] #productDescription,
html[data-theme] .wooxit-seo-body,
html[data-theme] .card-body,
html[data-theme] .messageStackCaution,
html[data-theme] .messageStackWarning,
html[data-theme] .messageStackSuccess,
html[data-theme] .messageStackError {
    font-family: var(--lx-font-sans) !important;
    font-size: var(--lx-fs-body) !important;
    line-height: var(--lx-lh-body) !important;
    letter-spacing: var(--lx-ls-body) !important;
}

/* `.larger` 是 messageStack 的提示字号类，不随之放大 */
html[data-theme] .messageStackCaution.larger,
html[data-theme] .messageStackWarning.larger,
html[data-theme] .messageStackSuccess.larger,
html[data-theme] .messageStackError.larger {
    font-size: var(--lx-fs-sm) !important;
    line-height: var(--lx-lh-body) !important;
}

/* ==========================================================================
   6. 兜底：任何可见文字不小于 11px（审计发现徽标/色板标签有 10px）
   ========================================================================== */
html[data-theme] .mf-swatch-label,
html[data-theme] .badge,
html[data-theme] .price-slider-label,
html[data-theme] .mf-subcount {
    font-size: var(--lx-fs-label) !important;
    line-height: var(--lx-lh-label) !important;
}

/* ==========================================================================
   7. 兼容：Font Awesome 图标元素不吃上面的字体覆盖（图标字体自带 family）
   ========================================================================== */
html[data-theme] .fas, html[data-theme] .far, html[data-theme] .fab, html[data-theme] .fa,
html[data-theme] [class^="fa-"], html[data-theme] [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
