/* Final frontend typography. Keep existing sizes, spacing and icon fonts. */
:root {
    --lm-font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', 'Heiti SC', Arial, sans-serif;
    --lm-sans: var(--lm-font-family);
    --lm-serif: var(--lm-font-family);
    --font-body: var(--lm-font-family);
    --font-display: var(--lm-font-family);
    --lh-body: var(--lm-font-family);
    --lh-display: var(--lm-font-family);
}

body {
    font-family: var(--lm-font-family);
    font-weight: 400;
}

/* These page roots previously supplied their own hard-coded font families. */
body .site-main :is(.lm-home, .lm-catalog-page, .lm-page, .lm-native-product, .lm-native-archive, .lm-shop),
body .lm-header,
body .lm-footer,
body .lm-shop-toast {
    font-family: var(--lm-font-family);
}

/* Only semantic text headings need an important family override: earlier
   page/product/shop rules use several high-specificity font shorthands. */
body .site-main :is(h1, h2, h3, h4, h5, h6),
body .lm-footer :is(h2, h3, h4) {
    font-family: var(--lm-font-family) !important;
    font-weight: 600;
}
body .site-main h1,
body .site-main .lm-hero--immersive h1 {
    font-weight: 700;
}
body .site-main .lm-home-product__title,
body .site-main .lm-product__title,
body .site-main .lm-pdp-lightbox-title {
    font-weight: 600;
}

/* Non-heading display text and native product labels also had serif/Inter
   families written directly into the original stylesheets. */
body .site-main .lm-keyline,
body .site-main .lm-terms dt,
body .site-main .lm-pdp-main-label,
body .site-main .lm-pdp-zoom-label,
body .site-main .lm-pdp-gallery-hint,
body .site-main .lm-pdp-price,
body .site-main .lm-product__price,
body .site-main .lm-shop-item-price,
body .site-main .lm-shop-totals {
    font-family: var(--lm-font-family);
}
body .site-main label {
    font-family: inherit;
}

/* Inherit the surrounding text face while retaining the original control size
   and weight. Exclude icon-font buttons rather than resetting every element. */
body :is(.site-main, .lm-header, .lm-footer, .lm-shop-toast)
    :is(button, input, textarea, select, optgroup, option):not(.dashicons, .dashicons-before, .fa, .fas, .far, .fab) {
    font-family: inherit !important;
}
body .site-main :is(.lm-button, .lm-btn, .lm-text-link, .lm-filter),
body .lm-header :is(.lm-btn, .lm-text-link) {
    font-family: inherit;
}

/* Size-guide annotations are SVG text, not SVG icon geometry. */
body .site-main .lm-measure-svg text {
    font-family: var(--lm-font-family);
}
