/**
 * Product cards inside articles (MONO_Blog_Product_Cards, old-site shortcode {{product:…}}).
 *
 * A horizontal row with scroll-snap, like the old site's slider without JavaScript:
 * 1.3 cards on phones, 2 / 3 / 4 from 480 / 768 / 1024 px; fewer products fill the row.
 */

.mono-blog-products {
	--mono-bp-ink: #1f1d1a;
	--mono-bp-text: #3a3632;
	--mono-bp-muted: #8f877c;
	--mono-bp-line: #e6e1d9;
	--mono-bp-bg: #ffffff;
	--mono-bp-soft: #f7f4ef;
	--mono-bp-gap: 12px;
	--mono-bp-per-view: 1.3;
	margin: 24px 0;
}

.mono-blog-products__list {
	display: flex;
	gap: var(--mono-bp-gap);
	margin: 0;
	padding: 2px 2px 10px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 2px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.mono-blog-products__item {
	flex: 0 0 calc((100% - (var(--mono-bp-per-view) - 1) * var(--mono-bp-gap)) / var(--mono-bp-per-view));
	min-width: 0;
	max-width: 300px;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

.mono-blog-products__item::before,
.mono-blog-products__item::marker {
	content: none;
}

.mono-blog-products__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--mono-bp-line);
	border-radius: 12px;
	background: var(--mono-bp-bg);
	color: var(--mono-bp-text);
	text-decoration: none;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mono-blog-products__card:hover,
.mono-blog-products__card:focus-visible {
	border-color: var(--mono-bp-muted);
	box-shadow: 0 6px 18px rgba(31, 29, 26, 0.08);
	color: var(--mono-bp-text);
}

.mono-blog-products__image {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--mono-bp-soft);
}

.mono-blog-products__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	object-fit: cover;
}

.mono-blog-products__title {
	display: -webkit-box;
	margin: 12px 12px 6px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.7;
	color: var(--mono-bp-ink);
}

.mono-blog-products__price {
	display: block;
	margin: 0 12px 12px;
	font-size: 14px;
	line-height: 1.6;
}

.mono-blog-products__price del {
	margin-inline-end: 6px;
	color: var(--mono-bp-muted);
	font-size: 12px;
}

.mono-blog-products__price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--mono-bp-ink);
}

.mono-blog-products__button {
	display: block;
	margin: auto 12px 12px;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--mono-bp-ink);
	color: #ffffff;
	font-size: 13px;
	text-align: center;
}

.mono-blog-products__item.is-out-of-stock .mono-blog-products__button {
	background: var(--mono-bp-soft);
	color: var(--mono-bp-muted);
}

@media (min-width: 480px) {
	.mono-blog-products {
		--mono-bp-per-view: min(2, var(--mono-bp-count));
	}
}

@media (min-width: 768px) {
	.mono-blog-products {
		--mono-bp-gap: 16px;
		--mono-bp-per-view: min(3, var(--mono-bp-count));
	}
}

@media (min-width: 1024px) {
	.mono-blog-products {
		--mono-bp-per-view: min(4, var(--mono-bp-count));
	}
}
