/* MNC site-wide typography contract.
 * Thai content uses IBM Plex Sans Thai; English/number UI may opt into Inter
 * through the existing .font-en and component-specific selectors. */
:root {
    --mnc-font-th: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    --mnc-font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body,
button,
input,
select,
textarea,
.site-title,
.site-description,
.widget,
.woocommerce,
.cmplz-cookiebanner,
.wpcf7,
.mnc-v1,
.mnc-products-hub,
.mnc-contact-page,
.mnc-privacy-page {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.page-title,
.widget-title {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
    font-weight: 600;
}

/* Keep Latin/number labels consistently set in the companion face. */
.font-en,
[data-font="en"],
.mnc-v1-brand-copy,
.mnc-v1-phone,
.mnc-home-slide__eyebrow,
.mnc-home-art__core,
.mnc-home-art__label,
.mnc-home-kicker,
.mnc-home-brand-card__name,
.mnc-contact-eyebrow,
.mnc-contact-kicker,
.mnc-contact-channel strong,
.mnc-contact-hours,
.mnc-blog-hero__eyebrow,
.mnc-blog-post-meta,
.mnc-products-hub .section-number,
.mnc-products-hub .stat-num,
.mnc-products-hub .brand-tag,
.mnc-products-hub .hero-summary-status,
.mnc-products-hub .ai-badge-pulse {
    font-family: var(--mnc-font-en), var(--mnc-font-th), sans-serif !important;
}

/* Legacy/custom 404 rules previously pulled Noto Sans Thai and Arial. */
.mnc-404,
.mnc-404 button,
.mnc-404 input,
.mnc-404 select,
.mnc-404 textarea,
.mnc-404-hero__number,
.mnc-404-hero__title,
.mnc-404-hero__subtitle {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
}

/* Third-party widgets often set their own body-level font declarations. */
body .ovic-menu-clone-wrap,
body .ovic-menu-clone-wrap button,
body .ovic-menu-clone-wrap input,
body .ovic-menu-clone-wrap a,
body .dgwt-wcas-search-wrapp,
body .dgwt-wcas-search-wrapp input,
body .yith-wcwl-add-to-wishlist,
body .woocommerce form,
body .woocommerce .button {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
}

/* Font files are loaded with display=swap; these declarations prevent a
 * browser/user-agent fallback from reintroducing Sarabun or Noto Sans. */
body.login,
body.login button,
body.login input,
body.login select,
body.login h1,
body.login h2,
body.login h3,
body.login label {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
}

/* Final front-end guard: Seed Fonts uses !important selectors for headings,
 * nav and controls. Higher-specificity selectors keep those rules from
 * overriding the site-wide contract, while icon elements retain their icon
 * font families. */
html body.mnc-font-standard,
html body.mnc-font-standard :not(i):not(svg):not(path):not(.dashicons):not([class*="fa-"]) {
    font-family: var(--mnc-font-th), var(--mnc-font-en), sans-serif !important;
}

html body.mnc-font-standard .font-en,
html body.mnc-font-standard [data-font="en"],
html body.mnc-font-standard [lang^="en"],
html body.mnc-font-standard code,
html body.mnc-font-standard pre,
html body.mnc-font-standard kbd,
html body.mnc-font-standard samp,
html body.mnc-font-standard .price,
html body.mnc-font-standard .amount,
html body.mnc-font-standard .woocommerce-Price-amount,
html body.mnc-font-standard .mnc-v1-brand-copy,
html body.mnc-font-standard .mnc-v1-phone {
    font-family: var(--mnc-font-en), var(--mnc-font-th), sans-serif !important;
}
