/**
 * Styles for the highlights row block (soto/ventajas).
 *
 * A row of icon + heading + line of copy, used to state what the shop
 * guarantees. Everything comes from tokens; the icon takes the brand red from
 * `currentColor`, so a colour change anywhere reaches it.
 */

.ps-highlights {
	--ps-highlights-columns: 4;
	--ps-highlights-gap: clamp(var(--ps-space-5), 3.5vw, var(--ps-space-7));

	/* Named here rather than used directly below, so a single instance can be
	   recoloured from the block wrapper without a second rule. */
	--ps-highlights-icon: var(--ps-color-brand-600);

	/* The outer margin is the page's rhythm, set for every block in base.css. */
	width: 100%;
}

.ps-highlights__title {
	margin: 0 0 var(--ps-space-6);
	color: var(--ps-color-text);
	font-family: var(--ps-font-display);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	letter-spacing: .035em;
	line-height: 1.05;
	text-align: center;
	text-transform: uppercase;
}

/*
 * `minmax(0, 1fr)` rather than `1fr`: a long unbroken word in a heading would
 * otherwise set the column's minimum and push the row wider than the page.
 */
.ps-highlights__list {
	display: grid;
	grid-template-columns: repeat(var(--ps-highlights-columns), minmax(0, 1fr));
	gap: var(--ps-highlights-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ps-highlights__item {
	display: flex;
	gap: var(--ps-space-4);
	align-items: flex-start;
	min-width: 0;
}

.ps-highlights__icon {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 40px;
	height: 40px;
	color: var(--ps-highlights-icon);
}

.ps-highlights__icon svg {
	width: 100%;
	height: 100%;
}

.ps-highlights__body {
	min-width: 0;
}

.ps-highlights__heading {
	margin: 0 0 6px;
	color: var(--ps-color-text);
	font-family: var(--ps-font-display);
	font-size: clamp(15px, 1.3vw, 17px);
	font-weight: 700;
	letter-spacing: .045em;
	line-height: 1.2;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.ps-highlights__text {
	margin: 0;
	color: var(--ps-color-text-muted);
	font-size: clamp(13px, 1.1vw, 15px);
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/*
 * Optional hairlines between columns. Drawn with a border on the item rather
 * than a pseudo-element so the grid gap keeps them evenly spaced, and dropped
 * on the first item of each row — which is what `:first-child` alone cannot
 * express once the column count changes, hence the per-breakpoint rules.
 */
.ps-highlights--divided .ps-highlights__item {
	padding-left: var(--ps-highlights-gap);
	border-left: 1px solid var(--ps-color-border);
}

.ps-highlights--divided .ps-highlights__item:first-child {
	padding-left: 0;
	border-left: 0;
}

@media (max-width: 1080px) {
	.ps-highlights__list {
		grid-template-columns: repeat(min(var(--ps-highlights-columns), 2), minmax(0, 1fr));
	}

	.ps-highlights--divided .ps-highlights__item:nth-child(odd) {
		padding-left: 0;
		border-left: 0;
	}
}

@media (max-width: 600px) {
	.ps-highlights {
		--ps-highlights-gap: var(--ps-space-5);
	}

	.ps-highlights__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.ps-highlights__item {
		gap: var(--ps-space-3);
	}

	.ps-highlights__icon {
		width: 32px;
		height: 32px;
	}

	/* One column: a left border would sit under every item as a stray rule. */
	.ps-highlights--divided .ps-highlights__item {
		padding-left: 0;
		padding-top: var(--ps-space-4);
		border-left: 0;
		border-top: 1px solid var(--ps-color-border);
	}

	.ps-highlights--divided .ps-highlights__item:first-child {
		padding-top: 0;
		border-top: 0;
	}
}
