/* =========================================================
   fonts.css — FRONTEND ONLY (enqueue via wp_enqueue_scripts)
   Purpose: Enforce Inter family sitewide without breaking icons/admin bar.
   NOTE: This file should NOT set global font-weight for body text.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

/* ========== BASE: Inter family only (no weight) ========== */
html, body{
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI,
               Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji,
               Noto Color Emoji !important;
  font-optical-sizing: auto;
  font-synthesis: weight style;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ========== ADMIN BAR: text stack + dashicons for icons ========== */
#wpadminbar :where(.ab-item, .ab-label, .ab-sub-wrapper, .ab-submenu, .ab-submenu a){
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
#wpadminbar .ab-icon,
#wpadminbar .ab-item:before,
#wpadminbar .ab-icon:before{ font-family: 'dashicons' !important; }

/* ========== TYPOGRAPHY ========== */
/* Headings: may be bold, but don't !important weight */
h1, h2, h3, h4, h5, h6,
.section-title-main,
.widget-title,
h1.entry-title,
h3.product-section-title,
h3.comment-reply-title,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3,
.woocommerce-MyAccount-navigation-link a,
.tab a span{
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}
/* Body text: Inter family only */
body, p, span, div, li, a, strong, em, small, code, pre,
label, legend, caption, figcaption,
table, th, td,
input, select, textarea, button,
.woocommerce-breadcrumb.breadcrumbs,
.product-short-description,
.product_meta span,
.mini_cart_item a, .mini_cart_item span,
.woocommerce-mini-cart__total span,
.searchform .search-field,
.searchform .search-field::placeholder,
.footer-secondary.pull-right,
.account-item span,
#header-contact li a span,
.top-bar-nav li.menu-item a,
.header-nav > li.menu-item a{
  font-family: 'Inter', sans-serif !important;
}

/* WooCommerce content (avoid generic span to protect icons) */
.single-product .entry-summary,
.single-product .entry-content,
.single-product .woocommerce-product-details__short-description{ font-family: 'Inter', sans-serif !important; }
.single-product .product :where(p, div, ul, ol, li, a, strong, em, small, code, pre,
  table, th, td, label, input, select, textarea, button){ font-family: 'Inter', sans-serif !important; }

/* ========== ICON-FONTS SAFETY (global) ========== */
i[class*="icon-"]:not([class^="eicon"]):not([class*=" eicon-"]):not([class^="woosc-"]):not([class*=" woosc-icon-"]){
  font-family: inherit; font-style: normal; font-weight: inherit;
}
.woocommerce-Price-currencySymbol{ font-family: inherit; }
/* Don't italicize icon elements */
.italic, em,
i:not(.dashicons):not([class^="eicon"]):not([class*=" eicon-"]):not([class^="woosc-"]):not([class*=" woosc-icon-"]){ font-style: italic; }

/* ========== VARIABLE AXES: don't freeze wght ========== */
@supports (font-variation-settings: normal){
  body{ font-variation-settings: "opsz" 14; }
  h1{   font-variation-settings: "opsz" 32; }
  h2{   font-variation-settings: "opsz" 28; }
  h3{   font-variation-settings: "opsz" 24; }
}

/* ========== ICON FONT FIXES (specific) ========== */
/* WooCommerce rating stars */
.woocommerce .star-rating,
.woocommerce .star-rating::before,
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before,
.woocommerce p.stars a:hover::before,
.woocommerce p.stars a:hover ~ a::before,
.woocommerce p.stars.selected a.active::before,
.woocommerce p.stars.selected a:not(.active)::before{ font-family: 'star' !important; }
.woocommerce .star-rating span{ font-family: inherit !important; }
/* WOOSC icons */
[class^="woosc-"], [class*=" woosc-icon-"],
.woosc-btn-icon, .woosc-icon, .woosc-btn .woosc-btn-icon,
.woosc-btn-icon::before, .woosc-icon::before{ font-family: 'woosc' !important; }
/* Elementor eicons (frontend + editor + adminbar) */
[class^="eicon-"], [class*=" eicon-"],
[class^="eicon-"]::before, [class*=" eicon-"]::before,
.elementor-icon[class^="eicon-"], .elementor-icon[class*=" eicon-"],
.elementor-icon[class^="eicon-"]::before, .elementor-icon[class*=" eicon-"]::before,
.elementor-editor-active [class^="eicon-"], .elementor-editor-active [class^="eicon-"]::before,
.elementor-edit-mode [class^="eicon-"], .elementor-edit-mode [class^="eicon-"]::before,
#wpadminbar [class^="eicon-"], #wpadminbar [class^="eicon-"]::before{ font-family: 'eicons' !important; }

/* Utilities */
.fw-300{ font-weight: 300 !important; }
.fw-400{ font-weight: 400 !important; }
.fw-500{ font-weight: 500 !important; }
.fw-600{ font-weight: 600 !important; }
.fw-700{ font-weight: 700 !important; }
.fw-800{ font-weight: 800 !important; }

/* Escape hatch */
.ff-inherit{ font-family: inherit !important; font-weight: inherit !important; font-style: inherit !important; }
