/**
 * MOOS Tweaks — product name lockup.
 *
 * Two parts: "Żelki" set large, the rest of the descriptive name set small
 * underneath. Sizes are declared per context rather than in em off whatever the
 * theme happens to set. The two-part treatment is a product-PAGE-hero device
 * only — a giant repeated "Żelki" reads as clutter at tile size, so both the
 * moos/products card and the drawer card print the name flat instead (see
 * MOOS_Naming::display_name()) and only ever inherit this file's shared
 * `.moos-brand-line` / `.moos-brand-line--pdp` rules, never `.moos-name-lead`.
 *
 * The brand caption is faded with opacity, not a fixed grey: it sits on white
 * cards and on the red drawer panel, and currentColor is correct on both.
 */

.moos-name {
	display: block;
	text-wrap: balance;
}

.moos-name-lead,
.moos-name-rest {
	display: block;
}

.moos-name-lead {
	line-height: 0.94;
	letter-spacing: -0.015em;
}

.moos-name-rest {
	line-height: 1.18;
	font-weight: 400;
	letter-spacing: -0.005em;
}

.moos-brand-line {
	display: block;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	opacity: 0.5;
	margin-top: 0.35em;
}

/* ---------------------------------------------------------------
 * PDP
 * --------------------------------------------------------------- */

.product_title .moos-name-lead {
	font-size: clamp(44px, 7vw, 84px);
}

.product_title .moos-name-rest {
	font-size: clamp(21px, 3.1vw, 33px);
	margin-top: 0.12em;
}

/*
 * The brand still has to appear on the product page — it is on the jar, it is
 * what people reorder by, and it is no longer in the heading. It sits directly
 * under the name, a step up in size from the card caption because here it is
 * the only place the brand is written.
 */
.moos-brand-line--pdp {
	font-size: 0.82rem;
	letter-spacing: 0.12em;
	opacity: 0.6;
	margin: 0.55em 0 0;
}

/*
 * moos/products card block: the name prints FLAT there (plain text, no
 * .moos-name-lead/-rest spans — see MOOS_Products_Block::card()), so it
 * inherits the theme's own .woocommerce-loop-product__title size. A repeated
 * giant "Żelki" on every tile read as clutter, not hierarchy — the same
 * tradeoff the drawer card below was already built to avoid.
 */

/* ---------------------------------------------------------------
 * Drawer (slide-out menu panel)
 * --------------------------------------------------------------- */

/*
 * The drawer clamps card names to a single line — correct for "Full Moon",
 * wrong for a 35-character remainder, which came out as "witaminowe z…". The
 * clamp is lifted for the lockup only; a card that is too short for its name is
 * a layout problem, not something to hide behind an ellipsis.
 */
.moos-card-name,
.moos-card-name .moos-name,
.moos-card-name .moos-name-rest {
	display: block;
	/*
	 * !important, deliberately: moos-drawer.css sets overflow:hidden with a
	 * one-line height on .moos-card-name, and this stylesheet has no ordering
	 * guarantee against it. Racing it on specificity would break the moment
	 * either file is re-enqueued in a different order.
	 */
	overflow: visible !important;
	max-height: none !important;
	height: auto !important;
	white-space: normal !important;
	text-overflow: clip !important;
	-webkit-line-clamp: unset !important;
	line-clamp: unset !important;
}

.moos-card .moos-brand-line {
	font-size: 0.62rem;
	margin-top: 0.3em;
}
