/*
 * Shop (WooCommerce) styles: fit the shop, cart and checkout to the dark theme.
 * Only loaded when WooCommerce is active.
 */

/* ---------- Form fields ---------- */

/* Dark fields with white text, so they read on the dark background. */
.woocommerce select,
.woocommerce .quantity .qty,
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-blocks-components-select__select,
.wc-block-components-combobox .components-combobox-control input.components-combobox-control__input,
.wc-block-components-quantity-selector {
	background-color: var(--wp--preset--color--muted) !important;
	color: var(--wp--preset--color--white) !important;
	border: 1px solid #3a3d42 !important;
	border-radius: 0 !important;
}

.woocommerce select {
	font-family: inherit;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
}

.woocommerce select option {
	background-color: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--white);
}

.woocommerce .quantity .qty {
	min-height: 3rem;
}

.woocommerce select:focus,
.woocommerce .quantity .qty:focus,
.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus,
.wc-blocks-components-select__select:focus,
.wc-block-components-combobox .components-combobox-control input.components-combobox-control__input:focus {
	border-color: var(--wp--preset--color--bull-red) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--bull-red) !important;
	outline: none;
}

/* Field labels and the select arrows. */
.wc-block-components-text-input label,
.wc-block-components-combobox .components-combobox-control label,
.wc-blocks-components-select__label,
.wc-blocks-components-select__expand {
	color: #a8acb3 !important;
	fill: #a8acb3 !important;
}

/* Autocomplete suggestions under the country/county fields. */
.wc-block-components-combobox .components-form-token-field__suggestions-list {
	background-color: var(--wp--preset--color--muted) !important;
	color: var(--wp--preset--color--white);
}

/* ---------- Shop and product pages ---------- */

/* Product names in the grid, in the same type as the menu. */
.wc-block-grid__product-title,
.wp-block-post-title.has-text-align-center a,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}

/* Product page: a light zoom icon, so it shows on dark product photos. */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	background-color: var(--wp--preset--color--white);
	border-radius: 0;
}

/* Product page tabs: red underline on the open tab. */
.wp-block-woocommerce-product-details .wc-tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--white);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--bull-red);
}

/* ---------- Cart and checkout ---------- */

/* Boxes and dividers in grey rather than near-black. */
.wc-block-components-sidebar-layout .wc-block-components-totals-wrapper,
.wc-block-components-sidebar-layout .wc-block-components-panel,
.wc-block-checkout__sidebar,
.wc-block-cart-items td,
.wc-block-cart-items th {
	border-color: #2d3035 !important;
}

/* "Place Order" button, in the theme's type. */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 1.1rem !important;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 0 !important;
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	background-color: var(--wp--preset--color--muted);
	border-color: #3a3d42;
}

.wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--wp--preset--color--white);
}

/* ---------- Header cart ---------- */

.trb-header-actions {
	gap: 0.75rem;
}

.trb-mini-cart .wc-block-mini-cart__button:hover {
	opacity: 0.8;
}

/* ---------- Product cards (home page and shop) ---------- */

/* Home page merch band: a red glow behind it, so it stands apart from News. */
.trb-section.trb-merch {
	background:
		radial-gradient(ellipse 70% 60% at 85% 0%, rgba(200, 16, 46, 0.18), transparent 70%),
		#101113;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	scroll-margin-top: 160px; /* So /#merch links land below the sticky header. */
}

.trb-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.trb-product-card {
	display: flex;
	flex-direction: column;
	background: #15171a;
	border: 1px solid rgba(255, 255, 255, 0.06);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	transition: border-color 0.2s, transform 0.2s;
}

.trb-product-card:hover,
.trb-product-card:focus-visible {
	border-color: var(--wp--preset--color--bull-red);
	transform: translateY(-3px);
	color: var(--wp--preset--color--white);
}

.trb-product-thumb {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f2f2f2;
}

.trb-product-thumb > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.trb-product-card:hover .trb-product-thumb > img {
	transform: scale(1.04);
}

