/*
 * FLORETE responsive typography
 * Prevents awkward single-word wraps and keeps editorial text balanced
 * across desktop, tablet and mobile widths.
 */

:where(
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	.elementor-heading-title,
	.woocommerce-loop-product__title
) {
	overflow-wrap: normal;
	word-break: normal;
	-webkit-hyphens: none;
	hyphens: none;
	text-wrap: balance;
}

:where(
	p,
	.elementor-widget-text-editor p,
	.term-description,
	.woocommerce-product-details__short-description
) {
	overflow-wrap: break-word;
	text-wrap: pretty;
}

/* Keep the long shop title on one line on tablet/desktop.
 * The font scales down smoothly before the layout gets tight. */
@media (min-width: 768px) {
	.florete-shop-hero__title {
		width: 100%;
	}

	.florete-shop-hero__title .elementor-heading-title {
		width: max-content;
		max-width: 100%;
		max-inline-size: none;
		font-size: clamp(30px, 2.9vw, 44px) !important;
		line-height: .94 !important;
		white-space: nowrap;
		text-wrap: nowrap;
	}

	.florete-tax-hero h1 {
		font-size: clamp(34px, 4vw, 47px);
	}
}

@media (max-width: 767px) {
	:where(h1, h2, h3, .elementor-heading-title) {
		text-wrap: balance;
	}

	.florete-shop-hero__title .elementor-heading-title {
		max-inline-size: 18ch;
	}
}
