/*
 * Arabic storefront typography.
 *
 * Alexandria is loaded as the Google Fonts variable family (weights 100–900).
 * Existing Elementor font-weight values are intentionally preserved.
 */
body.rug-lang-ar {
	--rug-arabic-font-family: "Alexandria", sans-serif;
	font-family: var(--rug-arabic-font-family) !important;
}

body.rug-lang-ar :where(
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	a,
	li,
	label,
	input,
	textarea,
	select,
	button,
	blockquote,
	cite,
	figcaption,
	table,
	th,
	td
) {
	font-family: var(--rug-arabic-font-family) !important;
}

/* Elementor text-bearing widgets can declare their own font family. */
body.rug-lang-ar .elementor-heading-title,
body.rug-lang-ar .elementor-widget-text-editor,
body.rug-lang-ar .elementor-widget-text-editor p,
body.rug-lang-ar .elementor-button,
body.rug-lang-ar .elementor-item,
body.rug-lang-ar .elementor-sub-item,
body.rug-lang-ar .elementor-icon-list-text,
body.rug-lang-ar .elementor-tab-title,
body.rug-lang-ar .elementor-tab-content,
body.rug-lang-ar .elementor-accordion-title,
body.rug-lang-ar .elementor-accordion-content,
body.rug-lang-ar .elementor-toggle-title,
body.rug-lang-ar .elementor-toggle-content,
body.rug-lang-ar .elementor-testimonial-content,
body.rug-lang-ar .elementor-testimonial-name,
body.rug-lang-ar .elementor-counter-number-wrapper,
body.rug-lang-ar .elementor-counter-title,
body.rug-lang-ar .elementor-form-fields-wrapper,
body.rug-lang-ar .elementor-field,
body.rug-lang-ar .elementor-field-label {
	font-family: var(--rug-arabic-font-family) !important;
}

/* WooCommerce storefront/account/checkout typography. */
body.rug-lang-ar .woocommerce,
body.rug-lang-ar .woocommerce-page,
body.rug-lang-ar .woocommerce form,
body.rug-lang-ar .woocommerce input,
body.rug-lang-ar .woocommerce textarea,
body.rug-lang-ar .woocommerce select,
body.rug-lang-ar .woocommerce button,
body.rug-lang-ar .woocommerce .button,
body.rug-lang-ar .woocommerce-MyAccount-navigation,
body.rug-lang-ar .woocommerce-MyAccount-content {
	font-family: var(--rug-arabic-font-family) !important;
}



/*
 * JetSmartFilters text.
 *
 * The translation layer changes only the stored text value. These selectors
 * supply the Arabic font without touching size, weight, color, spacing or any
 * other Jet/Elementor label styling chosen by the administrator.
 */
body.rug-lang-ar .jet-smart-filters,
body.rug-lang-ar .jet-smart-filters .jet-filter-label,
body.rug-lang-ar .jet-smart-filters .jet-filter-items-dropdown__label,
body.rug-lang-ar .jet-smart-filters .jet-checkboxes-list__label,
body.rug-lang-ar .jet-smart-filters .jet-radio-list__label,
body.rug-lang-ar .jet-smart-filters .jet-select__control,
body.rug-lang-ar .jet-smart-filters .jet-search-filter__input,
body.rug-lang-ar .jet-smart-filters .jet-range__inputs input,
body.rug-lang-ar .jet-smart-filters .jet-date-range__inputs input,
body.rug-lang-ar .jet-smart-filters .jet-sorting-select,
body.rug-lang-ar .jet-filter,
body.rug-lang-ar .jet-filter-label,
body.rug-lang-ar .jet-filter-items-dropdown__label,
body.rug-lang-ar .jet-checkboxes-list__label,
body.rug-lang-ar .jet-radio-list__label,
body.rug-lang-ar .jet-select__control,
body.rug-lang-ar .jet-search-filter__input {
	font-family: var(--rug-arabic-font-family) !important;
}

/*
 * AL NAQSHA custom Cart / Checkout / Thank You templates define their own
 * --aln-sans and --aln-serif variables (Arial / Georgia). Override the variables
 * only inside Arabic commerce pages so all existing theme typography rules,
 * including !important button rules, resolve to Alexandria without changing
 * any sizing/weight/color/layout styles.
 */
body.rug-lang-ar .aln-commerce-page {
	--aln-sans: var(--rug-arabic-font-family);
	--aln-serif: var(--rug-arabic-font-family);
	font-family: var(--rug-arabic-font-family) !important;
}

body.rug-lang-ar .aln-commerce-page :where(
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	a,
	span,
	strong,
	small,
	label,
	input,
	textarea,
	select,
	button,
	table,
	th,
	td,
	address
) {
	font-family: var(--rug-arabic-font-family) !important;
}

/* Select2 dropdown markup can be appended directly to <body>. */
body.rug-lang-ar .select2-container,
body.rug-lang-ar .select2-container .select2-selection,
body.rug-lang-ar .select2-container .select2-results,
body.rug-lang-ar .select2-container .select2-search__field {
	font-family: var(--rug-arabic-font-family) !important;
}


/*
 * Child-theme custom account dashboard and live product search.
 * Their own CSS declares Arial/Georgia, so explicitly keep Arabic copy
 * on Alexandria without changing size, weight, spacing or layout.
 */
body.rug-lang-ar .aln-account-dashboard,
body.rug-lang-ar .aln-account-dashboard h1,
body.rug-lang-ar .aln-account-dashboard h2,
body.rug-lang-ar .aln-account-dashboard h3,
body.rug-lang-ar .aln-account-dashboard p,
body.rug-lang-ar .aln-account-dashboard a,
body.rug-lang-ar .aln-account-dashboard span,
body.rug-lang-ar .aln-account-dashboard strong,
body.rug-lang-ar .aln-account-dashboard small,
body.rug-lang-ar .aln-live-search,
body.rug-lang-ar .aln-live-search input,
body.rug-lang-ar .aln-live-search button,
body.rug-lang-ar .aln-live-search__trigger-label,
body.rug-lang-ar .aln-live-search__status,
body.rug-lang-ar .aln-live-search__name,
body.rug-lang-ar .aln-live-search__meta,
body.rug-lang-ar .aln-live-search__price,
body.rug-lang-ar .aln-live-search__all {
	font-family: var(--rug-arabic-font-family) !important;
}


/*
 * Custom single-product template.
 * Product Detail exposes its own serif/sans variables, so map both to
 * Alexandria on Arabic routes without changing English typography.
 */
body.rug-lang-ar .rug-pdp {
	--rug-pdp-sans: var(--rug-arabic-font-family);
	--rug-pdp-serif: var(--rug-arabic-font-family);
	font-family: var(--rug-arabic-font-family) !important;
}

body.rug-lang-ar .rug-pdp :where(
	h1,
	h2,
	h3,
	p,
	a,
	span,
	strong,
	small,
	label,
	button,
	input,
	select,
	dt,
	dd
) {
	font-family: var(--rug-arabic-font-family) !important;
}

/* Isolate only the numeric dimension from Arabic surrounding text, both in
 * Elementor's AJAX-replaced mini-cart and JetSmartFilters' checkbox labels. */
body.rug-lang-ar bdi.rug-size-isolate {
	direction: ltr !important;
	unicode-bidi: isolate !important;
	display: inline-block;
	white-space: nowrap;
	text-align: left !important;
	font-variant-numeric: tabular-nums;
	font-family: inherit !important;
}
