/* E6C: centralized GLS type system. Editorial serif is reserved for page hierarchy; commerce stays UI sans. */
:root {
	--gls-font-editorial: "Source Serif 4", Georgia, "Times New Roman", serif;
	--gls-font-ui: "DM Sans", Arial, Helvetica, system-ui, sans-serif;
	--gls-text-xs: 12px;
	--gls-text-sm: 13px;
	--gls-text-base: 15px;
	--gls-heading-sm: 21px;
	--gls-heading-md: 30px;
	--gls-heading-lg: 38px;
	--gls-heading-xl: 42px;
}

/* Reading and commerce are deliberately calm and sans-serif. Footer #23 retains its accepted local styling. */
body,
button,
input,
select,
textarea,
.elementor-location-header,
.woocommerce,
.wc-block-components,
.wps_wpr_main_wrapper,
.gls-account-dashboard {
	font-family: var(--gls-font-ui);
}

body { font-size: var(--gls-text-base); line-height: 1.6; }
.elementor-location-header :is(a, button, input),
.woocommerce :is(button, input, select, textarea),
.wc-block-components :is(button, input, select, textarea),
.gls-discovery-toolbar :is(input, select, button) { font-family: var(--gls-font-ui); }

/* Archive/discovery is editorial only at the major title; controls and cards remain functional sans. */
.gls-archive-heading h1 {
	font-family: var(--gls-font-editorial);
	font-size: var(--gls-heading-lg);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -.015em;
}
.gls-archive-heading :is(nav, p) { font-family: var(--gls-font-ui); }
.gls-discovery-toolbar,
.etheme-product-grid,
.etheme-product-grid :is(a, p, span, .price) { font-family: var(--gls-font-ui); }
/* Archive loops mirror the approved homepage merchandising scale, not XStore's larger default card type. */
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .gls-archive-heading h1 {
	font-size: 34px;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .woocommerce-loop-product__title,
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .woocommerce-loop-product__title a {
	font-family: var(--gls-font-ui) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .price,
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .price :is(.amount, ins) {
	font-family: var(--gls-font-ui) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
}
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .etheme-product-grid-content { padding-top: 12px; }
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .woocommerce-loop-product__title { min-height: calc(1.4em * 3); margin-bottom: 6px; }
body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .gls-discovery-toolbar :is(input, select, button) { font-family: var(--gls-font-ui); font-size: 13px; }
body.search-results :is(.page-heading h1, .page-title, .search-results-title) {
	font-family: var(--gls-font-editorial);
	font-weight: 400;
	line-height: 1.12;
}
/* Only customer-facing storefront loops: images remain dominant without changing PDP or transactional line items. */
.etheme-product-grid .woocommerce-loop-product__title,
.etheme-product-grid .woocommerce-loop-product__title a,
body.home .gls-home-product-card h3,
body.home .gls-home-product-card h3 a,
body.home .products .product .product-title,
body.home .products .product .product-title a,
.related .products .product .product-title,
.related .products .product .product-title a,
.cross-sells .products .product .product-title,
.cross-sells .products .product .product-title a {
	font-family: var(--gls-font-ui);
	font-weight: 400 !important;
}

/* The homepage carries the strongest catalog tone without altering its commerce widgets. */
body.home .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-heading .elementor-heading-title {
	font-family: var(--gls-font-editorial);
	font-weight: 400;
	line-height: 1.16;
	letter-spacing: -.012em;
}
body.home .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-text-editor,
body.home .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-button,
body.home .elementor:not(.elementor-1271):not(.elementor-1274) .price { font-family: var(--gls-font-ui); }
body.home .gls-home-section-heading h2,
body.home .gls-home-editorial h2 {
	font-family: var(--gls-font-editorial);
	font-size: clamp(28px, 2.2vw, 34px);
	font-weight: 400;
	line-height: 1.18;
	letter-spacing: -.012em;
}

/* Article-like static pages get an editorial hierarchy, while all reading copy stays sans. */
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-text-editor :is(h1, h2),
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-heading .elementor-heading-title,
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .content-page :is(h1, h2),
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content :is(h1, h2) {
	font-family: var(--gls-font-editorial);
	font-weight: 400;
	line-height: 1.16;
	letter-spacing: -.012em;
}
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-text-editor,
body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content :is(p, li, a) {
	font-family: var(--gls-font-ui);
	font-size: var(--gls-text-base);
	line-height: 1.6;
}

/* Preserve the established product and transactional treatment as UI-only. */
body.single-product .elementor-1280,
body.single-product .elementor-1280 :is(h1, h2, h3, p, a, button, input, select, textarea, .price),
.woocommerce-account,
.woocommerce-account :is(h1, h2, h3, p, a, button, input, select, textarea),
.woocommerce-cart,
.woocommerce-cart :is(h1, h2, h3, p, a, button, input, select, textarea),
.woocommerce-checkout,
.woocommerce-checkout :is(h1, h2, h3, p, a, button, input, select, textarea) {
	font-family: var(--gls-font-ui);
}

/* Footer #23 is intentionally excluded from the new family system. */
.elementor-location-footer { font-family: Lexend, sans-serif; }
.elementor-location-footer :is(h1, h2, h3, p, a) { font-family: inherit; }

@media (max-width: 767px) {
	:root {
		--gls-text-base: 14.5px;
		--gls-heading-sm: 19px;
		--gls-heading-md: 25px;
		--gls-heading-lg: 30px;
		--gls-heading-xl: 32px;
	}

	.gls-archive-heading h1 { font-size: var(--gls-heading-lg); line-height: 1.12; }
	body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .gls-archive-heading h1 { font-size: 28px; }
	body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .woocommerce-loop-product__title,
	body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.search-results) .etheme-product-grid .woocommerce-loop-product__title a { font-size: 13px !important; }
	body.home .gls-home-section-heading h2,
	body.home .gls-home-editorial h2 { font-size: clamp(23px, 6.6vw, 28px); }
	body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .elementor:not(.elementor-1271):not(.elementor-1274) .elementor-widget-text-editor :is(h1, h2),
	body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .content-page :is(h1, h2),
	body.page:not(.woocommerce-account):not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content :is(h1, h2) { font-size: var(--gls-heading-md); }
}