.trb-product-badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: var(--wp--preset--color--bull-red);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
}

.trb-product-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.1rem 1.2rem;
}

.trb-product-title {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	line-height: 1.25;
	text-transform: uppercase;
}

.trb-product-price {
	color: #c9ccd1;
	font-weight: 600;
}

.trb-product-price del {
	opacity: 0.6;
	margin-right: 0.35rem;
}

.trb-product-price ins {
	text-decoration: none;
	color: var(--wp--preset--color--white);
}

.trb-shop-archive .trb-news-filter {
	margin-bottom: 2rem;
}

@media (max-width: 1000px) {
	.trb-product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.trb-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}

	.trb-product-body {
		padding: 0.75rem 0.8rem 0.9rem;
	}

	.trb-product-title {
		font-size: 0.95rem;
	}
}

/* ---------- Product page ---------- */

/* Breadcrumb: small and grey, in the same type as the eyebrows. */
.trb-breadcrumbs {
	color: #8a8f97;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 2rem;
}

.trb-breadcrumbs a {
	color: #c9ccd1;
	text-decoration: none;
}

.trb-breadcrumbs a:hover,
.trb-breadcrumbs a:focus-visible {
	color: var(--wp--preset--color--bull-red);
}

/* Shop pages: breadcrumb and heading start a little nearer the menu than other sections. */
.trb-section.trb-product-page {
	padding-top: clamp(2rem, 4vw, 3rem);
}

.trb-product-main {
	gap: clamp(2rem, 5vw, 4rem);
}

.trb-product-summary > * + * {
	margin-top: 1.25rem;
}

/* The product's category as the red eyebrow over the name. */
.trb-product-cat a {
	color: inherit;
	text-decoration: none;
}

.trb-product-cat .wp-block-post-terms__separator {
	opacity: 0.6;
}

.trb-product-page .trb-section-title {
	margin-top: 0.25rem;
}

.trb-product-page-price {
	font-size: 1.6rem !important;
	font-weight: 700;
}

.trb-product-page-price del {
	opacity: 0.55;
	font-weight: 500;
	margin-right: 0.5rem;
}

.trb-product-page-price ins {
	text-decoration: none;
}

.trb-product-excerpt {
	color: #c9ccd1;
}

/* Size/colour pickers and quantity in a row, with a full-width add to cart button. */
.trb-product-summary form.cart .variations {
	margin-bottom: 1rem;
}

.trb-product-summary form.cart .variations th.label {
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding-right: 1rem;
}

.trb-product-summary form.cart .reset_variations {
	color: #8a8f97;
	font-size: 0.85rem;
	margin-left: 0.75rem;
}

.trb-product-summary .single_add_to_cart_button {
	font-family: var(--wp--preset--font-family--oswald) !important;
	font-weight: 500 !important;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 0 !important;
	min-height: 3rem;
	padding-inline: 2rem !important;
}

