/**
 * Related Products Grid (fallback stylesheet; critical CSS is also inlined)
 * Mobile-first: 2 columns
 * Desktop (≥768px): 4 columns
 */

.rpg-related-products {
	width: 100% !important;
	max-width: 100% !important;
	margin: 2rem 0;
	padding: 0;
	box-sizing: border-box;
	overflow: visible !important;
}

.rpg-related-products *,
.rpg-related-products *::before,
.rpg-related-products *::after {
	box-sizing: border-box;
}

.rpg-related-products__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.rpg-related-products__grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 0.875rem !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	overflow: visible !important;
	overflow-x: visible !important;
	transform: none !important;
}

.rpg-related-products__item {
	display: block !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	flex: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.rpg-related-products__link {
	display: flex !important;
	flex-direction: column !important;
	height: 100%;
	color: inherit;
	text-decoration: none;
	white-space: normal !important;
}

.rpg-related-products__link:hover .rpg-related-products__name,
.rpg-related-products__link:focus-visible .rpg-related-products__name {
	text-decoration: underline;
}

.rpg-related-products__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #f5f5f5;
	margin-bottom: 0.75rem;
}

.rpg-related-products__media img,
.rpg-related-products__image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover;
}

.rpg-related-products__name {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.35;
	color: #000 !important;
	white-space: normal !important;
}

.rpg-related-products__price {
	display: block;
	font-size: 0.9rem;
	line-height: 1.4;
}

.rpg-related-products__price del {
	opacity: 0.65;
	margin-right: 0.35em;
}

@media (min-width: 768px) {
	.rpg-related-products__title {
		font-size: 1.5rem;
	}

	.rpg-related-products__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 1.25rem !important;
	}
}
