/**
 * Kubota Europe product featured specs (WPBakery element
 * `vc_kbeu_product_featured_specs`).
 *
 * Based on the Figma design (panel node 4166-3182 + cells node 4166-3184): a gray
 * rounded panel (#F6F6F6, radius 14px, generous padding) holding a row of cells, each
 * with an icon in a soft rounded box, a large teal value (#03A8A9, Bold
 * ~64px) with its unit (~32px) and a label beneath (#202024, Roman ~20px).
 * The row is a responsive auto-fit grid so it reflows to fewer columns as the viewport
 * narrows.
 *
 * Font family "Inter" is provided by the plugin's fonts stylesheet
 * (this handle depends on `kbeu-fonts`) and referenced via `--kbeu-font-principal`.
 * The bundled family ships 300 / 400 / 500 / 700 weights. Icon color is driven by a single
 * custom property so every icon recolors at once ({@see SpecIcons::svg()}).
 */

.kbeu-product-fs {
	--kbeu-fs-teal: var( --kbeu-color-teal );
	--kbeu-fs-label: var( --kbeu-color-ink-alt );
	--kbeu-fs-icon: var( --kbeu-color-teal );
	--kbeu-fs-icon-bg: #ffffff;
	--kbeu-fs-panel-bg: var( --kbeu-color-surface );
	--kbeu-fs-panel-radius: 14px;
	--kbeu-fs-gap: clamp( 24px, 3vw, 38px );
}

.kbeu-product-fs__inner {
	margin: 0 auto;
}

/* The gray rounded panel that wraps the row (Figma node 4166-3182). */
.kbeu-fs__panel {
	background: var( --kbeu-fs-panel-bg );
	border-radius: var( --kbeu-fs-panel-radius );
	padding: clamp( 28px, 3.5vw, 48px ) clamp( 24px, 4vw, 48px );
}

/* Optional heading above the row. */
.kbeu-fs__title {
	margin: 0 0 clamp( 24px, 3vw, 44px );
	font-family: var( --kbeu-font-principal );
	font-weight: 500;
	line-height: 1.2;
	font-size: clamp( 28px, 4vw, 48px );
	color: #000;
}

/* The cells: a grid capped at 4 columns; a 5th+ feature wraps to a new row.
   The column count steps down on narrower viewports. */
.kbeu-fs__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	gap: var( --kbeu-fs-gap );
}

@media ( max-width: 1024px ) {
	.kbeu-fs__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 560px ) {
	.kbeu-fs__grid {
		grid-template-columns: 1fr;
	}
}

/* Each cell: a left column (icon over label) beside the value. */
.kbeu-fs__item {
	margin: 0;
	display: flex;
	align-items: center;
	gap: clamp( 12px, 1.4vw, 22px );
	font-family: var( --kbeu-font-principal );
}

/* Left column: icon on top, label beneath it. */
.kbeu-fs__left {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp( 6px, 0.8vw, 12px );
	width: clamp( 96px, 9vw, 132px );
}

.kbeu-fs__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp( 52px, 5vw, 68px );
	height: clamp( 52px, 5vw, 68px );
	border-radius: 12px;
	background: var( --kbeu-fs-icon-bg );
	color: var( --kbeu-fs-icon );
}

.kbeu-fs__icon-svg {
	width: 56%;
	height: 56%;
}

/* Value + unit, baseline-aligned so the unit sits low like the design.
   The whole value shares one `font-size` (the design maximum) and the unit is
   sized relative to it, so the fit-to-width script (kbeu-product-featured-specs.js)
   can shrink both together by scaling this single value when a long number/text
   would otherwise overflow the cell. `nowrap` keeps it on one line to measure. */
.kbeu-fs__value {
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 0.25em;
	color: var( --kbeu-fs-teal );
	line-height: 1;
	min-width: 0;
	font-size: clamp( 30px, 3.6vw, 64px );
	white-space: nowrap;
}

.kbeu-fs__number {
	font-weight: 700;
	font-size: 1em;
}

.kbeu-fs__unit {
	font-weight: 700;
	font-size: 0.5em;
}

/* Label beneath the icon, in the left column. */
.kbeu-fs__label {
	margin: 0;
	color: var( --kbeu-fs-label );
	font-weight: 400;
	line-height: 1.3;
	font-size: clamp( 15px, 1.1vw, 20px );
	text-align: center;
}