/* Description tabs: a rule under the row, white links, no underline. */
.trb-product-details {
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.trb-product-details .wc-tabs {
	border-bottom: 1px solid #2d3035;
}

.trb-product-details .wc-tabs li a {
	color: #8a8f97;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* The tab already names the section, so hide the repeated "Description" heading. */
.trb-product-details .woocommerce-Tabs-panel > h2:first-child {
	display: none;
}

.trb-product-details .woocommerce-Tabs-panel {
	color: #c9ccd1;
	max-width: 760px;
}

/* "You might also like" sits right under the product, so no red glow. */
.trb-section.trb-related {
	background: #121316;
}

/* WooCommerce draws a side border on the open tab on small screens; keep just the red underline. */
.trb-product-details .wc-tabs li {
	border: 0 !important;
}

.trb-product-summary .stock.out-of-stock {
	color: var(--wp--preset--color--bull-red);
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ---------- Shop bar (above the header on shop pages) ---------- */

.trb-shop-bar {
	background: linear-gradient(100deg, #c8203a 0%, #a8172b 60%, #95142a 100%);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding-inline: var(--wp--style--root--padding-left, 1.5rem);
}

.trb-shop-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1200px;
	margin-inline: auto;
	min-height: 2.5rem;
}

.trb-shop-bar-right {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	margin-left: auto;
}

.trb-shop-bar-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--white);
	text-decoration: none;
	padding-block: 0.6rem;
}

.trb-shop-bar-link:hover,
.trb-shop-bar-link:focus-visible {
	color: var(--wp--preset--color--white);
	opacity: 0.8;
}

.trb-shop-bar-link svg {
	flex: none;
}

.trb-shop-bar-basket .amount {
	font-weight: inherit;
}

.trb-shop-bar-short {
	display: none;
}

/* The bar sits on top, so the header loses its red top border there. */
.trb-shop-bar + .trb-header {
	border-top-width: 0 !important;
}

/* Phones: icons for contact and account, "2 - £50.00 GBP" for the basket. */
@media (max-width: 600px) {
	.trb-shop-bar-right {
		gap: 1.25rem;
	}

	.trb-shop-bar-label,
	.trb-shop-bar-long {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.trb-shop-bar-short {
		display: inline;
	}
}

/* ---------- Option buttons (sizes) on product pages ---------- */

/* Label above the options rather than beside them. */
.trb-product-summary form.cart table.variations,
.trb-product-summary form.cart table.variations tbody,
.trb-product-summary form.cart table.variations tr,
.trb-product-summary form.cart table.variations th,
.trb-product-summary form.cart table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
}

.trb-product-summary form.cart table.variations tr + tr {
	margin-top: 1.5rem;
}

.trb-product-summary form.cart table.variations th.label,
.trb-product-summary .quantity::before {
	display: block;
	color: #a8acb3;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
	padding: 0;
}

/* The dropdown stays for WooCommerce, but out of sight. */
.trb-product-summary select.trb-option-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
	clip-path: inset(50%);
	opacity: 0;
	pointer-events: none;
}

.trb-option-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.trb-option-button {
	min-width: 4.5rem;
	min-height: 3rem;
	padding: 0.5rem 1.25rem;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 0;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.trb-option-button:hover,
.trb-option-button:focus-visible {
	border-color: var(--wp--preset--color--white);
	background: rgba(255, 255, 255, 0.08);
}

.trb-option-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--bull-red);
	outline-offset: 2px;
}

/* Chosen: solid white, like the black-filled box on a light page. */
.trb-option-button.is-selected,
.trb-option-button.is-selected:hover {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: #0b0c0e;
}

/* Out of stock, or doesn't come in this combination: faded and struck through. */
.trb-option-button.is-sold-out,
.trb-option-button.is-unavailable {
	border-color: rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.4);
	text-decoration: line-through;
}

.trb-option-button.is-unavailable {
	cursor: not-allowed;
}

/* "Clear" link under the options. */
.trb-product-summary form.cart .reset_variations {
	display: inline-block;
	margin: 0.75rem 0 0;
}

/* Quantity: labelled, full width, with add to cart full width under it. */
.trb-product-summary form.cart .variations_button,
.trb-product-summary form.cart:not(.variations_form) {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1rem;
}

.trb-product-summary .quantity {
	float: none !important;
	margin: 0 !important;
}

.trb-product-summary .quantity::before {
	content: "Quantity";
}

.trb-product-summary .quantity .qty {
	width: 100% !important;
	min-height: 3.25rem;
	padding-inline: 1rem;
	text-align: left;
	font-size: 1rem;
	font-weight: 700;
	border: 2px solid rgba(255, 255, 255, 0.85) !important;
}

.trb-product-summary .single_add_to_cart_button {
	float: none !important;
	width: 100%;
	min-height: 3.5rem;
	margin: 0 !important;
	font-size: 1.1rem !important;
}

/* ---------- Sale ---------- */

