/*
 * Collections index (inc/collections.php). Figma 2148:34124 (largest families), 2148:34167 (index).
 * Figma draws desktop only; on phones the cards stack and the index is one column.
 * Selectors carry .tmx so the kit's site-wide h2, a and p styles do not win.
 */

.tmx {
	color: var(--ink, #171719);
}
.tmx *,
.tmx *::before,
.tmx *::after {
	box-sizing: border-box;
}
.tmx ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
body .tmx a {
	color: inherit;
	text-decoration: none;
}
.tmx .tmx-noimg {
	display: block;
	background: var(--warm, #F6F3EF);
}

/* Section head: eyebrow, then heading and a short aside on one row */
.tmx .tmx-head {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.tmx .tmx-eyebrow {
	margin: 0;
	color: var(--tan, #6F6556);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}
.tmx .tmx-head-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 48px;
}
.tmx .tmx-head-row h2 {
	margin: 0;
	color: var(--ink, #171719);
	font-family: "SF Pro Display", "SF Pro Text", sans-serif;
	font-weight: 600;
}
.tmx .tmx-head-row p {
	flex: none;
	width: 360px;
	margin: 0;
	color: var(--body, #656569);
	font-size: 15px;
	line-height: 1.6;
}

/* The largest families */
.tmx .tmx-families {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 88px 80px 72px;
}
.tmx .tmx-families h2 {
	font-size: 52px;
	line-height: 1.08;
	letter-spacing: -1.6px;
}
.tmx .tmx-families .tmx-head-row p {
	width: 330px;
}
.tmx .tmx-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.tmx .tmx-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.tmx .tmx-card-img {
	display: block;
	width: 100%;
	height: 318px;
	object-fit: cover;
	margin-bottom: 24px;
}
.tmx .tmx-card-name {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 10px;
	font-family: "SF Pro Display", "SF Pro Text", sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -.4px;
}
.tmx .tmx-count {
	flex: none;
	color: var(--muted, #96969A);
	font-family: "SF Pro Text", sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
}
.tmx .tmx-card-text {
	color: var(--body, #656569);
	font-size: 15px;
	line-height: 1.6;
}
.tmx .tmx-card-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 14px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}
.tmx .tmx-card-link .tmx-arrow {
	width: 18px;
	height: 18px;
	color: var(--ink, #171719);
}

/* Every collection */
.tmx .tmx-index {
	background: var(--surface, #FBFBFA);
}
.tmx .tmx-index-in {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 88px 80px;
}
.tmx .tmx-index h2 {
	font-size: 40px;
	line-height: 1.18;
	letter-spacing: -1px;
}
.tmx .tmx-rows {
	column-count: 2;
	column-gap: 80px;
}
.tmx .tmx-rows li {
	break-inside: avoid;
	margin-bottom: -1px; /* top and bottom hairlines overlap, so each column also closes with one */
	border-top: 1px solid var(--line, #E4E4E7);
	border-bottom: 1px solid var(--line, #E4E4E7);
}
.tmx .tmx-rows a {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 14px 0;
}
.tmx .tmx-thumb {
	flex: none;
	width: 60px;
	height: 45px;
	object-fit: cover;
}
.tmx .tmx-row-name {
	flex: 1;
	min-width: 0;
	font-size: 18px;
	line-height: 1.5;
}
.tmx .tmx-rows .tmx-arrow {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--muted, #96969A);
	transition: transform var(--m-dur-s, 200ms) var(--m-ease-std, ease), color var(--m-dur-s, 200ms);
}
@media (hover: hover) {
	.tmx .tmx-rows a:hover .tmx-row-name {
		text-decoration: underline;
		text-underline-offset: 4px;
	}
	.tmx .tmx-rows a:hover .tmx-arrow {
		color: var(--ink, #171719);
		transform: translateX(4px);
	}
}

@media (max-width: 1024px) {
	.tmx .tmx-families,
	.tmx .tmx-index-in {
		padding: 64px 20px;
		gap: 32px;
	}
	.tmx .tmx-head-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.tmx .tmx-head-row p,
	.tmx .tmx-families .tmx-head-row p {
		width: auto;
		max-width: 560px;
	}
	.tmx .tmx-families h2 {
		font-size: 40px;
		letter-spacing: -1px;
	}
	.tmx .tmx-index h2 {
		font-size: 32px;
	}
	.tmx .tmx-rows {
		column-gap: 40px;
	}
	.tmx .tmx-card-img {
		height: 240px;
	}
}

@media (max-width: 767px) {
	.tmx .tmx-families,
	.tmx .tmx-index-in {
		padding: 48px 20px;
		gap: 28px;
	}
	.tmx .tmx-families h2 {
		font-size: 28px;
		line-height: 1.2;
		letter-spacing: -.6px;
	}
	.tmx .tmx-index h2 {
		font-size: 28px;
		line-height: 1.2;
		letter-spacing: -.5px;
	}
	/* Figma 4054:7633: the families swipe sideways, 292px cards, dots under them. */
	.tmx .tmx-cards {
		display: flex;
		gap: 16px;
		margin-inline: -20px;
		padding-inline: 20px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 20px;
		scrollbar-width: none;
	}
	.tmx .tmx-cards::-webkit-scrollbar {
		display: none;
	}
	.tmx .tmx-cards > li {
		flex: 0 0 292px;
		scroll-snap-align: start;
	}
	.tmx .tmx-cards + .carousel-dots {
		margin-top: -8px;
	}
	.tmx .tmx-card-img {
		height: 210px;
		aspect-ratio: auto;
		margin-bottom: 16px;
	}
	.tmx .tmx-card-name {
		font-size: 20px;
	}
	.tmx .tmx-rows {
		column-count: 1;
	}
	.tmx .tmx-rows a {
		gap: 14px;
		padding: 12px 0;
	}
	.tmx .tmx-rows a {
		padding: 15px 0;
	}
	/* The mobile index is names only. */
	.tmx .tmx-thumb {
		display: none;
	}
	.tmx .tmx-row-name {
		font-size: 17px;
	}
}
