/* Product Reviews — "Tried & Tested by the Best" with the Customer Reviews
   box, the testimonial cards (testimonials.css supplies the card internals)
   and the Write a Review panel holding WooCommerce's reviews + form
   (design.md §Product page). */

.tt-product-reviews {
	display: flex;
	flex-direction: column;
	gap: 48px;
	margin: 0 !important;
	padding: 100px calc(50px + var(--tt-bleed));
	background: var(--wp--preset--color--ink, #141412);
	color: #fff;
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px);
}

.tt-product-reviews > * {
	margin: 0 !important;
}

.tt-product-reviews__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(420px, 31.02vw, 536px);
	align-items: end;
	gap: 64px;
}

.tt-product-reviews__heading {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tt-product-reviews__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif) !important;
	font-weight: 400 !important;
	font-size: 62px !important;
	line-height: 1.05 !important;
	text-transform: none !important;
	color: #fff !important;
}

.tt-product-reviews__box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 28px;
	background: #000;
}

.tt-product-reviews__summary {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tt-product-reviews__box-label {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 13px;
	letter-spacing: 1.95px;
	text-transform: uppercase;
	color: var(--wp--preset--color--red-bright, #ff4349);
}

/* Stars: base rules in product-hero.css (grey + red fill to the average). */
.tt-product-reviews__stars {
	gap: 4px;
}

.tt-product-reviews__stars svg {
	width: 20px;
	height: 20px;
}

.tt-product-reviews__stars::after {
	mask-size: 24px 20px;
}

.tt-product-reviews__count {
	font-size: 15px;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-product-reviews__write {
	flex-shrink: 0;
	padding: 11px 20px;
	font-weight: 400 !important;
}

/* ---- Testimonial cards ------------------------------------------------------- */
.tt-product-reviews__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.tt-product-reviews .tt-product-reviews__card {
	min-height: 288px;
	margin: 0;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.35s ease;
}

@media (hover: hover) {
	.tt-product-reviews .tt-product-reviews__card:hover {
		transform: translateY(-4px);
	}
}

/* ---- Write a Review panel ---------------------------------------------------- */
.tt-product-reviews__panel.is-collapsible:not(.is-open):not(:target) {
	display: none;
}

.tt-product-reviews__panel {
	padding: 40px;
	background: #000;
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 80px);
}

.tt-product-reviews__panel h2,
.tt-product-reviews__panel h3,
.tt-product-reviews__panel .comment-reply-title {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif) !important;
	font-weight: 400 !important;
	font-size: 28px !important;
	text-transform: none !important;
	color: #fff !important;
}

.tt-product-reviews__review {
	padding: 20px 0;
	border-bottom: 1px solid #3c3c3a;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-product-reviews__panel label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 13px;
	letter-spacing: 1.04px;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-product-reviews__panel input[type="text"],
.tt-product-reviews__panel input[type="email"],
.tt-product-reviews__panel textarea,
.tt-product-reviews__panel select {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: 0;
	background: #fff;
	font-family: var(--wp--preset--font-family--encode-sans, "Encode Sans", sans-serif);
	font-size: 16px;
	color: #000;
}

.tt-product-reviews__panel .stars a {
	color: var(--wp--preset--color--red, #cf2026);
}

.tt-product-reviews__panel input[type="submit"],
.tt-product-reviews__panel .wp-block-button__link {
	padding: 12px 20px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--red, #cf2026);
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 14px;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.tt-product-reviews__panel input[type="submit"]:hover {
	background: #a5181d;
}

/* ---- Mobile --------------------------------------------------------------- */
@media (max-width: 1099px) {
	.tt-product-reviews {
		gap: 28px;
		padding: 56px 0;
	}

	.tt-product-reviews__head {
		display: contents;
	}

	.tt-product-reviews__heading {
		gap: 12px;
		padding-inline: 16px;
	}

	.tt-product-reviews__title {
		font-size: 34px !important;
		line-height: 1.06 !important;
	}

	/* Reviews box moves below the cards on mobile. */
	.tt-product-reviews__box {
		order: 3;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		margin-inline: 16px !important;
		padding: 22px 20px;
	}

	.tt-product-reviews__box-label {
		font-size: 12px;
		letter-spacing: 1.8px;
	}

	.tt-product-reviews__summary {
		gap: 12px;
	}

	.tt-product-reviews__stars svg {
		width: 18px;
		height: 18px;
	}

	.tt-product-reviews__count {
		font-size: 14px;
	}

	.tt-product-reviews__write {
		height: 48px;
		font-size: 15px;
	}

	.tt-product-reviews__cards {
		display: flex;
		order: 2;
		gap: 10px;
		padding-inline: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		scrollbar-width: none;
	}

	.tt-product-reviews__cards::-webkit-scrollbar {
		display: none;
	}

	.tt-product-reviews__cards::after {
		content: "";
		flex: 0 0 6px;
	}

	.tt-product-reviews .tt-product-reviews__card {
		flex: 0 0 84%;
		min-height: 260px;
		scroll-snap-align: start;
	}

	.tt-product-reviews__panel {
		order: 4;
		margin-inline: 16px !important;
		padding: 24px 20px;
	}
}