/* Sale prices in red everywhere, with the old price struck through. */
.trb-product-card.is-on-sale .trb-product-price ins,
.trb-product-page-price ins,
.trb-product-summary .woocommerce-variation-price ins {
	color: var(--wp--preset--color--accent);
}

/* Card badge for sale items: bigger than "Sold out", so it catches the eye. */
.trb-product-badge.is-sale {
	font-size: 0.85rem;
	padding: 0.3rem 0.75rem;
	box-shadow: 0 4px 14px rgba(200, 16, 46, 0.45);
}

.trb-product-card.is-on-sale {
	border-color: rgba(200, 16, 46, 0.45);
}

/* Product page banner above the price. */
.trb-sale-banner {
	display: inline-flex;
	align-items: stretch;
	margin: 0;
	border: 1px solid var(--wp--preset--color--bull-red);
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.trb-sale-banner-tag {
	background: var(--wp--preset--color--bull-red);
	color: var(--wp--preset--color--white);
	padding: 0.35rem 0.8rem;
}

.trb-sale-banner-text {
	color: var(--wp--preset--color--white);
	padding: 0.35rem 0.9rem;
	background: rgba(200, 16, 46, 0.15);
}

/* Shop filter: the Sale tab in red. */
.trb-news-filter a.is-sale {
	border-color: var(--wp--preset--color--bull-red);
	color: var(--wp--preset--color--white);
}

/* The sale banner above replaces WooCommerce's round "Sale!" sticker on the photo. */
.trb-product-page .onsale,
.trb-product-page .wc-block-components-product-sale-badge {
	display: none !important;
}

.trb-product-summary .trb-sale-banner {
	margin-top: 1.25rem;
}

/* Quantity label above the box, not beside it. */
.trb-product-summary .quantity {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
}

.trb-product-summary .quantity .qty {
	box-sizing: border-box;
	padding-inline: 1rem !important;
}

/* A chosen size that's sold out: still filled, with grey struck-through text. */
.trb-option-button.is-selected.is-sold-out {
	color: #6b6f76;
}

/* Option names in capitals, e.g. TEAM RED, to match the size buttons. */
.trb-option-button {
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ---------- Product photos ---------- */

.trb-product-page .woocommerce-product-gallery {
	position: relative;
	container-type: inline-size;
}

/* Main photo on white, as the Printful mockups are shot. */
.trb-product-page .woocommerce-product-gallery .flex-viewport,
.trb-product-page .woocommerce-product-gallery__wrapper {
	background: var(--wp--preset--color--white);
}

/* ‹ › arrows either side of the main photo. */
.trb-product-page .flex-direction-nav {
	list-style: none;
	margin: 0;
	padding: 0;
}

.trb-product-page .flex-direction-nav a {
	position: absolute;
	/* Halfway down the main photo. Printful mockups are square, so that's half the gallery's width. */
	top: 50cqw;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 4rem;
	color: #141414;
	font-size: 2.25rem;
	line-height: 1;
	text-decoration: none;
	opacity: 0.75;
	transition: opacity 0.15s;
}

.trb-product-page .flex-direction-nav a:hover,
.trb-product-page .flex-direction-nav a:focus-visible {
	opacity: 1;
}

.trb-product-page .flex-direction-nav .flex-prev {
	left: 0;
}

.trb-product-page .flex-direction-nav .flex-next {
	right: 0;
}

/* No arrow at the first or last photo. */
.trb-product-page .flex-direction-nav .flex-disabled {
	opacity: 0 !important;
	pointer-events: none;
}

/* Thumbnails in a row underneath, the one showing outlined. */
.trb-product-page .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.trb-product-page .woocommerce-product-gallery .flex-control-thumbs li {
	width: calc((100% - 3 * 0.75rem) / 4) !important;
	max-width: 7.5rem;
	margin: 0 !important;
	float: none !important;
}

.trb-product-page .woocommerce-product-gallery .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	background: var(--wp--preset--color--white);
	border: 2px solid transparent;
	opacity: 0.85;
	cursor: pointer;
	transition: border-color 0.15s, opacity 0.15s;
}

.trb-product-page .woocommerce-product-gallery .flex-control-thumbs img:hover {
	opacity: 1;
}

.trb-product-page .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--wp--preset--color--white);
	outline: 2px solid var(--wp--preset--color--white);
	outline-offset: 2px;
	opacity: 1;
}

