/* Catalog section and product card (Figma: Container / Product card) */
.products {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
	padding: 120px 24px;
	background: linear-gradient(180deg, #fff 0%, #e7f3fe 50%, #fff 100%);
}

.products__list {
	display: grid;
	grid-template-columns: repeat(3, 340px);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.products__item {
	display: flex;
}

.product-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding-top: 16px;
	border-radius: 34px;
	background: #fff;
	/* 2px border drawn inside, so the card stays 340x432 */
	box-shadow: inset 0 0 0 2px #f4f9fd;
	color: #000;
	cursor: pointer;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Whole card is the link: "Подробнее" is the real link, its ::after covers the card. */
.product-card {
	position: relative;
}

.product-card .product-card__more {
	position: static;
}

.product-card__more::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 34px;
}

/* The order button is its own link above the cover layer */
.product-card .product-card__order {
	position: relative;
	z-index: 2;
}

/* No transform on the cover link itself: it would become the containing block of its ::after, the cover
   would shrink to the link on press, and the click would land on the card instead of the link. */
html.motion .product-card .product-card__more:hover,
html.motion .product-card .product-card__more:active {
	transform: none;
}

.product-card__more:focus-visible {
	outline: none;
}

.product-card__more:focus-visible::after {
	outline: 3px solid var(--color-blue);
	outline-offset: 3px;
}

.product-card__image {
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
	.product-card:hover {
		transform: translateY(-4px);
		box-shadow: inset 0 0 0 2px #f4f9fd, 0 14px 32px -8px rgba(30, 110, 200, 0.22);
	}

	.product-card:hover .product-card__image {
		transform: scale(1.04);
	}
}

.product-card:active {
	transform: translateY(-1px) scale(0.99);
	transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
	.product-card,
	.product-card__image {
		transition: none;
	}

	.product-card:hover,
	.product-card:active,
	.product-card:hover .product-card__image {
		transform: none;
	}
}

.product-card__image {
	display: block;
	width: 200px;
	height: 200px;
}

.product-card__info {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 15px 0;
}

.product-card__value {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	margin: 0;
	letter-spacing: -0.005em;
}

.product-card__number {
	font-family: var(--font-numbers);
	font-size: 32px;
	font-weight: 400;
	line-height: 32px;
}

.product-card__unit {
	font-family: var(--font-base);
	font-size: 32px;
	font-weight: 500;
	line-height: 32px;
}

.product-card__tags {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16px;
	line-height: 1.5;
	opacity: 0.8;
}

.product-card__tags li + li::before {
	content: "\00b7";
	margin: 0 8px;
}

.product-card__actions {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

/* Tablet: two columns */
@media (max-width: 1099px) {
	.products__list {
		grid-template-columns: repeat(2, 340px);
	}
}

/* Mobile */
@media (max-width: 767px) {
	.products {
		gap: 24px;
		padding: 40px 24px;
	}

	.products__list {
		grid-template-columns: minmax(0, 340px);
		width: 100%;
		justify-content: center;
		gap: 16px;
	}

	.product-card {
		box-shadow: none;
	}

	.product-card:hover {
		box-shadow: 0 14px 32px -8px rgba(30, 110, 200, 0.22);
	}

	.product-card__number,
	.product-card__unit {
		font-size: 24px;
		line-height: 30px;
	}
}
