/* Shop Catalog — sticky category tabs + one section per category.
   Values from the Claude Design export (design.md §Shop page).

   Each section's cards are WooCommerce's own [products] loop, so the card
   selectors below target WC's classic loop markup (div.woocommerce >
   ul.products > li.product) plus the tt-shop-card__ hooks from functions.php.
   WC's stylesheet floats and sizes those li's and styles a.button, hence the
   !important overrides (system.md §7, §12). */

.tt-shop-catalog {
	padding-top: 30px;
	background: #000;
	color: #fff;
}

.tt-shop-catalog > * {
	margin-block: 0 !important;
}

/* ---- Sticky tabs ---------------------------------------------------------- */
.tt-shop-catalog__tabs {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	height: 64px;
	padding-inline: calc(50px + var(--tt-bleed));
	border-bottom: 1px solid #282826;
	background: rgba(0, 0, 0, 0.94);
}

.tt-shop-catalog__tab-list {
	display: flex;
	gap: 36px;
	height: 100%;
}

.tt-shop-catalog__tab {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 14px;
	letter-spacing: 0.7px;
	white-space: nowrap;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--grey-light, #adadad);
	transition: color 0.2s ease;
}

.tt-shop-catalog__tab::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 2px;
	background: var(--wp--preset--color--red, #cf2026);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.tt-shop-catalog__tab:hover,
.tt-shop-catalog__tab--active {
	color: #fff;
}

.tt-shop-catalog__tab:hover::after,
.tt-shop-catalog__tab--active::after {
	transform: scaleX(1);
}

.tt-shop-catalog__total {
	flex-shrink: 0;
	font-family: var(--wp--preset--font-family--encode-sans, "Encode Sans", sans-serif);
	font-size: 14px;
	color: var(--wp--preset--color--grey-light, #adadad);
}

/* ---- Category section ----------------------------------------------------- */
.tt-shop-catalog__category {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"head view"
		"grid grid";
	align-items: end;
	column-gap: 40px;
	row-gap: 40px;
	padding: 90px calc(50px + var(--tt-bleed));
	background: #000;
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px);
}

.tt-shop-catalog__category--alt {
	background: var(--wp--preset--color--ink, #141412);
}

.tt-shop-catalog__head {
	grid-area: head;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tt-shop-catalog__eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif) !important;
	font-size: 16px;
	line-height: 1.45;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--wp--preset--color--red-bright, #ff4349) !important;
}

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

.tt-shop-catalog__desc {
	margin: 0;
	font-family: var(--wp--preset--font-family--encode-sans, "Encode Sans", sans-serif) !important;
	font-size: 16px;
	line-height: 1.6;
	color: var(--wp--preset--color--grey-light, #adadad) !important;
	text-wrap: pretty;
	max-width: 820px; /* copy keeps the export's measure; titles use the full row */
}

.tt-shop-catalog__view {
	grid-area: view;
	flex-shrink: 0;
	padding: 8px 18px;
}

/* Photo tile + three product columns, all one width: the WC wrapper spans
   three of the four tracks and re-divides them with the same gap. */
.tt-shop-catalog__grid {
	grid-area: grid;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

/* ---- Category photo tile ------------------------------------------------- */
.tt-shop-catalog__feature {
	position: relative;
	display: block;
	min-height: 560px;
	overflow: hidden;
	background: var(--wp--preset--color--ink, #141412);
	text-decoration: none;
}

.tt-shop-catalog__feature-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important; /* beats WC's .woocommerce-page img { height: auto } */
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tt-shop-catalog__feature-shade {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.25);
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.85) 100%);
	transition: background-color 0.4s ease;
}

.tt-shop-catalog__feature-caption {
	position: absolute;
	right: 30px;
	bottom: 32px;
	left: 30px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tt-shop-catalog__feature-title {
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 26px;
	line-height: 1.15;
	color: #fff;
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tt-shop-catalog__feature-bar {
	display: block;
	width: 40px;
	height: 3px;
	background: var(--wp--preset--color--red, #cf2026);
	transform-origin: left;
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tt-shop-catalog__feature:hover .tt-shop-catalog__feature-photo {
	transform: scale(1.07);
}

.tt-shop-catalog__feature:hover .tt-shop-catalog__feature-shade {
	background-color: rgba(0, 0, 0, 0.15);
}

.tt-shop-catalog__feature:hover .tt-shop-catalog__feature-title {
	transform: translateY(-6px);
}

.tt-shop-catalog__feature:hover .tt-shop-catalog__feature-bar {
	transform: scaleX(1.8);
}

/* ---- WooCommerce product loop → cards ------------------------------------ */
.tt-shop-catalog__grid > .woocommerce {
	grid-column: span 3;
}

.tt-shop-catalog .woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.tt-shop-catalog .woocommerce ul.products::before,
.tt-shop-catalog .woocommerce ul.products::after {
	display: none !important;
}

.tt-shop-catalog .woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #1c1c1a;
	text-align: left;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

/* Card hover (newer export, `p-card`): the card lifts with a soft shadow and
   a 3px red line draws across under the photo. Hover-capable devices only, so
   a tap doesn't leave a card stuck lifted. */
@media (hover: hover) {
	.tt-shop-catalog .woocommerce ul.products li.product:hover {
		transform: translateY(-4px);
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
	}

	.tt-shop-catalog ul.products li.product:hover .tt-shop-card__line {
		transform: scaleX(1);
	}
}

.tt-shop-catalog ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.tt-shop-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
}

.tt-shop-catalog ul.products li.product .tt-shop-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	object-fit: cover;
	object-position: 50% 0; /* keep the line badge printed in the photo's top-left corner */
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tt-shop-catalog ul.products li.product:hover .tt-shop-card__media img {
	transform: scale(1.05);
}

.tt-shop-card__line {
	position: relative;
	z-index: 1;
	display: block;
	height: 3px;
	margin-bottom: -3px;
	background: var(--wp--preset--color--red, #cf2026);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Top-right: the photo's own line badge (Diamond, Special…) owns the top-left. */
.tt-shop-card__badges {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tt-shop-card__badge {
	padding: 3px 10px;
	border-radius: 0;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif);
	font-size: 12px;
	line-height: 1.45;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #fff;
}

/* Stage grey #878787 and the sash colours are documented off-palette values
   (design.md §Color palette). */
.tt-shop-card__badge--stage {
	background: #878787;
}

.tt-shop-card__badge--sale {
	background: var(--wp--preset--color--red, #cf2026);
}

.tt-shop-card__badge--soldout {
	background: #000;
}

.tt-shop-card__badge--new {
	background: #596b95;
}

.tt-shop-card__badge--factory {
	background: #686857;
}

.tt-shop-catalog ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 22px 22px 0 !important;
	font-family: var(--wp--preset--font-family--base-model, "Base Model", sans-serif) !important;
	font-weight: 400 !important;
	font-size: 22px !important;
	line-height: 1.2 !important;
	text-transform: none !important; /* product names are Title Case, not the global uppercase heading */
	color: #fff !important;
	text-wrap: balance;
}

.tt-shop-card__fits {
	display: block;
	padding: 10px 22px 0;
	font-family: var(--wp--preset--font-family--encode-sans, "Encode Sans", sans-serif);
	font-size: 14px;
	line-height: 1.5;
	color: var(--wp--preset--color--grey-light, #adadad);
}

.tt-shop-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin-top: auto;
	padding: 18px 22px 0;
}

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

.tt-shop-card__now--sale {
	padding: 2px 8px;
	background: var(--wp--preset--color--red, #cf2026);
}

.tt-shop-card__was {
	font-family: var(--wp--preset--font-family--encode-sans, "Encode Sans", sans-serif);
	font-size: 15px;
	color: var(--wp--preset--color--grey, #73736f);
	text-decoration: line-through;
}

/* Stock add-to-cart (or Select options), wearing .tt-btn--outline. */
.tt-shop-catalog ul.products li.product .tt-shop-card__button {
	display: flex !important;
	margin: 18px 22px 24px !important;
	padding: 11px 16px !important;
	border-radius: 0 !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	letter-spacing: 0.7px !important;
	box-shadow: none !important;
}

.tt-shop-catalog ul.products li.product .tt-shop-card__button.added::after {
	content: "\2713" !important;
	margin-left: 8px;
	font-family: inherit !important;
}

/* Sold out: the button stays, dimmed and inert (design). */
.tt-shop-catalog ul.products li.product.outofstock .tt-shop-card__button {
	opacity: 0.45;
	pointer-events: none;
}

/* WC appends a "View cart" link after an AJAX add; the ✓ is the confirmation
   here and the cart lives in the header. */
.tt-shop-catalog ul.products li.product .added_to_cart {
	display: none !important;
}

/* ---- Mobile --------------------------------------------------------------- */
@media (max-width: 767px) {
	.tt-shop-catalog {
		padding-top: 20px;
	}

	.tt-shop-catalog__tabs {
		height: 52px;
		padding-inline: 0;
	}

	.tt-shop-catalog__tab-list {
		gap: 26px;
		width: 100%;
		padding-inline: 16px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.tt-shop-catalog__tab-list::-webkit-scrollbar {
		display: none;
	}

	.tt-shop-catalog__tab-list::after {
		content: "";
		flex: 0 0 1px;
	}

	.tt-shop-catalog__tab {
		flex-shrink: 0;
		font-size: 13px;
	}

	.tt-shop-catalog__tab::after {
		bottom: 0;
	}

	.tt-shop-catalog__total {
		display: none;
	}

	.tt-shop-catalog__category {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"grid"
			"view";
		align-items: start;
		row-gap: 0;
		padding: 44px 0 48px;
		scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 52px);
	}

	.tt-shop-catalog__head {
		gap: 10px;
		margin-bottom: 24px;
		padding-inline: 16px;
	}

	.tt-shop-catalog__eyebrow {
		font-size: 13px;
	}

	.tt-shop-catalog__title {
		font-size: 32px !important;
		line-height: 1.08 !important;
		text-wrap: balance;
	}

	.tt-shop-catalog__desc {
		max-width: none;
		font-size: 15px;
		line-height: 1.55;
	}

	.tt-shop-catalog__view {
		justify-self: start;
		height: 48px;
		margin: 20px 16px 0;
		padding: 0 24px;
		font-size: 17px;
	}

	/* Snap row: product cards first, the category photo tile last. */
	.tt-shop-catalog__grid {
		display: flex;
		gap: 12px;
		padding-inline: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		scrollbar-width: none;
	}

	.tt-shop-catalog__grid::-webkit-scrollbar {
		display: none;
	}

	.tt-shop-catalog__grid::after {
		content: "";
		flex: 0 0 4px;
		order: 100;
	}

	.tt-shop-catalog__grid > .woocommerce,
	.tt-shop-catalog .woocommerce ul.products {
		display: contents;
	}

	.tt-shop-catalog .woocommerce ul.products li.product {
		flex: 0 0 min(78%, 340px);
		scroll-snap-align: start;
	}

	.tt-shop-catalog__feature {
		flex: 0 0 min(78%, 340px);
		order: 99;
		min-height: 420px;
		scroll-snap-align: start;
	}

	.tt-shop-catalog__feature-shade {
		background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.88) 100%);
	}

	.tt-shop-catalog__feature-caption {
		right: 20px;
		bottom: 24px;
		left: 20px;
		gap: 12px;
	}

	.tt-shop-catalog__feature-title {
		font-size: 22px;
	}

	.tt-shop-card__badges {
		top: 12px;
		right: 12px;
		gap: 6px;
	}

	.tt-shop-card__badge {
		padding: 3px 8px;
		font-size: 11px;
	}

	.tt-shop-catalog ul.products li.product .woocommerce-loop-product__title {
		padding: 16px 16px 0 !important;
		font-size: 18px !important;
	}

	.tt-shop-card__fits {
		padding: 8px 16px 0;
		font-size: 13px;
	}

	.tt-shop-card__price {
		gap: 8px;
		padding: 14px 16px 0;
	}

	.tt-shop-card__now {
		font-size: 17px;
	}

	.tt-shop-card__was {
		font-size: 14px;
	}

	.tt-shop-catalog ul.products li.product .tt-shop-card__button {
		align-items: center;
		height: 46px;
		margin: 14px 16px 18px !important;
		padding: 0 16px !important;
		font-size: 17px !important;
	}
}

/* Touch: the export swaps hover for a press-and-hold zoom. */
@media (hover: none) {
	.tt-shop-catalog__feature:active .tt-shop-catalog__feature-photo {
		transform: scale(1.06);
	}
}
