/* UN Ontology Details — single-product technical sheet (fiche technique only).
   Grouped specs, text-only, theme-delegated typography. Tokens mirror
   un-ontology-filter.css so filter and details read as one system. Colors/
   typography are Elementor-tunable (Style tab) — defaults are fallbacks. */

.un-ontology-details {
	--und-color-text: var(--un-text);
	--und-color-muted: var(--un-text-2);
	--und-color-soft: var(--un-rose-divider);
	--und-hover-color: var(--un-rose);

	/* Sections flow into up to --und-col-count columns, each at least
	   --und-col-width wide — so the widget uses 1 column in a narrow placement
	   and up to 3 when given the full row width. Both are Elementor-tunable. */
	--und-col-count: 3;
	--und-col-width: 240px;

	display: block;
	width: 100%;
	box-sizing: border-box;
	columns: var(--und-col-width) var(--und-col-count);
	column-gap: 32px;
}

.un-ontology-details *,
.un-ontology-details *::before,
.un-ontology-details *::after {
	box-sizing: border-box;
}

/* === Section ====================================================== */

/* Keep each section whole within a column (never split across columns). */
.un-ontology-details__group {
	margin: 0 0 20px;
	-webkit-column-break-inside: avoid;
	break-inside: avoid;
}

.un-ontology-details__group:last-child {
	margin-bottom: 0;
}

.un-ontology-details__group-title {
	margin: 0 0 8px;
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--und-color-muted);
}

.un-ontology-details__list {
	margin: 0;
	padding: 0;
}

/* === Row: label ............... value(s) ========================== */

.un-ontology-details__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 6px 0;
	border-bottom: 1px solid var(--und-color-soft);
}

/* Divider only between stacked rows. Groups never split across columns
   (break-inside: avoid), so the last row of a group is always its visual
   bottom — dropping its border avoids a divider dangling over empty space
   at a column break. */
.un-ontology-details__list .un-ontology-details__row:last-child {
	border-bottom: 0;
}

.un-ontology-details__label {
	margin: 0;
	color: var(--und-color-muted);
}

.un-ontology-details__values {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	justify-content: flex-end;
	text-align: right;
}

.un-ontology-details__value {
	color: var(--und-color-text);
	font-weight: 500;
}

/* Interactive value → link to the shop with the ontology filter preset. */
.un-ontology-details__value--link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s ease;
}

.un-ontology-details__value--link:hover,
.un-ontology-details__value--link:focus-visible {
	color: var(--und-hover-color);
	outline: none;
}

/* === Responsive: label above values =============================== */

@media (max-width: 600px) {
	.un-ontology-details__row {
		flex-direction: column;
		gap: 2px;
	}

	.un-ontology-details__values {
		justify-content: flex-start;
		text-align: left;
	}
}
