/* Product Compare — "Diamond, Field or Duty?" over a parallax photo, three
   model cards (design.md §Product page). The card's model colour arrives as
   --tt-model (tt_model_colors()); the pull-weight fill grows to --tt-w once
   the cards are revealed. #8c8c88 (scale labels) is an export value. */

.tt-product-compare {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 44px;
	margin: 0 !important;
	padding: 80px calc(50px + var(--tt-bleed)) 120px;
	overflow: hidden;
	background: #000;
	color: #fff;
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px);
}

.tt-product-compare > * {
	position: relative;
	margin: 0 !important;
}

.tt-product-compare > .tt-product-compare__bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.tt-product-compare__parallax {
	position: absolute;
	top: -18%;
	right: 0;
	bottom: -18%;
	left: 0;
	background-position: 50% 50%;
	background-size: cover;
	will-change: transform;
}

.tt-product-compare__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 22%, rgba(0, 0, 0, 0.55) 60%, #000 100%);
}

.tt-product-compare__head {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: end;
	gap: 64px;
}

.tt-product-compare__head > *,
.tt-product-compare__heading > * {
	margin: 0 !important;
}

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

/* ---- Cards ------------------------------------------------------------------ */
/* Cards stretch to the tallest; the body grows so every card's price + SHOP
   button sit on one bottom line. */
.tt-product-compare__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 24px;
}

.tt-product-compare__card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin-top: 27px; /* the THIS TRIGGER flag's height, so photos line up */
	background: #1c1c1a;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

.tt-product-compare__card--current {
	margin-top: 0;
}

.tt-product-compare__flag {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 27px;
	padding-left: 0.08em;
	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: 1.12px;
	text-transform: uppercase;
	color: #fff;
}

.tt-product-compare__photo {
	position: relative;
	height: 300px;
	overflow: hidden;
	background: #fff;
}

.tt-product-compare__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: 50% 25%;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tt-product-compare__bar {
	display: block;
	height: 6px;
	background: var(--tt-model);
}

/* The shared red hover line sits over the colour bar's bottom 3px. */
.tt-product-compare__card .tt-shop-card__line {
	margin-top: -3px;
	margin-bottom: 0;
}

.tt-product-compare__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 28px;
	padding: 32px clamp(22px, 1.85vw, 32px) 34px;
}

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

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

.tt-product-compare__tag {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--wp--preset--color--grey-light, #adadad);
}

/* Pull weight: label + value, a 0–5 lb track with the model's range filled. */
.tt-product-compare__pull {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tt-product-compare__pull-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.tt-product-compare__label {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 13px;
	letter-spacing: 1.56px;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-product-compare__pull-value {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 20px;
	color: #fff;
}

.tt-product-compare__track {
	position: relative;
	display: block;
	height: 12px;
	background: #30302e;
}

.tt-product-compare__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--tt-w);
	background: var(--tt-model);
}

.tt-reveal-ready .tt-product-compare__fill {
	width: 0;
	transition: width 1.1s cubic-bezier(0.33, 1, 0.68, 1) calc(0.4s + var(--tt-i) * 0.15s);
}

.tt-reveal-ready .tt-product-compare__cards.is-in .tt-product-compare__fill {
	width: var(--tt-w);
}

.tt-product-compare__card {
	--tt-i: 0;
}

.tt-product-compare__scale {
	display: flex;
	justify-content: space-between;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 12px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #8c8c88;
}

.tt-product-compare__rows {
	display: flex;
	flex-direction: column;
	margin: 0;
	box-shadow: inset 0 1px 0 #3c3c3a;
}

.tt-product-compare__rows > div {
	display: grid;
	grid-template-columns: clamp(96px, 6.94vw, 120px) minmax(0, 1fr);
	gap: 16px;
	padding: 14px 0;
	box-shadow: inset 0 -1px 0 #3c3c3a;
}

.tt-product-compare__rows dt {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 13px;
	line-height: 1.6;
	letter-spacing: 1.04px;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-product-compare__rows dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #fff;
}

.tt-product-compare__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-top: auto;
}

.tt-product-compare__price,
.tt-product-compare__cta {
	white-space: nowrap;
}

.tt-product-compare__price {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 18px;
	color: #fff;
}

.tt-product-compare__cta {
	padding: 11px 20px;
	font-weight: 400 !important;
}

.tt-product-compare__note {
	font-size: 14px;
	line-height: 1.6;
	font-style: italic;
	color: var(--wp--preset--color--grey-light, #adadad);
}

/* Cards stagger in (0.12s apart). */
.tt-reveal-ready .tt-product-compare__cards .tt-product-compare__card {
	opacity: 0;
	transform: translateY(32px);
	transition:
		opacity 0.7s ease calc(var(--tt-i) * 0.12s),
		transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--tt-i) * 0.12s),
		box-shadow 0.35s ease;
}

.tt-reveal-ready .tt-product-compare__cards.is-in .tt-product-compare__card {
	opacity: 1;
	transform: none;
}

@media (hover: hover) {
	.tt-product-compare .tt-product-compare__cards .tt-product-compare__card:hover {
		transform: translateY(-4px);
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
		transition-delay: 0s;
	}

	.tt-product-compare__card:hover .tt-product-compare__photo img {
		transform: scale(1.05);
	}

	.tt-product-compare__card:hover .tt-shop-card__line {
		transform: scaleX(1);
	}
}

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

	.tt-product-compare__parallax {
		top: 0;
		bottom: 0;
		background-position: 60% 50%;
	}

	.tt-product-compare__bg::after {
		background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 20%, rgba(0, 0, 0, 0.6) 65%, #000 100%);
	}

	.tt-product-compare__head {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		padding-inline: 16px;
	}

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

	/* A snap row of 84%-wide cards. */
	.tt-product-compare__cards {
		display: flex;
		align-items: stretch;
		gap: 12px;
		padding-inline: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		scrollbar-width: none;
	}

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

	.tt-product-compare__cards::after {
		content: "";
		flex: 0 0 4px;
	}

	.tt-product-compare__card {
		flex: 0 0 84%;
		scroll-snap-align: start;
	}

	.tt-product-compare__flag {
		font-size: 13px;
	}

	.tt-product-compare__photo {
		height: 220px;
	}

	.tt-product-compare__body {
		gap: 20px;
		padding: 22px 20px 24px;
	}

	.tt-product-compare__name {
		font-size: 30px !important;
	}

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

	.tt-product-compare__pull {
		gap: 10px;
	}

	.tt-product-compare__label {
		font-size: 11px;
		letter-spacing: 1.32px;
	}

	.tt-product-compare__pull-value {
		font-size: 17px;
	}

	.tt-product-compare__track {
		height: 10px;
	}

	.tt-product-compare__scale {
		font-size: 11px;
		letter-spacing: 0;
	}

	.tt-product-compare__rows > div {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 12px;
		padding: 12px 0;
	}

	.tt-product-compare__rows dt {
		font-size: 11px;
		line-height: 1.7;
		letter-spacing: 0.88px;
	}

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

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

	.tt-product-compare__price {
		font-size: 16px;
	}

	.tt-product-compare__cta {
		height: 44px;
		padding: 0 16px;
		font-size: 13px;
	}

	.tt-product-compare__note {
		padding-inline: 16px;
		font-size: 13px;
	}

	.tt-reveal-ready .tt-product-compare__cards .tt-product-compare__card {
		transform: translateY(28px);
	}

	.tt-product-compare__card:active .tt-shop-card__line {
		transform: scaleX(1);
	}
}
