/*
 * Light mode for the shop pages (shop, categories, products, basket, checkout
 * and account), and the home page while the site is shop-only
 * (patterns/shop-home.php, styled at the end of this file): white between the dark header and footer.
 * Loaded only on light pages (see the_romford_bull_is_light_page()), after
 * shop.css, and overrides its dark styles. Everything is scoped to
 * body.trb-light main, so the header, shop bar and footer stay dark.
 */

body.trb-light {
	--trb-light-bg: #ffffff;
	--trb-light-bg-alt: #f4f4f5;
	--trb-light-text: #141414;
	--trb-light-muted: #5b5f66;
	--trb-light-line: #e3e3e6;
	--trb-light-red: #c8102e;
	--trb-photo-panel: #f4f4f5;
}

/* The basket drawer (header mini-cart) stays dark like the header it opens
   from, so the light rules below get dark-mode colours inside it; otherwise
   its subtotal, prices and quantity boxes come out dark on dark. */
body.trb-light .wc-block-mini-cart__drawer,
body.trb-light .wc-block-components-drawer {
	--trb-light-bg: var(--wp--preset--color--base);
	--trb-light-bg-alt: var(--wp--preset--color--muted);
	--trb-light-text: var(--wp--preset--color--contrast);
	--trb-light-muted: rgba(255, 255, 255, 0.7);
	--trb-light-line: rgba(255, 255, 255, 0.18);
}

/* ---------- Page ---------- */

body.trb-light main,
body.trb-light main .trb-section {
	background: var(--trb-light-bg);
	color: var(--trb-light-text);
}

body.trb-light main a:not(.trb-btn):not(.trb-product-card):not(.wp-element-button):not(.button) {
	color: var(--trb-light-text);
}

body.trb-light main a:not(.trb-btn):not(.trb-product-card):not(.wp-element-button):not(.button):hover {
	color: var(--trb-light-red);
}

body.trb-light main .trb-section .trb-section-title,
body.trb-light main h1,
body.trb-light main h2,
body.trb-light main h3 {
	color: var(--trb-light-text);
}

/* The red eyebrow stays red: it reads well on white too. */
body.trb-light main .trb-eyebrow,
body.trb-light main .trb-product-cat a {
	color: var(--trb-light-red) !important;
}

/* ---------- Breadcrumb ---------- */

body.trb-light .trb-breadcrumbs {
	color: var(--trb-light-muted);
}