/* WooCommerce's own gallery styles are more specific; these win over them. */
.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs {
	display: flex !important;
	gap: 0.75rem !important;
	margin: 1rem 0 0 !important;
	padding: 0 !important;
}

.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs li {
	flex: 0 0 calc((100% - 3 * 0.75rem) / 4);
	padding: 0 !important;
	box-sizing: border-box;
}

.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs img {
	box-sizing: border-box;
}

/* Arrows: a dark ‹ › on a small white circle, visible on any photo. */
.trb-product-page .woocommerce-product-gallery .flex-direction-nav a {
	width: 2.75rem !important;
	height: 2.75rem !important;
	margin: 0 0.75rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	color: #141414 !important;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 1.75rem !important;
	font-weight: 700;
	line-height: 1 !important;
	padding-bottom: 0.2rem;
	box-sizing: border-box;
	overflow: hidden;
}

/* Draw the arrow itself as a chevron, so it's the same size whatever the font. */
.trb-product-page .woocommerce-product-gallery .flex-direction-nav a {
	font-size: 0 !important;
	padding: 0;
}

.trb-product-page .woocommerce-product-gallery .flex-direction-nav a::before {
	content: "";
	width: 0.6rem;
	height: 0.6rem;
	border-top: 2.5px solid currentColor;
	border-right: 2.5px solid currentColor;
}

.trb-product-page .woocommerce-product-gallery .flex-direction-nav .flex-next::before {
	transform: translateX(-2px) rotate(45deg);
}

.trb-product-page .woocommerce-product-gallery .flex-direction-nav .flex-prev::before {
	transform: translateX(2px) rotate(-135deg);
}

/* ---------- Photo backgrounds ----------
 * Printful mockups are on white. Each photo sits on a light grey panel and is
 * blended into it (multiply), so the white turns grey and the garment stays
 * the same. It only works with a light panel: on a dark one the clothes would
 * go dark too. For a dark background, use mockups with a transparent background.
 */
:root {
	--trb-photo-panel: #e4e4e6;
}

/* Main photo and zoom. */
.trb-product-page .woocommerce-product-gallery .flex-viewport,
.trb-product-page .woocommerce-product-gallery__wrapper,
.trb-product-page .woocommerce-product-gallery__image {
	background: var(--trb-photo-panel) !important;
}

.trb-product-page .woocommerce-product-gallery__image img,
.trb-product-page .woocommerce-product-gallery__image .zoomImg {
	background: transparent !important;
	mix-blend-mode: multiply;
}

/* Thumbnails: the panel goes on the list item, as the photo blends with what's behind it. */
.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs li {
	background: var(--trb-photo-panel);
}

.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs img {
	background: transparent;
	mix-blend-mode: multiply;
	opacity: 1;
}

/* The outline on the chosen thumbnail sits outside the photo, so it isn't blended. */
.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs li:has(img.flex-active) {
	outline: 2px solid var(--wp--preset--color--white);
	outline-offset: 3px;
}

.trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs img.flex-active {
	outline: 0;
}

/* Shop and home page cards. */
.trb-product-thumb {
	background: var(--trb-photo-panel);
}

.trb-product-thumb > img {
	mix-blend-mode: multiply;
}

/* Hover zoom: WooCommerce lays a bigger copy of the photo over the original.
 * Both are blended into the panel (see above), so the original would show
 * through the zoomed copy and the photo would look doubled. Hide it while
 * zooming. Only where zoom exists, as small photos don't get it. */
.trb-product-page .woocommerce-product-gallery__image:has(.zoomImg):hover img:not(.zoomImg) {
	opacity: 0;
}

