/* Product reviews use the same WooCommerce data as Home and catalogue cards. */
body.vsce-has-product-testimonials #cia-testimonials,
body.vsce-has-product-testimonials #cp > .section:has(#cp-reviews),
body.vsce-has-product-testimonials #cp .section:has(> .wrap > #cp-reviews) {
	display: none !important;
}

.vsce-product-testimonials {
	box-sizing: border-box;
	width: min(1180px, calc(100% - 40px));
	max-width: 1180px !important;
	margin: 56px auto 46px !important;
	padding: 0 !important;
	color: #1e293b;
	font-family: var(--wp--preset--font-family--body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.vsce-product-testimonials *,
.vsce-product-testimonials *::before,
.vsce-product-testimonials *::after {
	box-sizing: border-box;
}

.vsce-product-testimonials__header {
	display: flex;
	margin-bottom: 24px;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.vsce-product-testimonials__eyebrow {
	display: block;
	margin-bottom: 7px;
	color: #0d8a6f;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .1em;
	line-height: 1.25;
	text-transform: uppercase;
}

.vsce-product-testimonials h2 {
	margin: 0 !important;
	color: #113d5c;
	font-family: var(--wp--preset--font-family--heading-font, 'Lora', Georgia, serif) !important;
	font-size: clamp(20px, 5vw, 34px) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	white-space: nowrap;
	text-wrap: nowrap;
}

.vsce-product-testimonials__summary {
	display: grid;
	min-width: 145px;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 10px;
	text-align: left;
}

.vsce-product-testimonials__summary > strong {
	grid-row: 1 / span 2;
	color: #113d5c;
	font-size: 31px;
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1;
}

.vsce-product-testimonials__summary-stars,
.vsce-product-testimonial__stars {
	color: #d99016;
	font-family: Arial, sans-serif;
	font-weight: 700;
	letter-spacing: 1px;
	white-space: nowrap;
}

.vsce-product-testimonials__summary-stars {
	color: #d7dee7;
	background: linear-gradient(
		90deg,
		#d99016 0,
		#d99016 var(--vs-rating-percent, 100%),
		#d7dee7 var(--vs-rating-percent, 100%),
		#d7dee7 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	font-size: 14px;
	line-height: 1;
	-webkit-text-fill-color: transparent;
}

.vsce-product-testimonials__summary small {
	margin-top: 3px;
	color: #647786;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}

.vsce-product-testimonials__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 12px;
}

.vsce-product-testimonial {
	display: flex;
	min-width: 0;
	min-height: 0;
	padding: 16px;
	flex-direction: column;
	border: 0;
	border-radius: 12px;
	background: #f5f8fa;
	box-shadow: none;
}

.vsce-product-testimonial.has-media {
	display: grid;
	grid-template-areas:
		'media stars'
		'media title'
		'quote quote'
		'footer footer';
	grid-template-columns: 76px minmax(0, 1fr);
	grid-template-rows: auto auto auto auto;
	align-items: start;
	column-gap: 13px;
}

.vsce-product-testimonial.is-extra {
	display: none;
}

.vsce-product-testimonials.is-expanded .vsce-product-testimonial.is-extra {
	display: flex;
}

.vsce-product-testimonials.is-expanded .vsce-product-testimonial.has-media.is-extra {
	display: grid;
}

.vsce-product-testimonial__media {
	grid-area: media;
	position: relative;
	width: 76px;
	margin: 0 !important;
	overflow: hidden;
	border-radius: 9px;
	background: #e7eef3;
	aspect-ratio: 1;
}

.vsce-product-testimonial__media::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 65%, rgba(17, 61, 92, .11));
	content: '';
	pointer-events: none;
}

.vsce-product-testimonial__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	filter: saturate(.82) contrast(1.04) brightness(.99);
	transform: scale(1.015);
	transition: filter 180ms ease, transform 180ms ease;
}

.vsce-product-testimonial:hover .vsce-product-testimonial__media img {
	filter: saturate(.94) contrast(1.02) brightness(1);
	transform: scale(1.035);
}

.vsce-product-testimonial__stars {
	grid-area: stars;
	margin: 2px 0 6px;
	font-size: 14px;
	line-height: 1;
}

.vsce-product-testimonial h3 {
	grid-area: title;
	margin: 0 !important;
	color: #173e59;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 750 !important;
	line-height: 1.3 !important;
}

.vsce-product-testimonial blockquote {
	grid-area: quote;
	margin: 14px 0 15px !important;
	padding: 0 !important;
	border: 0 !important;
	color: #42596a;
	font-family: inherit !important;
	font-size: 13px !important;
	font-style: normal !important;
	font-weight: 450;
	line-height: 1.55 !important;
}

.vsce-product-testimonial > footer {
	grid-area: footer;
	display: flex;
	margin-top: auto;
	align-items: center;
	gap: 10px;
	background: transparent !important;
}

.vsce-product-testimonial__avatar {
	display: inline-flex;
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #dcebf4;
	color: #15577f;
	font-size: 11px;
	font-weight: 800;
}

.vsce-product-testimonial__person {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 3px;
}

.vsce-product-testimonial__person > strong {
	color: #173e59;
	font-size: 13px;
	font-weight: 750;
	line-height: 1.2;
}

.vsce-product-testimonial__person > small {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 8px;
	color: #718390;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.25;
}

.vsce-product-testimonial__verified {
	color: #0d8a6f;
}

.vsce-product-testimonial__verified::before {
	content: '✓';
	margin-right: 4px;
	font-weight: 900;
}

.vsce-product-testimonials__more {
	display: flex;
	margin-top: 22px;
	justify-content: center;
}

.vsce-product-testimonials__toggle {
	display: inline-flex;
	min-height: 48px;
	padding: 11px 19px;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border: 1px solid rgba(21, 101, 160, .24);
	border-radius: 11px;
	background: #fff;
	box-shadow: none;
	color: #15577f;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.2;
	text-transform: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.vsce-product-testimonials__toggle:hover,
.vsce-product-testimonials__toggle:focus-visible {
	border-color: #0d8a6f;
	background: #edf5fa;
	color: #113d5c;
}

.vsce-product-testimonials__toggle small {
	display: inline-flex;
	min-width: 28px;
	height: 24px;
	padding: 0 7px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #dcebf4;
	color: #15577f;
	font-size: 11px;
	font-weight: 800;
}

@media (max-width: 899px) {
	.vsce-product-testimonials__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 639px) {
	.vsce-product-testimonials {
		width: min(100% - 28px, 1180px);
		margin-top: 42px !important;
		margin-bottom: 36px !important;
	}

	.vsce-product-testimonials__header {
		margin-bottom: 19px;
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.vsce-product-testimonials__summary {
		min-width: 0;
	}

	.vsce-product-testimonials__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 11px;
	}

	.vsce-product-testimonial {
		min-height: 0;
		padding: 15px;
	}

	.vsce-product-testimonial__media {
		width: 68px;
		border-radius: 8px;
	}

	.vsce-product-testimonial.has-media {
		grid-template-columns: 68px minmax(0, 1fr);
		column-gap: 12px;
	}

	.vsce-product-testimonials__toggle {
		width: 100%;
	}
}