body.trb-light .trb-breadcrumbs a {
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-breadcrumbs a:hover {
	color: var(--trb-light-red) !important;
}

/* ---------- Price, sale and stock ---------- */

body.trb-light .trb-product-page-price,
body.trb-light .trb-product-summary .woocommerce-variation-price {
	color: var(--trb-light-text);
}

body.trb-light .trb-product-page-price ins,
body.trb-light .trb-product-summary .woocommerce-variation-price ins,
body.trb-light .trb-product-card.is-on-sale .trb-product-price ins {
	color: var(--trb-light-red);
}

body.trb-light .trb-product-excerpt {
	color: var(--trb-light-muted);
}

body.trb-light .trb-sale-banner-text {
	background: #fdecef;
	color: var(--trb-light-text);
}

body.trb-light .trb-product-summary .stock {
	color: var(--trb-light-muted);
}

body.trb-light .trb-product-summary .stock.out-of-stock {
	color: var(--trb-light-red);
}

/* ---------- Options and quantity ---------- */

body.trb-light .trb-product-summary form.cart table.variations th.label,
body.trb-light .trb-product-summary form.cart table.variations th.label label,
body.trb-light .trb-product-summary .quantity::before {
	color: var(--trb-light-muted);
}

/* Black outline boxes; the chosen one filled black. */
body.trb-light .trb-option-button {
	border-color: var(--trb-light-text);
	color: var(--trb-light-text);
}

body.trb-light .trb-option-button:hover,
body.trb-light .trb-option-button:focus-visible {
	border-color: var(--trb-light-text);
	background: var(--trb-light-bg-alt);
}

body.trb-light .trb-option-button.is-selected,
body.trb-light .trb-option-button.is-selected:hover {
	background: var(--trb-light-text);
	border-color: var(--trb-light-text);
	color: var(--trb-light-bg);
}

body.trb-light .trb-option-button.is-sold-out,
body.trb-light .trb-option-button.is-unavailable {
	border-color: var(--trb-light-line);
	color: #a3a6ab;
}

body.trb-light .trb-option-button.is-selected.is-sold-out {
	background: #a3a6ab;
	border-color: #a3a6ab;
	color: var(--trb-light-bg);
}

body.trb-light .trb-product-summary form.cart .reset_variations {
	color: var(--trb-light-muted) !important;
}

body.trb-light .trb-product-summary .quantity .qty {
	background: var(--trb-light-bg) !important;
	color: var(--trb-light-text) !important;
	border: 2px solid var(--trb-light-text) !important;
}

/* ---------- Description tabs ---------- */

body.trb-light .trb-product-details .wc-tabs {
	border-bottom-color: var(--trb-light-line);
}

body.trb-light .trb-product-details .wc-tabs li a {
	color: var(--trb-light-muted) !important;
}

body.trb-light .trb-product-details .wc-tabs li.active a {
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-product-details .woocommerce-Tabs-panel {
	color: #3a3d42;
}

body.trb-light .trb-product-details table.shop_attributes th,
body.trb-light .trb-product-details table.shop_attributes td {
	color: #3a3d42;
	border-color: var(--trb-light-line);
}

/* ---------- Photos ---------- */

/* The chosen thumbnail outlined in black. */
body.trb-light .trb-product-page .woocommerce-product-gallery ol.flex-control-thumbs li:has(img.flex-active) {
	outline-color: var(--trb-light-text);
}

/* ---------- "You might also like" ---------- */

body.trb-light main .trb-section.trb-related {
	background: var(--trb-light-bg-alt);
	border-top: 1px solid var(--trb-light-line);
}

body.trb-light main .trb-btn-ghost {
	border-color: var(--trb-light-text);
	color: var(--trb-light-text);
}

body.trb-light main .trb-btn-ghost:hover,
body.trb-light main .trb-btn-ghost:focus-visible {
	background: var(--trb-light-text);
	color: var(--trb-light-bg);
}

body.trb-light .trb-product-card {
	background: var(--trb-light-bg);
	border-color: var(--trb-light-line);
	color: var(--trb-light-text);
}

body.trb-light .trb-product-card:hover,
body.trb-light .trb-product-card:focus-visible {
	color: var(--trb-light-text);
	border-color: var(--trb-light-red);
	box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
}

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

body.trb-light .trb-product-price {
	color: #3a3d42;
}

/* Photo panel on cards: a touch darker than the page, so the cards stand out. */
body.trb-light .trb-product-thumb {
	background: #ececee;
}

/* ---------- Notices ("added to your basket") ---------- */

body.trb-light main .wc-block-components-notice-banner {
	box-shadow: none;
}

/* ---------- Shop page: filter tabs and page numbers ---------- */

body.trb-light .trb-news-filter a {
	border-color: var(--trb-light-line);
	color: var(--trb-light-muted) !important;
}

body.trb-light .trb-news-filter a:hover {
	border-color: var(--trb-light-text);
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-news-filter a.is-sale {
	border-color: var(--trb-light-red);
	color: var(--trb-light-red) !important;
}

body.trb-light .trb-news-filter a[aria-current="page"] {
	background: var(--trb-light-red);
	border-color: var(--trb-light-red);
	color: var(--trb-light-bg) !important;
}

body.trb-light .trb-pagination .page-numbers {
	border-color: var(--trb-light-line);
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-pagination .page-numbers.current {
	background: var(--trb-light-red);
	border-color: var(--trb-light-red);
	color: var(--trb-light-bg) !important;
}

body.trb-light .trb-news-empty {
	color: var(--trb-light-muted);
}

/* ---------- Basket, checkout and account: forms ---------- */

/* White fields with dark text and a grey border, replacing the dark ones. */
body.trb-light .woocommerce select,
body.trb-light .wc-block-components-text-input input,
body.trb-light .wc-block-components-textarea,
body.trb-light .wc-blocks-components-select__select,
body.trb-light .wc-block-components-combobox .components-combobox-control input.components-combobox-control__input,
body.trb-light .wc-block-components-quantity-selector,
body.trb-light .woocommerce form .input-text,
body.trb-light .woocommerce form input[type="text"],
body.trb-light .woocommerce form input[type="email"],
body.trb-light .woocommerce form input[type="password"],
body.trb-light .woocommerce form input[type="tel"] {
	background-color: var(--trb-light-bg) !important;
	color: var(--trb-light-text) !important;
	border: 1px solid #c9cbd0 !important;
}

body.trb-light .woocommerce select option,
body.trb-light .wc-block-components-combobox .components-form-token-field__suggestions-list {
	background-color: var(--trb-light-bg) !important;
	color: var(--trb-light-text);
}

body.trb-light .wc-block-components-text-input label,
body.trb-light .wc-block-components-combobox .components-combobox-control label,
body.trb-light .wc-blocks-components-select__label,
body.trb-light .wc-blocks-components-select__expand {
	color: var(--trb-light-muted) !important;
	fill: var(--trb-light-muted) !important;
}

body.trb-light .wc-block-components-quantity-selector input,
body.trb-light .wc-block-components-quantity-selector button {
	color: var(--trb-light-text) !important;
}

body.trb-light .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	background-color: var(--trb-light-bg);
	border-color: #c9cbd0;
}

body.trb-light .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--trb-light-text);
}

/* Lines and boxes in light grey. */
body.trb-light .wc-block-components-sidebar-layout .wc-block-components-totals-wrapper,
body.trb-light .wc-block-components-sidebar-layout .wc-block-components-panel,
body.trb-light .wc-block-checkout__sidebar,
body.trb-light .wc-block-components-order-summary,
body.trb-light .wc-block-cart-items td,
body.trb-light .wc-block-cart-items th,
body.trb-light .wp-block-woocommerce-checkout-order-summary-block {
	border-color: var(--trb-light-line) !important;
}

/* Prices and totals. */
body.trb-light .wc-block-components-product-price,
body.trb-light .wc-block-components-totals-item,
body.trb-light .wc-block-components-formatted-money-amount {
	color: var(--trb-light-text);
}

body.trb-light .wc-block-components-product-metadata,
body.trb-light .wc-block-components-checkout-step__description,
body.trb-light .wc-block-checkout__guest-checkout-notice {
	color: var(--trb-light-muted);
}

/* Payment and delivery option boxes. */
body.trb-light .wc-block-components-radio-control--highlight-checked,
body.trb-light .wc-block-components-radio-control__option {
	border-color: var(--trb-light-line) !important;
}

body.trb-light .wc-block-components-radio-control__input {
	background: var(--trb-light-bg);
	border-color: #c9cbd0;
}

body.trb-light .wc-block-components-radio-control__input:checked::before {
	background: var(--trb-light-text);
}

/* Account pages: the menu down the side. */
body.trb-light .woocommerce-MyAccount-navigation ul {
	border-color: var(--trb-light-line);
}

body.trb-light .woocommerce-MyAccount-navigation li.is-active a {
	color: var(--trb-light-red) !important;
}

/* ---------- Order confirmation ---------- */

.trb-order-confirmation {
	padding-top: clamp(2.5rem, 5vw, 4rem) !important;
}

/* Top: "Thank you for your order, Ross" and what happens next. */
.trb-order-status {
	margin-bottom: clamp(2rem, 4vw, 3rem);
	max-width: 720px;
}

.trb-order-status h1 {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0 0 1rem;
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	font-weight: 700;
	line-height: 1.05;
}

.trb-order-status p {
	margin: 0;
	color: var(--trb-light-muted);
	font-size: 1.1rem;
	line-height: 1.6;
}

.trb-order-status p strong {
	color: var(--trb-light-text);
}

.trb-order-columns {
	gap: clamp(1.5rem, 3vw, 2.5rem) !important;
	align-items: flex-start !important;
}

.trb-order-main > * + *,
.trb-order-side > * + * {
	margin-top: 1.5rem !important;
}

/* Cards: grey outline, small uppercase heading. */
.trb-order-card {
	border: 1px solid var(--trb-light-line);
	padding: 1.5rem;
	margin: 0;
}

body.trb-light .trb-order-card .trb-order-heading {
	margin: 0 0 1rem;
	color: var(--trb-light-muted);
	font-family: var(--wp--preset--font-family--barlow);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Bank transfer details: a highlighted box, since the order waits on them. */
.trb-order-payment:not(:empty) {
	border: 2px solid var(--trb-light-red);
	background: #fdf3f5;
	padding: 1.5rem;
	color: var(--trb-light-text);
}

.trb-order-payment > :first-child {
	margin-top: 0;
}

.trb-order-payment h2,
.trb-order-payment h3 {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
}

.trb-order-payment ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: 0.75rem 1.5rem;
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
}

.trb-order-payment ul li {
	color: var(--trb-light-muted);
	font-size: 0.85rem;
}

.trb-order-payment ul li strong {
	display: block;
	color: var(--trb-light-text);
	font-size: 1rem;
}

/* Items and totals. */
.trb-order-card .wc-block-order-confirmation-totals table {
	width: 100%;
	border: 0 !important;
	border-collapse: collapse;
}

.trb-order-card .wc-block-order-confirmation-totals thead {
	display: none;
}

.trb-order-card .wc-block-order-confirmation-totals th,
.trb-order-card .wc-block-order-confirmation-totals td {
	border: 0 !important;
	border-bottom: 1px solid var(--trb-light-line) !important;
	padding: 0.9rem 0 !important;
	vertical-align: middle;
}

.trb-order-card .wc-block-order-confirmation-totals tfoot th,
.trb-order-card .wc-block-order-confirmation-totals tfoot td {
	color: var(--trb-light-muted);
	font-weight: 500;
	padding: 0.6rem 0 !important;
}

.trb-order-card .wc-block-order-confirmation-totals tfoot tr:last-child th,
.trb-order-card .wc-block-order-confirmation-totals tfoot tr:last-child td {
	border-bottom: 0 !important;
	padding-top: 1rem !important;
	color: var(--trb-light-text);
	font-size: 1.25rem;
	font-weight: 700;
}

.trb-order-card .wc-block-order-confirmation-totals__total,
.trb-order-card .wc-block-order-confirmation-totals tfoot td {
	text-align: right;
}

.trb-order-card .wc-block-order-confirmation-totals__product {
	font-weight: 600;
}

.trb-order-card .wc-block-order-confirmation-totals__product a {
	text-decoration: none;
}

.trb-order-card .wc-block-order-confirmation-totals__product .product-quantity {
	color: var(--trb-light-muted);
	font-weight: 500;
}

.trb-order-card .wc-block-order-confirmation-totals__product .wc-item-meta {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	color: var(--trb-light-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

.trb-order-card .wc-block-order-confirmation-totals__product .wc-item-meta p {
	display: inline;
	margin: 0;
}

.trb-order-item-photo {
	float: left;
	width: 4rem;
	height: 4rem;
	margin-right: 1rem;
	background: var(--trb-photo-panel);
}

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

/* Order number, date, total, email, payment: label over value. */
.trb-order-summary ul {
	display: grid;
	gap: 0.9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.trb-order-summary li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	color: var(--trb-light-text);
	font-weight: 600;
	overflow-wrap: anywhere;
	text-align: right;
}

.trb-order-summary li > span:first-child,
.trb-order-summary li .wc-block-order-confirmation-summary-list-item__key {
	color: var(--trb-light-muted);
	font-weight: 500;
	text-align: left;
}

/* Addresses: no box of their own, the card is the box. */
.trb-order-card address,
.trb-order-card .wc-block-order-confirmation-address {
	border: 0 !important;
	padding: 0 !important;
	color: var(--trb-light-text);
	font-style: normal;
	line-height: 1.6;
}

.trb-order-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem !important;
}

/* Prices on one line. */
.trb-order-card .wc-block-order-confirmation-totals__total,
.trb-order-card .wc-block-order-confirmation-totals tfoot td {
	white-space: nowrap;
	padding-left: 1rem !important;
}

/* Addresses: WooCommerce draws its own box; the card is already the box. */
.trb-order-card .wc-block-order-confirmation-billing-address,
.trb-order-card .wc-block-order-confirmation-shipping-address {
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1.6;
}

.trb-order-card .wc-block-order-confirmation-billing-address p,
.trb-order-card .wc-block-order-confirmation-shipping-address p {
	margin: 0;
}

/* Summary list: smaller, label on the left, value on the right. */
.trb-order-summary li {
	font-size: 0.95rem;
}

.trb-order-summary,
.trb-order-summary ul {
	width: 100%;
	max-width: none !important;
}

/* ---------- Order confirmation: tighter and a size smaller ---------- */

/* WooCommerce puts 48px above and below the summary, and lays its list out in a
 * wrapping row; inside our card it should be a plain list, label left, value right. */
.trb-order-card .wc-block-order-confirmation-summary.trb-order-summary {
	margin: 0 !important;
	padding: 0 !important;
}

.trb-order-card .wc-block-order-confirmation-summary.trb-order-summary ul {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr);
	justify-content: stretch;
	gap: 0.6rem;
}

.trb-order-card .wc-block-order-confirmation-summary.trb-order-summary ul li {
	display: flex !important;
	justify-content: space-between;
	width: 100%;
	font-size: 0.9rem;
}

.trb-order-card .wc-block-order-confirmation-summary.trb-order-summary ul li > .wc-block-order-confirmation-summary-list-item__key {
	font-weight: 500;
	flex: none;
}

.trb-order-card .wc-block-order-confirmation-summary.trb-order-summary ul li > .wc-block-order-confirmation-summary-list-item__value {
	display: inline !important;
}

/* Heading. */
.trb-order-status h1 {
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	margin-bottom: 0.6rem;
}

.trb-order-status p {
	font-size: 1rem;
}

/* Cards. */
.trb-order-card,
.trb-order-payment:not(:empty) {
	padding: 1.25rem;
}

.trb-order-main > * + *,
.trb-order-side > * + * {
	margin-top: 1rem !important;
}

body.trb-light .trb-order-card .trb-order-heading {
	margin-bottom: 0.75rem;
	font-size: 0.75rem;
}

/* Items and totals. */
.trb-order-card .wc-block-order-confirmation-totals__product {
	font-size: 0.95rem;
}

.trb-order-card .wc-block-order-confirmation-totals__total {
	font-size: 0.95rem;
}

.trb-order-card .wc-block-order-confirmation-totals th,
.trb-order-card .wc-block-order-confirmation-totals td {
	padding: 0.7rem 0 !important;
}

.trb-order-card .wc-block-order-confirmation-totals tfoot th,
.trb-order-card .wc-block-order-confirmation-totals tfoot td {
	font-size: 0.9rem;
	padding: 0.45rem 0 !important;
}

.trb-order-card .wc-block-order-confirmation-totals tfoot tr:last-child th,
.trb-order-card .wc-block-order-confirmation-totals tfoot tr:last-child td {
	font-size: 1.1rem;
	padding-top: 0.75rem !important;
}

.trb-order-item-photo {
	width: 3.25rem;
	height: 3.25rem;
	margin-right: 0.85rem;
}

/* Addresses. */
.trb-order-card .wc-block-order-confirmation-billing-address,
.trb-order-card .wc-block-order-confirmation-shipping-address {
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ---------- Order confirmation: delivery and billing in one card ---------- */

/* No card at all when WooCommerce doesn't show either address. */
.trb-order-addresses:not(:has(> *)) {
	display: none;
}

.trb-order-addresses > * {
	margin: 0 !important;
}

/* Billing under delivery, after a thin line. */
.trb-order-addresses > * + * {
	margin-top: 1rem !important;
	padding-top: 1rem;
	border-top: 1px solid var(--trb-light-line);
}

.trb-order-billing-same {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	color: var(--trb-light-text);
	font-size: 0.9rem;
	font-weight: 600;
}

.trb-order-billing-same span,
.trb-order-billing-details summary {
	color: var(--trb-light-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.trb-order-billing-same span {
	align-self: center;
}

.trb-order-billing-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	list-style: none;
}

.trb-order-billing-details summary::-webkit-details-marker {
	display: none;
}

/* Chevron: points down when closed, up when open. */
.trb-order-billing-details summary::after {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	margin-right: 0.2rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.15s;
}

.trb-order-billing-details[open] summary::after {
	transform: rotate(-135deg) translateY(-2px);
}

.trb-order-billing-details summary:hover {
	color: var(--trb-light-text);
}

.trb-order-billing-details[open] summary {
	margin-bottom: 0.75rem;
}

/* No gap left behind when there's no message under the heading. */
.trb-order-status p:empty {
	display: none;
}

/* "Large / Black" under the item name. */
.trb-order-item-options {
	display: block;
	margin-top: 0.2rem;
	color: var(--trb-light-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

/* ---------- Shop filters (light) ---------- */

body.trb-light .trb-shop-filters {
	background: var(--trb-light-bg-alt);
}

body.trb-light .trb-shop-filter-title {
	border-bottom-color: var(--trb-light-line);
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-shop-filter-options a {
	border-color: var(--trb-light-text);
	background: var(--trb-light-bg);
	color: var(--trb-light-text) !important;
}

body.trb-light .trb-shop-filter-options a:hover,
body.trb-light .trb-shop-filter-options a:focus-visible {
	background: #e9e9ec;
}

body.trb-light .trb-shop-filter-options a[aria-current="true"] {
	background: var(--trb-light-text);
	border-color: var(--trb-light-text);
	color: var(--trb-light-bg) !important;
}

body.trb-light .trb-shop-count {
	color: var(--trb-light-muted);
}

body.trb-light .trb-product-cta {
	color: #fff;
}

@media (max-width: 781px) {
	body.trb-light .trb-shop-filter > summary {
		border-color: var(--trb-light-text);
		background: var(--trb-light-bg);
		color: var(--trb-light-text);
	}

	body.trb-light .trb-shop-filter-current {
		color: var(--trb-light-muted);
	}
}

/* ---------- Home page (shop-only): a shop front like the old store ---------- */

/* The whole header (red bar, logo row, menu) starts tucked away above the
   screen so the hero fills it, and slides down once the visitor scrolls
   (body.trb-header-shown, set in inc/shop-only.php). A keyboard user tabbing
   into it brings it down too.
   The promo banner (when there is one) sits at the bottom of the header, so
   it stays peeking out at the top while the rest is tucked away. Its height
   is measured into --trb-promo-h by the script in inc/shop-only.php. */
body.trb-shop-home {
	/* Above the hero: only the admin bar (when showing) and the promo banner. */
	--trb-header-h: calc(var(--wp-admin--admin-bar--height, 0px) + var(--trb-promo-h, 0px));
}

body.trb-shop-home .wp-site-blocks > header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 100;
	transform: translateY(calc(-100% + var(--trb-promo-h, 0px)));
	box-shadow: none;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* With no banner, slide the whole header clear of the admin bar too. */
body.trb-shop-home .wp-site-blocks > header:not(:has(.trb-promo)) {
	transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 0px)));
}

/* Scrolled, or a keyboard user tabs into the tucked-away rows (not the banner's
   code button, which is already showing).
   `transform: none` (not translateY(0)) so the mobile menu overlay can still go full screen. */
body.trb-shop-home.trb-header-shown .wp-site-blocks > header,
body.trb-shop-home .wp-site-blocks > header:has(> :not(.trb-promo):focus-within) {
	transform: none;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
	body.trb-shop-home .wp-site-blocks > header {
		transition: none;
	}
}

/* Section headings: centred, Oswald capitals, as on the old store. */
.trb-section-head.is-centered {
	text-align: center;
}

body.trb-shop-home .trb-section .trb-section-title,
.trb-meet-title {
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.trb-section-sub {
	color: var(--trb-light-muted);
	font-size: 1.05rem;
	margin: 0.6rem 0 0;
}

.trb-section-foot {
	text-align: center;
	margin: 2.5rem 0 0;
}

body.trb-light main .trb-section-foot .trb-btn {
	padding: 0.85rem 1.75rem;
}

body.trb-light main .trb-section-foot .trb-btn:hover,
body.trb-light main .trb-section-foot .trb-btn:focus-visible {
	color: var(--trb-light-red);
}

/* New Arrivals on white, Shop by Line on pale grey. */
body.trb-light main .trb-section.trb-lines {
	background: var(--trb-light-bg-alt);
}

/* ---------- Hero: our old hero's look, with shop wording ---------- */

.trb-shop-hero {
	background:
		/* Red glow behind the photo. */
		radial-gradient(ellipse 40% 60% at 75% 55%, rgba(200, 16, 46, 0.3), transparent 70%),
		/* Faint red wash in the bottom-left corner. */
		radial-gradient(ellipse 45% 40% at 0% 100%, rgba(200, 16, 46, 0.12), transparent 70%),
		linear-gradient(180deg, #1c1f22 0%, #0d0e10 60%, #050506 100%);
	color: #fff;
	font-family: var(--wp--preset--font-family--barlow);
	overflow: hidden;
	margin-block: 0;
}

.trb-shop-hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 2rem;
	/* Fill the screen below the header (height set in inc/shop-only.php). */
	min-height: max(460px, calc(100vh - var(--trb-header-h, 150px)));
	min-height: max(460px, calc(100svh - var(--trb-header-h, 150px)));
}

.trb-shop-hero-text {
	padding-block: 4rem;
}

/* Eyebrow with a short red rule in front, as on the share image. */
.trb-shop-hero .trb-eyebrow::before {
	content: "";
	width: 2.5rem;
	height: 3px;
	background: currentColor;
}

body.trb-light main .trb-shop-hero .trb-shop-hero-title {
	color: #fff;
	font-family: var(--wp--preset--font-family--oswald);
	font-size: clamp(3rem, 7.5vw, 6.5rem);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	margin: 1rem 0 1.25rem;
}

/* "Bull" in red, on its own line. */
.trb-shop-hero-title span {
	display: block;
	color: var(--wp--preset--color--accent);
}

.trb-shop-hero-sub {
	color: #b5b7ba;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	margin: 0 0 2rem;
}

.trb-shop-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

body.trb-light main .trb-shop-hero .trb-btn {
	font-size: 1rem;
	padding: 0.85rem 1.9rem;
}

body.trb-light main .trb-shop-hero .trb-btn:hover,
body.trb-light main .trb-shop-hero .trb-btn:focus-visible {
	color: #fff;
}

/* The ghost button is white-on-dark here, not the light pages' dark outline. */
body.trb-light main .trb-shop-hero .trb-btn-ghost {
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

body.trb-light main .trb-shop-hero .trb-btn-ghost:hover,
body.trb-light main .trb-shop-hero .trb-btn-ghost:focus-visible {
	background: #fff;
	border-color: #fff;
	color: var(--trb-light-text);
}

/* Johnny stands on the bottom edge, faded out where the photo ends. */
.trb-shop-hero-photo {
	align-self: end;
	position: relative;
	margin: 0;
	padding-top: 2.5rem;
	pointer-events: none;
	user-select: none;
}

.trb-shop-hero-photo img {
	display: block;
	width: 100%;
	/* As tall as the hero allows, less the space above Johnny. */
	max-height: max(420px, calc(100svh - var(--trb-header-h, 150px) - 2.5rem));
	object-fit: contain;
	object-position: center bottom;
	-webkit-user-drag: none;
	-webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

/* Smooth scroll to New Arrivals, landing below the header that slides in. */
html:has(body.trb-shop-home) {
	scroll-behavior: smooth;
}

body.trb-shop-home #merch {
	scroll-margin-top: calc(var(--trb-shop-header-h, 150px) + var(--wp-admin--admin-bar--height, 0px));
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.trb-shop-home) {
		scroll-behavior: auto;
	}
}

/* ---------- Meet The Romford Bull: red band ---------- */

.trb-meet {
	background:
		radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255, 255, 255, 0.08), transparent 70%),
		var(--wp--preset--color--bull-red);
	color: #fff;
	font-family: var(--wp--preset--font-family--barlow);
	padding-block: clamp(3rem, 6vw, 4.5rem);
	margin-block: 0;
}

.trb-meet-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 3rem;
}

/* White text on the red band (the light-mode text colours above are dark). */
body.trb-light main .trb-meet .trb-meet-title {
	color: #fff;
}

.trb-meet-title {
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	line-height: 1.05;
	margin: 0 0 1rem;
}

.trb-meet-text p {
	max-width: 32rem;
	font-size: 1.05rem;
	line-height: 1.6;
	margin: 0;
}

.trb-meet-socials {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.trb-meet-socials a {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 0.65rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #fff !important;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s;
}

.trb-meet-socials a:hover,
.trb-meet-socials a:focus-visible {
	background: rgba(0, 0, 0, 0.15);
	border-color: #fff;
}

.trb-meet-socials svg {
	grid-row: span 2;
}

.trb-meet-handle {
	font-size: 0.9rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.trb-meet-follow {
	font-size: 0.75rem;
	opacity: 0.8;
}

/* ---------- Shop by Line ---------- */

.trb-line-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}

/* Up to three lines sit centred instead of stretching the full width. */
.trb-line-grid:not(:has(> :nth-child(4))) {
	grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
	justify-content: center;
}

body.trb-light main a.trb-line-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.5rem 1.5rem 1.75rem;
	background: var(--trb-light-bg);
	border: 1px solid var(--trb-light-line);
	color: var(--trb-light-text);
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

body.trb-light main a.trb-line-card:hover,
body.trb-light main a.trb-line-card:focus-visible {
	color: var(--trb-light-text);
	border-color: var(--trb-light-red);
	box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
}

.trb-line-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
	margin-bottom: 1.25rem;
	background: var(--trb-light-bg-alt);
	overflow: hidden;
}

.trb-line-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No picture yet: the logo, shown black. */
.trb-line-thumb img.trb-line-fallback {
	width: 40%;
	height: auto;
	object-fit: contain;
	filter: brightness(0);
	opacity: 0.25;
}

.trb-line-name {
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.trb-line-count {
	color: var(--trb-light-red);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-top: 0.35rem;
}

@media (max-width: 781px) {
	.trb-shop-hero-inner {
		grid-template-columns: minmax(0, 1fr);
		/* Text on top; Johnny takes whatever height is left, so the hero fills tall phones too. */
		grid-template-rows: auto minmax(0, 1fr);
		gap: 0;
	}

	/* Phones: text centred, Johnny underneath. */
	.trb-shop-hero-text {
		padding-block: 3rem 0;
		text-align: center;
	}

	.trb-shop-hero .trb-eyebrow,
	.trb-shop-hero-actions {
		justify-content: center;
	}

	.trb-shop-hero .trb-eyebrow::before {
		display: none;
	}

	/* The photo fills the leftover space, standing on the bottom edge,
	   and never gets shorter than 380px. */
	.trb-shop-hero-photo {
		align-self: stretch;
		min-height: calc(380px + 1.5rem);
		padding-top: 0;
	}

	.trb-shop-hero-photo img {
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100%;
		height: calc(100% - 1.5rem);
		max-height: none;
		object-fit: contain;
		object-position: center bottom;
	}

	.trb-meet-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.trb-meet-socials {
		grid-template-columns: minmax(0, 1fr);
	}

	.trb-line-grid,
	.trb-line-grid:not(:has(> :nth-child(4))) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}

	body.trb-light main a.trb-line-card {
		padding: 1rem 1rem 1.25rem;
	}

	.trb-line-name {
		font-size: 1.1rem;
	}
}