/* ---------- Photo thumbnails: one sideways-scrolling row ---------- */

.trb-product-page .trb-thumbs {
	position: relative;
	margin-top: 1rem;
}

.trb-product-page .woocommerce-product-gallery .trb-thumbs ol.flex-control-thumbs {
	flex-wrap: nowrap !important;
	margin: 0 !important;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.trb-product-page .trb-thumbs ol.flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

.trb-product-page .woocommerce-product-gallery .trb-thumbs ol.flex-control-thumbs li {
	position: relative;
	scroll-snap-align: start;
}

/* The chosen thumbnail: outline drawn inside its edge, so the row doesn't clip it. */
.trb-product-page .woocommerce-product-gallery .trb-thumbs ol.flex-control-thumbs li:has(img.flex-active) {
	outline: 0 !important;
}

.trb-product-page .woocommerce-product-gallery .trb-thumbs ol.flex-control-thumbs li:has(img.flex-active)::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 2px solid var(--wp--preset--color--white);
	pointer-events: none;
}

body.trb-light .trb-product-page .woocommerce-product-gallery .trb-thumbs ol.flex-control-thumbs li:has(img.flex-active)::after {
	border-color: #141414;
}

/* ‹ › over the ends of the row. */
.trb-thumbs-button {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	color: #141414;
	cursor: pointer;
	transform: translateY(-50%);
}

.trb-thumbs-button[hidden] {
	display: none;
}

.trb-thumbs-prev {
	left: 0.4rem;
}

.trb-thumbs-next {
	right: 0.4rem;
}

.trb-thumbs-button::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.trb-thumbs-next::before {
	transform: translateX(-1px) rotate(45deg);
}

.trb-thumbs-prev::before {
	transform: translateX(1px) rotate(-135deg);
}

.trb-thumbs-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--bull-red);
	outline-offset: 2px;
}

/* Product page summary under the price: a short intro in smaller text; the
 * full description is in the Description tab below. */
.trb-product-summary .trb-product-excerpt {
	font-size: 0.95rem;
	line-height: 1.6;
}

/* ---------- Product intro: three lines, then "Read more" ---------- */

.trb-product-intro {
	--trb-intro-lines: 3;
	--trb-intro-fade-to: #0b0c0e;
}

body.trb-light .trb-product-intro {
	--trb-intro-fade-to: #ffffff;
}

.trb-product-intro-text {
	position: relative;
	max-height: calc(var(--trb-intro-lines) * 1.6em);
	overflow: hidden;
	font-size: 0.95rem;
	line-height: 1.6;
}

.trb-product-intro-text > :first-child {
	margin-top: 0;
}

.trb-product-intro-text > :last-child {
	margin-bottom: 0;
}

.trb-product-intro-text p {
	margin: 0 0 0.75em;
}

/* Fade the last line out while it's closed, so it's clear there's more. */
.trb-product-intro:not(.is-open):not(.is-short) .trb-product-intro-text::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 1.6em;
	background: linear-gradient(to bottom, transparent, var(--trb-intro-fade-to));
}

.trb-product-intro.is-open .trb-product-intro-text,
.trb-product-intro.is-short .trb-product-intro-text {
	max-height: none;
}

