/**
 * Clarity Manual Related Products
 * Theme-isolated, responsive product recommendations for Clarity Peptides.
 */

.cmrp-section.cmrp-related-products {
	--cmrp-columns-desktop: 4;
	--cmrp-columns-tablet: 2;
	--cmrp-columns-mobile: 1;
	--cmrp-column-gap-desktop: 24px;
	--cmrp-column-gap-tablet: 20px;
	--cmrp-column-gap-mobile: 14px;
	--cmrp-row-gap-desktop: 24px;
	--cmrp-row-gap-tablet: 20px;
	--cmrp-row-gap-mobile: 16px;
	--cmrp-max-width: 100%;
	--cmrp-section-bg: transparent;
	--cmrp-heading-color: #fdfdfd;
	--cmrp-card-bg: #0d253d;
	--cmrp-card-border: #172e46;
	--cmrp-card-hover-border: #3566ad;
	--cmrp-card-border-width: 1px;
	--cmrp-card-radius: 12px;
	--cmrp-card-padding: 16px;
	--cmrp-card-shadow: 0 8px 24px rgb(0 10 24 / 14%);
	--cmrp-card-hover-shadow: 0 16px 34px rgb(0 10 24 / 25%);
	--cmrp-hover-lift: -4px;
	--cmrp-image-bg: #fff;
	--cmrp-image-ratio: 1 / 1;
	--cmrp-image-fit: contain;
	--cmrp-image-padding: 14px;
	--cmrp-title-color: #fdfdfd;
	--cmrp-strength-color: #8db5eb;
	--cmrp-strength-bg: rgb(53 102 173 / 18%);
	--cmrp-price-color: #fdfdfd;
	--cmrp-muted-color: #cbd0d5;
	--cmrp-button-text: #fff;
	--cmrp-button-bg: #1e427e;
	--cmrp-button-border: #1e427e;
	--cmrp-button-hover-text: #fff;
	--cmrp-button-hover-bg: #2f67b4;
	--cmrp-button-hover-border: #2f67b4;
	--cmrp-button-radius: 7px;
	--cmrp-focus-color: #7fa8ed;
	width: 100%;
	max-width: var(--cmrp-max-width);
	margin-inline: auto;
	color: var(--cmrp-title-color);
	background: var(--cmrp-section-bg);
}

.cmrp-related-products,
.cmrp-related-products *,
.cmrp-related-products *::before,
.cmrp-related-products *::after {
	box-sizing: border-box;
}

