/* ==========================================================================
   Galleria De Rings: Customer testimonials (home page, below "Lab-Grown
   vs. Natural")
   Simple: on white, a centred serif heading with a thin arrow at each end
   of the row; below, plain soft-grey cards (four in view on desktop) with
   navy stars, the review (cut to four lines), "city · piece" and the name.
   Phones swipe (arrows hidden), with the next card peeking in.
   ========================================================================== */

.tm {
	--tm-gap: clamp(14px, 1.8vw, 24px);
	--tm-per: 4;

	padding: clamp(28px, 3vw, 44px) clamp(16px, 4vw, 64px);
	background: var(--g-white);
}

.tm__inner {
	max-width: 1320px;
	margin: 0 auto;
}

/* Heading with an arrow at each end */
.tm__head {
	display: grid;
	grid-template-columns: 48px 1fr 48px;
	align-items: center;
	gap: 16px;
	margin-bottom: clamp(20px, 2.4vw, 32px);
}

.tm__heading {
	text-align: center;
}

.tm__eyebrow {
	margin: 0 0 10px;
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.tm__title {
	margin: 0;
	color: var(--g-navy);
	font-family: var(--g-font-heading);
	font-size: clamp(30px, 3.4vw, 46px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.tm__title em {
	font-style: italic;
}

.tm__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--g-navy);
	cursor: pointer;
	transition: background-color 0.25s ease, opacity 0.25s ease;
}

.tm__arrow:hover:not(:disabled) {
	background: var(--g-cream, #f7f5f1);
}

.tm__arrow:disabled {
	cursor: default;
	opacity: 0.3;
}

.tm__arrow:focus-visible {
	outline: 2px solid var(--g-navy);
	outline-offset: 2px;
}

/* Nothing to scroll: keep the arrows' space, hide them */
.tm--static .tm__arrow {
	visibility: hidden;
}

/* Note shown only to admins while the reviews are demo ones */
.tm__sample-note {
	margin: 0 0 18px;
	padding: 10px 16px;
	border: 1px dashed rgba(11, 19, 42, 0.3);
	border-radius: 8px;
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 0.85rem;
	text-align: center;
}

.tm__sample-note a {
	color: inherit;
	font-weight: 600;
}

/* Row of cards */
.tm__track {
	position: relative; /* clips everything inside, hidden screen-reader text included */
	display: flex;
	gap: var(--tm-gap);
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	list-style: none;
}

.tm__track::-webkit-scrollbar {
	display: none;
}

.tm__card {
	position: relative; /* keeps the hidden "5 out of 5 stars" text inside the card, so off-screen cards never widen the page */
	display: flex;
	flex: 0 0 calc((100% - (var(--tm-per) - 1) * var(--tm-gap)) / var(--tm-per));
	flex-direction: column;
	min-width: 0;
	padding: clamp(22px, 2.2vw, 30px);
	border-radius: 6px;
	background: #f7f7f8;
	scroll-snap-align: start;
}

.tm__stars {
	display: flex;
	gap: 4px;
	margin: 0 0 14px;
	color: var(--g-navy);
}

.tm__star--off {
	color: rgba(11, 19, 42, 0.18);
}

.tm__quote {
	flex: 1;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.tm__quote p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 0.95rem;
	font-style: normal;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.tm__meta {
	margin: 0 0 4px;
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 0.82rem;
}

.tm__name {
	margin: 0;
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 0.98rem;
	font-weight: 600;
}

/* Smaller screens: fewer cards in view */
@media (max-width: 1199px) {
	.tm {
		--tm-per: 3;
	}
}

@media (max-width: 991px) {
	.tm {
		--tm-per: 2;
	}
}

/* Phones: swipe, arrows hidden, next card peeking in */
@media (max-width: 767px) {
	.tm {
		padding: 28px 0 32px;
	}

	.tm__head {
		display: block;
		padding: 0 16px;
	}

	.tm__arrow {
		display: none;
	}

	.tm__sample-note {
		margin: 0 16px 16px;
	}

	.tm__track {
		padding: 0 16px;
		scroll-padding-inline: 16px;
	}

	.tm__card {
		flex-basis: 82%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tm__track {
		scroll-behavior: auto;
	}
}
