/* Product grid of the Produtos page. The card itself lives in product-card.css. */

.product-grid {
	overflow: clip;
	background-color: var(--color-surface);
	/* 24px on top in the node: the banner curve already provides the breathing room. */
	padding-block: var(--space-4) var(--section-padding-end);
}

/*
 * align-items: start is the whole rule that reproduces the 445/474px variation of the
 * node. The name of the Requeijão Culinário Profissional wraps to two lines, its card
 * grows by one line of H5, and the three neighbours stay at the top of the row instead
 * of stretching. Never give the card a fixed height, never stretch, and never clamp the
 * name: the two line break is the design, not a defect to hide.
 */
.product-grid__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-items: start;
	column-gap: 20px;
	row-gap: var(--space-6);
	margin: 0;
	padding: 0;
	list-style: none;
}

.product-grid__cta {
	display: flex;
	justify-content: center;
	margin-block-start: var(--space-gap-section);
}

@media (max-width: 1279px) {
	.product-grid__list {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1023px) {
	.product-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

/*
 * Two columns down to 480 instead of one: a single column would give a page of roughly
 * 5000px of scroll, and 206px still reads.
 */
@media (max-width: 479px) {
	.product-grid__list {
		grid-template-columns: 1fr;
	}
}