.trb-read-more {
	margin-top: 0.4rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

body.trb-light .trb-read-more {
	color: var(--trb-light-text, #141414);
}

.trb-read-more:hover,
.trb-read-more:focus-visible {
	color: var(--wp--preset--color--bull-red);
}

/* ---------- Shop page: size and colour filters ---------- */

.trb-shop-layout.has-filters {
	display: grid;
	grid-template-columns: 15.5rem minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: start;
}

.trb-shop-layout.has-filters .trb-product-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trb-shop-filters {
	position: sticky;
	top: 1.5rem;
	display: grid;
	gap: 2rem;
	padding: 1.5rem;
	background: #15171a;
}

.trb-shop-filter-title {
	margin: 0 0 1rem !important;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid rgba(255, 255, 255, 0.12);
	font-family: var(--wp--preset--font-family--oswald) !important;
	font-size: 1rem !important;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.trb-shop-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.trb-shop-filter-options a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.5rem;
	padding: 0.35rem 0.8rem;
	border: 2px solid rgba(255, 255, 255, 0.5);
	color: var(--wp--preset--color--white);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.trb-shop-filter-options a:hover,
.trb-shop-filter-options a:focus-visible {
	border-color: var(--wp--preset--color--white);
}

.trb-shop-filter-options a[aria-current="true"] {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: #0b0c0e;
}

/* Colours: a full-width list, scrolling when there are lots. */
.trb-shop-filter-colour .trb-shop-filter-options {
	flex-direction: column;
	flex-wrap: nowrap;
	max-height: 21rem;
	overflow-y: auto;
	padding-right: 0.25rem;
}

.trb-shop-filter-colour .trb-shop-filter-options a {
	flex: none;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	font-size: 0.95rem;
}

.trb-shop-count {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin: 0 0 1rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.trb-shop-count a {
	font-weight: 500;
}

/* "View product" on shop cards: looks like a button; the whole card is the link. */
.trb-product-cta {
	display: block;
	margin-top: 0.75rem;
	padding: 0.65rem 1rem;
	background: var(--wp--preset--color--bull-red);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	transition: background-color 0.15s;
}

.trb-product-card:hover .trb-product-cta,
.trb-product-card:focus-visible .trb-product-cta {
	background: #a50d26;
}

/* The button sits at the bottom of each card, so they line up across a row. */
.trb-product-card .trb-product-body {
	flex: 1;
}

.trb-product-card .trb-product-cta {
	margin-top: auto;
}

.trb-product-body:has(.trb-product-cta) .trb-product-price {
	margin-bottom: 0.75rem;
}

@media (max-width: 1000px) {
	.trb-shop-layout.has-filters {
		grid-template-columns: 13rem minmax(0, 1fr);
	}

	.trb-shop-layout.has-filters .trb-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Phones and small tablets: filters above the products, colours as chips. */
@media (max-width: 781px) {
	.trb-shop-layout.has-filters {
		grid-template-columns: minmax(0, 1fr);
	}

	.trb-shop-filters {
		position: static;
		gap: 1.25rem;
		padding: 1.1rem;
	}

	.trb-shop-filter-colour .trb-shop-filter-options {
		flex-direction: row;
		flex-wrap: wrap;
		max-height: none;
		overflow: visible;
	}
}

/* Size chips: compact, so several fit on a row in the sidebar. */
.trb-shop-filter-size .trb-shop-filter-options {
	gap: 0.4rem;
}

.trb-shop-filter-size .trb-shop-filter-options a {
	min-width: 2.6rem;
	min-height: 2.25rem;
	padding: 0.25rem 0.6rem;
	font-size: 0.8rem;
}

.trb-shop-filter-options a {
	box-sizing: border-box;
}

/* ---------- Shop filters: sidebar on wide screens, dropdowns on phones ---------- */

.trb-shop-filter > summary {
	display: block;
	list-style: none;
	cursor: default;
}

.trb-shop-filter > summary::-webkit-details-marker {
	display: none;
}

/* The current choice only shows in the phone dropdown's heading. */
.trb-shop-filter-current {
	display: none;
}

@media (max-width: 781px) {
	.trb-shop-filters {
		gap: 0.6rem;
		padding: 0;
		background: none !important;
	}

	.trb-shop-filter > summary {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.8rem 1rem;
		border: 2px solid rgba(255, 255, 255, 0.5);
		cursor: pointer;
	}

	.trb-shop-filter > summary .trb-shop-filter-title {
		margin: 0 !important;
		padding: 0;
		border: 0;
		font-size: 0.95rem !important;
	}

	.trb-shop-filter-current {
		display: block;
		margin-left: auto;
		overflow: hidden;
		font-size: 0.9rem;
		font-weight: 600;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Chevron: down when closed, up when open. */
	.trb-shop-filter > summary::after {
		content: "";
		flex: none;
		width: 0.5rem;
		height: 0.5rem;
		margin: 0 0.2rem 0.2rem 0;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 0.15s;
	}

	.trb-shop-filter[open] > summary::after {
		margin-top: 0.3rem;
		margin-bottom: 0;
		transform: rotate(-135deg);
	}

	.trb-shop-filter[open] > .trb-shop-filter-options {
		padding: 0.9rem 0 0.4rem;
	}

	/* Lots of colours: scroll inside the dropdown rather than down the page. */
	.trb-shop-filter-colour[open] > .trb-shop-filter-options {
		max-height: 14rem;
		overflow-y: auto;
	}
}

/* ---------- Product search: drops down under the header ---------- */

.trb-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.trb-search-toggle:hover,
.trb-search-toggle:focus-visible,
.trb-search-toggle[aria-expanded="true"] {
	color: var(--wp--preset--color--bull-red);
}

.trb-searchbar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: 1rem var(--wp--style--root--padding-left, 1.5rem);
	background: #ffffff;
	border-bottom: 1px solid #e3e3e6;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
	color: #141414;
}

.trb-searchbar[hidden] {
	display: none;
}

.trb-searchbar-inner {
	max-width: 1100px;
	margin-inline: auto;
}

/* The pill: red outline, magnifier, text box, close. */
.trb-searchbar-form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.9rem 0.6rem 1.25rem;
	border: 2px solid var(--wp--preset--color--bull-red);
	border-radius: 999px;
	background: #ffffff;
}

.trb-searchbar-icon {
	flex: none;
	color: #5b5f66;
}

.trb-searchbar-input {
	flex: 1;
	min-width: 0;
	padding: 0.25rem 0;
	border: 0 !important;
	background: transparent !important;
	color: #141414 !important;
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 1.05rem;
	outline: none;
	box-shadow: none !important;
}

.trb-searchbar-input::placeholder {
	color: #8a8f97;
}

/* Hide the browser's own clear button; there's a close button already. */
.trb-searchbar-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.trb-searchbar-close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5b5f66;
	cursor: pointer;
}

.trb-searchbar-close:hover,
.trb-searchbar-close:focus-visible {
	background: #f4f4f5;
	color: #141414;
}

/* Results as you type. */
.trb-searchbar-results:not(:empty) {
	max-height: min(60vh, 32rem);
	margin-top: 0.75rem;
	overflow-y: auto;
}

.trb-searchbar-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.trb-searchbar-item {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 0.6rem 0.75rem;
	color: #141414 !important;
	text-decoration: none;
}

.trb-searchbar-item:hover,
.trb-searchbar-item:focus-visible {
	background: #f4f4f5;
}

.trb-searchbar-thumb {
	width: 3.5rem;
	height: 3.5rem;
	background: var(--trb-photo-panel, #e4e4e6);
}

.trb-searchbar-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: multiply;
}

.trb-searchbar-name {
	font-weight: 600;
}

.trb-searchbar-price {
	font-weight: 700;
	white-space: nowrap;
}

.trb-searchbar-price del {
	margin-right: 0.35rem;
	opacity: 0.5;
	font-weight: 500;
}

.trb-searchbar-price ins {
	color: var(--wp--preset--color--bull-red);
	text-decoration: none;
}

.trb-searchbar-all {
	display: block;
	margin-top: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid #e3e3e6;
	color: #141414 !important;
	font-weight: 700;
	text-align: center;
}

.trb-searchbar-empty {
	margin: 0;
	padding: 0.75rem;
	color: #5b5f66;
}

@media (max-width: 600px) {
	.trb-searchbar-item {
		grid-template-columns: 3rem minmax(0, 1fr);
	}

	.trb-searchbar-thumb {
		width: 3rem;
		height: 3rem;
		grid-row: span 2;
	}

	.trb-searchbar-price {
		grid-column: 2;
	}
}