.cmrp-related-products .cmrp-heading {
	margin: 0 0 24px;
	padding: 0;
	color: var(--cmrp-heading-color);
	font-size: clamp(1.65rem, 2.5vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	text-align: start;
}

.cmrp-related-products .cmrp-grid {
	display: grid;
	grid-template-columns: repeat(var(--cmrp-columns-desktop), minmax(0, 1fr));
	column-gap: var(--cmrp-column-gap-desktop);
	row-gap: var(--cmrp-row-gap-desktop);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cmrp-related-products .cmrp-grid > .cmrp-card {
	float: none;
	width: auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: var(--cmrp-card-padding);
	clear: none;
	border: var(--cmrp-card-border-width) solid var(--cmrp-card-border);
	border-radius: var(--cmrp-card-radius);
	background: var(--cmrp-card-bg);
	box-shadow: var(--cmrp-card-shadow);
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cmrp-related-products .cmrp-card__inner {
	display: flex;
	width: 100%;
	min-width: 0;
	height: 100%;
	flex-direction: column;
}

.cmrp-related-products .cmrp-card__product-link {
	display: flex;
	min-width: 0;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.cmrp-related-products .cmrp-card__image-wrap {
	position: relative;
	display: grid;
	width: 100%;
	min-width: 0;
	aspect-ratio: var(--cmrp-image-ratio);
	overflow: hidden;
	border-radius: max(0px, calc(var(--cmrp-card-radius) - 4px));
	background: var(--cmrp-image-bg);
	place-items: center;
}

.cmrp-related-products .cmrp-card__image,
.cmrp-related-products .cmrp-card__image-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: var(--cmrp-image-padding);
	object-fit: var(--cmrp-image-fit);
	object-position: center;
	transition: transform 220ms ease;
}

.cmrp-related-products .cmrp-card__identity {
	display: flex;
	min-width: 0;
	padding: 17px 2px 0;
	flex-direction: column;
	align-items: flex-start;
	text-align: start;
}

.cmrp-related-products .cmrp-card__strength {
	display: inline-flex;
	max-width: 100%;
	margin-block-end: 9px;
	padding: 5px 9px;
	overflow-wrap: anywhere;
	border: 1px solid color-mix(in srgb, var(--cmrp-strength-color) 24%, transparent);
	border-radius: 999px;
	color: var(--cmrp-strength-color);
	background: var(--cmrp-strength-bg);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.055em;
	text-transform: uppercase;
}

@supports not (color: color-mix(in srgb, #fff 50%, transparent)) {
	.cmrp-related-products .cmrp-card__strength {
		border-color: var(--cmrp-card-hover-border);
	}
}

.cmrp-related-products .cmrp-card__title {
	display: -webkit-box;
	min-width: 0;
	min-height: 2.7em;
	margin: 0 0 10px;
	padding: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--cmrp-title-color);
	font-size: 1.06rem;
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.cmrp-related-products .cmrp-card__details {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	padding-inline: 2px;
	text-align: start;
}

.cmrp-related-products .cmrp-card__price {
	margin: 0 0 15px;
	color: var(--cmrp-price-color);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.cmrp-related-products .cmrp-card__price del {
	margin-inline-end: 6px;
	color: var(--cmrp-muted-color);
	font-size: 0.82em;
	font-weight: 500;
	opacity: 0.76;
}

.cmrp-related-products .cmrp-card__price ins {
	padding: 0;
	color: inherit;
	background: transparent;
	text-decoration: none;
}

.cmrp-related-products .cmrp-card__stock {
	margin: -3px 0 12px;
	color: #65c69a;
	font-size: 0.78rem;
	font-weight: 650;
	line-height: 1.35;
}

.cmrp-related-products .cmrp-card__stock--out {
	color: #f0a0a7;
}

.cmrp-related-products .cmrp-card__actions {
	display: grid;
	width: 100%;
	min-width: 0;
	gap: 8px;
	margin-block-start: auto;
}

.cmrp-related-products .cmrp-card__actions .button,
.cmrp-related-products .cmrp-card__actions a.button,
.cmrp-related-products .cmrp-card__actions .added_to_cart {
	position: relative;
	display: inline-flex;
	width: 100%;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 11px 16px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--cmrp-button-border);
	border-radius: var(--cmrp-button-radius);
	color: var(--cmrp-button-text);
	background: var(--cmrp-button-bg);
	box-shadow: none;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cmrp-related-products .cmrp-card__actions .added_to_cart {
	border-color: var(--cmrp-card-hover-border);
	color: var(--cmrp-strength-color);
	background: transparent;
}

.cmrp-related-products .cmrp-card__actions .button.loading {
	cursor: wait;
	opacity: 0.72;
	pointer-events: none;
}

.cmrp-related-products .cmrp-card__actions .button.loading::after {
	width: 0.9em;
	height: 0.9em;
	margin-inline-start: 0.65em;
	content: "";
	border: 2px solid currentcolor;
	border-inline-end-color: transparent;
	border-radius: 50%;
	animation: cmrp-spin 650ms linear infinite;
}

.cmrp-related-products .cmrp-card__actions .button.added::after {
	width: 0.45em;
	height: 0.78em;
	margin-inline-start: 0.7em;
	content: "";
	border: solid currentcolor;
	border-width: 0 2px 2px 0;
	transform: translateY(-0.08em) rotate(45deg);
}

.cmrp-related-products .cmrp-card__actions .button.disabled,
.cmrp-related-products .cmrp-card__actions .button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.cmrp-related-products .cmrp-card--out-of-stock .cmrp-card__actions .button {
	border-color: #46627c;
	color: var(--cmrp-muted-color);
	background: transparent;
}

.cmrp-related-products .cmrp-card__product-link:focus-visible,
.cmrp-related-products .cmrp-card__actions .button:focus-visible,
.cmrp-related-products .cmrp-card__actions .added_to_cart:focus-visible {
	outline: 3px solid var(--cmrp-focus-color);
	outline-offset: 3px;
}

.cmrp-related-products .cmrp-card:focus-within {
	border-color: var(--cmrp-card-hover-border);
	box-shadow: var(--cmrp-card-hover-shadow);
}

.cmrp-editor-note {
	display: flex;
	width: 100%;
	min-width: 0;
	padding: 18px 20px;
	gap: 7px;
	flex-direction: column;
	border: 1px dashed #3566ad;
	border-radius: 10px;
	color: #fdfdfd;
	background: #0d253d;
	font-size: 14px;
	line-height: 1.5;
}

.cmrp-editor-note span {
	color: #cbd0d5;
}

@keyframes cmrp-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (hover: hover) and (pointer: fine) {
	.cmrp-related-products .cmrp-card:hover {
		transform: translateY(var(--cmrp-hover-lift));
		border-color: var(--cmrp-card-hover-border);
		box-shadow: var(--cmrp-card-hover-shadow);
	}

	.cmrp-related-products .cmrp-card:hover .cmrp-card__image {
		transform: scale(1.035);
	}

	.cmrp-related-products .cmrp-card__actions .button:hover,
	.cmrp-related-products .cmrp-card__actions .added_to_cart:hover {
		border-color: var(--cmrp-button-hover-border);
		color: var(--cmrp-button-hover-text);
		background: var(--cmrp-button-hover-bg);
	}
}

@media (max-width: 1023px) {
	.cmrp-related-products .cmrp-grid {
		grid-template-columns: repeat(var(--cmrp-columns-tablet), minmax(0, 1fr));
		column-gap: var(--cmrp-column-gap-tablet);
		row-gap: var(--cmrp-row-gap-tablet);
	}
}

@media (max-width: 767px) {
	.cmrp-related-products .cmrp-grid {
		grid-template-columns: repeat(var(--cmrp-columns-mobile), minmax(0, 1fr));
		column-gap: var(--cmrp-column-gap-mobile);
		row-gap: var(--cmrp-row-gap-mobile);
	}

	.cmrp-related-products .cmrp-card__identity {
		padding-block-start: 14px;
	}

	.cmrp-related-products .cmrp-card__title {
		font-size: 0.98rem;
	}

	.cmrp-related-products .cmrp-card__actions .button,
	.cmrp-related-products .cmrp-card__actions .added_to_cart {
		min-height: 44px;
		padding-inline: 10px;
		font-size: 0.84rem;
	}
}

@media (max-width: 479px) {
	.cmrp-related-products .cmrp-grid > .cmrp-card {
		width: 100%;
		max-width: 380px;
		margin-inline: auto;
	}
}

[dir="rtl"] .cmrp-related-products {
	direction: rtl;
}

@media (prefers-reduced-motion: reduce) {
	.cmrp-related-products .cmrp-card,
	.cmrp-related-products .cmrp-card__image,
	.cmrp-related-products .cmrp-card__actions .button,
	.cmrp-related-products .cmrp-card__actions .added_to_cart {
		animation: none;
		transition: none;
	}

	.cmrp-related-products .cmrp-card:hover,
	.cmrp-related-products .cmrp-card:hover .cmrp-card__image {
		transform: none;
	}
}
