/**
 * فونت متن: --hpb-font-primary (یکان از لایبرری HPB)
 * @font-face در FontLibraryManager → inline روی hpb-site-typography
 */

:root {
    --hpb-font-family-fallback: yekan, Tahoma, Arial, sans-serif;
    --hpb-font-primary: var(--hpb-font-family-primary, var(--hpb-font-family-fallback));
}

html body,
body,
body .website-wrapper,
body .main-page-wrapper,
body .site-content,
body .wd-page-content,
body .wd-content-layout {
    font-family: var(--hpb-font-primary) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select,
optgroup {
    font-family: inherit !important;
}

.hpb-header-builder,
.hpb-footer-builder,
.hpb-module,
.hpb-cta,
main,
.hd-design {
    font-family: inherit;
}

body.home main .home_mega_categoies,
body.home main .home_mega_categoies .hpb-module {
    font-family: var(--hpb-font-primary) !important;
}

/*
 * Font Awesome 6 Pro
 * تم Woodmart روی *::before مقدار inherit می‌گذارد → از متغیرهای FA Pro استفاده کن.
 * به .fa خود element دست نزن (fa-light / fa-solid وزن و family جدا دارند).
 */
body :is(.fa, .fas, .far, .fal, .fad, .fat, .fass, .fasr, .fasl, .fa-light, .fa-solid, .fa-regular, .fa-thin, .fa-duotone, .fa-brands),
body :is(.fa, .fas, .far, .fal, .fad, .fat, .fass, .fasr, .fasl, .fa-light, .fa-solid, .fa-regular, .fa-thin, .fa-duotone, .fa-brands)::before,
body :is(.fa, .fas, .far, .fal, .fad, .fat, .fass, .fasr, .fasl, .fa-light, .fa-solid, .fa-regular, .fa-thin, .fa-duotone, .fa-brands)::after {
    font-family: var(--fa-style-family, var(--fa-style-family-classic, "Font Awesome 6 Pro")) !important;
    font-style: normal;
    font-weight: var(--fa-style, inherit);
}

body :is(.fab, .fa-brands)::before,
body :is(.fab, .fa-brands)::after {
    font-family: var(--fa-style-family-brands, "Font Awesome 6 Brands") !important;
    font-weight: 400;
    font-style: normal;
}

body :is(.fad, .fa-duotone, .fasds, .fasdr, .fasdl, .fasdt)::before,
body :is(.fad, .fa-duotone, .fasds, .fasdr, .fasdl, .fasdt)::after {
    font-family: var(--fa-style-family-duotone, "Font Awesome 6 Duotone") !important;
    font-weight: inherit;
    font-style: normal;
}

/* ─── وردپرس / Elementor ─── */
body .dashicons::before,
body .dashicons-before::before {
    font-family: dashicons !important;
}

body .elementor-icon::before,
body .elementor-icon i::before,
body i.elementor-icon::before {
    font-family: eicons !important;
}

/* ─── Woodmart / XTS ─── */
body :is(
    .wd-icon,
    .wd-tools-icon,
    .wd-font-icon,
    .woodmart-font-icon,
    .whb-icon,
    .xts-icon,
    [class*="wd-icon-"],
    .woodmart-social-icon,
    .wd-nav-arrows,
    .wd-accordion-opener
)::before,
body :is(
    .wd-icon,
    .wd-tools-icon,
    .wd-font-icon,
    .woodmart-font-icon,
    .whb-icon,
    .xts-icon,
    [class*="wd-icon-"],
    .woodmart-social-icon
)::after {
    font-family: "woodmart-font", "woodmart-font-icon", "xts-icon-font", "xts-font" !important;
    font-style: normal !important;
    font-weight: 400 !important;
}

body .hpb-header-builder .ns_home_menu .the_mega_menu_link::before,
body .hpb-header-builder .ns_home_menu .menu-item-has-children > .the_mega_menu_link::before {
    font-family: initial !important;
}

body .swiper-icons::before,
body .swiper-button-prev::after,
body .swiper-button-next::after {
    font-family: swiper-icons !important;
}

body .bootstrap-icons::before,
body .bi::before {
    font-family: bootstrap-icons !important;
}

/* host آیکون تم — نه Font Awesome (روی .fa / .fal دست نزن) */
body :is(
    .dashicons,
    .wd-icon,
    .wd-tools-icon,
    .wd-font-icon,
    .woodmart-font-icon,
    .whb-icon,
    .xts-icon,
    .elementor-icon,
    .elementor-icon i,
    i.elementor-icon,
    .bootstrap-icons,
    .bi
) {
    font-family: initial;
    font-style: normal;
}
