/* TSD theme 1.0.40 — staging review round. Kill switches: see inc/v1040.php. */

/* =============================================================================================
 * 1. Training Gear grid: full bleed, tiles touching, b/w → gold/red checkerboard panel
 * =========================================================================================== */
:root { --tsd40-sbw: 0px; --tsd40-gold: var(--tt-gold, #ffb81c); --tsd40-red: var(--tt-red, #dd0000); }

body.tsd40-gear-grid section.tsd40-gear { overflow-x: clip; }
body.tsd40-gear-grid section.tsd40-gear .tsd40-gear__wrap {
	width: calc(100vw - var(--tsd40-sbw));
	max-width: none;
	margin-left: calc(50% - (50vw - var(--tsd40-sbw) / 2));
	margin-right: 0;
	padding: 0;
}
body.tsd40-gear-grid section.tsd40-gear .tsd40-gear__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0 !important;
	margin: 0;
	padding: 0;
}
body.tsd40-gear-grid .tsd40-gear .tt-gear__card {
	--tsd40-ov: var(--tsd40-gold);
	--tsd40-ink: #111;
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	margin: 0;
	border: 0;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	background: #111;
}
/* Checkerboard, 4 columns: row 1 gold red gold red / row 2 red gold red gold */
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(8n+2),
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(8n+4),
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(8n+5),
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(8n+7) { --tsd40-ov: var(--tsd40-red); --tsd40-ink: #fff; }

body.tsd40-gear-grid .tsd40-gear .tt-gear__media,
body.tsd40-gear-grid .tsd40-gear .tt-gear__media img { display: block; width: 100%; height: 100%; }
body.tsd40-gear-grid .tsd40-gear .tt-gear__media img {
	object-fit: cover;
	filter: grayscale(1) contrast(1.05);
	transform: none;
	transition: filter .3s ease, transform .3s ease;
}
body.tsd40-gear-grid .tsd40-gear .tt-gear__body {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	padding: 1rem;
	text-align: center;
	color: var(--tsd40-ink);
	background: color-mix(in srgb, var(--tsd40-ov) 86%, transparent);
	opacity: 0;
	transition: opacity .3s ease;
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	body.tsd40-gear-grid .tsd40-gear .tt-gear__body { background: var(--tsd40-ov); }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__body::before { content: none; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card:is(:hover, :focus-visible, .is-active) .tt-gear__body { opacity: .88 !important; }
}
body.tsd40-gear-grid .tsd40-gear .tt-gear__title {
	order: 1;
	font: 700 clamp(.95rem, 1.5vw, 1.25rem)/1.2 var(--tt-head, Montserrat, Arial, sans-serif);
	letter-spacing: .2em;
	text-transform: uppercase;
	color: inherit;
}
body.tsd40-gear-grid .tsd40-gear .tt-gear__cat,
body.tsd40-gear-grid .tsd40-gear a.tt-gear__card .tt-gear__cat {
	order: 2;
	font: 600 .72rem/1.2 var(--wp--preset--font-family--body, Barlow, Arial, sans-serif);
	letter-spacing: .18em;
	text-transform: uppercase;
	color: inherit;
	opacity: .85;
}
body.tsd40-gear-grid .tsd40-gear .tt-gear__ex { display: none; }
body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus {
	order: 3;
	position: relative;
	display: block;
	width: 22px;
	height: 22px;
	margin-top: .35rem;
}
body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::before,
body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	background: currentColor;
	transform: translate(-50%, -50%);
}
body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::before { width: 22px; height: 1.5px; }
body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::after { width: 1.5px; height: 22px; }

body.tsd40-gear-grid .tsd40-gear a.tt-gear__card,
body.tsd40-gear-grid .tsd40-gear a.tt-gear__card:hover,
body.tsd40-gear-grid .tsd40-gear a.tt-gear__card:focus-visible { color: var(--tsd40-ink); text-decoration: none; }

body.tsd40-gear-grid .tsd40-gear .tt-gear__card:is(:hover, :focus-visible, .is-active) .tt-gear__body { opacity: 1; }
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:is(:hover, :focus-visible, .is-active) img { filter: grayscale(0); transform: scale(1.04); }
body.tsd40-gear-grid .tsd40-gear .tt-gear__card:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* Touch screens (no hover): titles are always visible on the b/w photo; the row in the middle of the screen
   (JS adds .is-active) shows the gold/red panel, like the video tiles. A tap simply opens the link. */
@media (hover: none) {
	body.tsd40-gear-grid .tsd40-gear .tt-gear__body { opacity: 1; background: rgba(17, 17, 17, .5); color: #fff; transition: opacity .3s ease, background-color .3s ease, color .3s ease; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card.is-active .tt-gear__body { background: color-mix(in srgb, var(--tsd40-ov) 86%, transparent); color: var(--tsd40-ink); }
}

/* Tablet + phone: 2 columns; checkerboard for 2 columns */
@media (max-width: 1023.98px) {
	body.tsd40-gear-grid section.tsd40-gear .tsd40-gear__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(n) { --tsd40-ov: var(--tsd40-gold); --tsd40-ink: #111; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(4n+2),
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card:nth-child(4n+3) { --tsd40-ov: var(--tsd40-red); --tsd40-ink: #fff; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__title { font-size: clamp(.85rem, 3.4vw, 1.1rem); letter-spacing: .14em; }
}
@media (max-width: 479.98px) {
	body.tsd40-gear-grid .tsd40-gear .tt-gear__body { padding: .6rem; gap: .35rem; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__title { letter-spacing: .1em; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__cat { font-size: .62rem; letter-spacing: .12em; }
	body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus { width: 16px; height: 16px; margin-top: .15rem; }
	body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::before { width: 16px; }
	body.tsd40-gear-grid .tsd40-gear .tsd40-gear__plus::after { height: 16px; }
}
/* Phones get the same grid; the old phone-only copy is hidden. */
@media (max-width: 767.98px) {
	body.tsd40-gear-grid section.tsd40-gear.tt-hide-m { display: block !important; }
	body.tsd40-gear-grid section.tsd40-gear-dup { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	body.tsd40-gear-grid .tsd40-gear .tt-gear__body,
	body.tsd40-gear-grid .tsd40-gear .tt-gear__media img { transition: none; }
	body.tsd40-gear-grid .tsd40-gear .tt-gear__card:is(:hover, :focus-visible, .is-active) img { transform: none; }
}

/* =============================================================================================
 * 3. Variation details card
 * =========================================================================================== */
body.tsd40-variation-card .single_variation_wrap .woocommerce-variation.single_variation {
	background: #fff;
	border: 1px solid var(--tt-line, #e4e4e4);
	border-top: 4px solid var(--tsd40-gold);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(17, 17, 17, .07);
	padding: 1.25rem 1.4rem 1.1rem;
	margin: 0 0 1.25rem;
	color: #2b2b2b;
	font-family: var(--wp--preset--font-family--body, Barlow, "Helvetica Neue", Arial, sans-serif);
	font-size: 1rem;
	line-height: 1.6;
	text-align: left;
}
body.tsd40-variation-card .single_variation_wrap .woocommerce-variation-description { color: #2b2b2b; font-size: 1rem; line-height: 1.6; }
body.tsd40-variation-card .tsd40-vd p { margin: 0 0 .6rem; }
body.tsd40-variation-card .tsd40-vd__top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: 0 0 1rem; }
body.tsd40-variation-card .tsd40-vd__top > p { margin: 0 !important; }
body.tsd40-variation-card .tsd40-vd__badge {
	display: inline-block;
	padding: .3rem .75rem;
	border-radius: 999px;
	background: var(--tsd40-gold);
	color: #111;
	font: 800 .74rem/1.25 var(--tt-head, Montserrat, Arial, sans-serif);
	letter-spacing: .06em;
	text-transform: uppercase;
}
body.tsd40-variation-card .tsd40-vd__faq { font-size: .86rem; color: #6b6b6b; font-style: italic; }
body.tsd40-variation-card a.tsd40-vd__faq { color: var(--tt-red, #dd0000); font-style: normal; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
body.tsd40-variation-card .tsd40-vd__em { font-weight: 600; color: #111; }
body.tsd40-variation-card .tsd40-vd__sec { padding: .85rem 0 .2rem; border-top: 1px solid #efefef; }
body.tsd40-variation-card .tsd40-vd__sec:first-of-type,
body.tsd40-variation-card .tsd40-vd__top + .tsd40-vd__sec { border-top: 0; padding-top: 0; }
body.tsd40-variation-card .tsd40-vd__intro { margin: 0 0 .6rem; }
body.tsd40-variation-card .tsd40-vd__intro + .tsd40-vd__sec { border-top: 1px solid #efefef; padding-top: .85rem; }
body.tsd40-variation-card .tsd40-vd__sec--cta { border-top: 0; padding-top: .35rem; }
body.tsd40-variation-card .tsd40-vd__h {
	margin: 0 0 .35rem !important;
	font: 800 .8rem/1.3 var(--tt-head, Montserrat, Arial, sans-serif);
	font-variant: small-caps;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #111;
}
body.tsd40-variation-card .tsd40-vd__list,
body.tsd40-variation-card .tsd40-vd__checks { margin: 0 0 .6rem; padding: 0; list-style: none; }
body.tsd40-variation-card .tsd40-vd__list li,
body.tsd40-variation-card .tsd40-vd__checks li { position: relative; padding-left: 1.2rem; margin: 0 0 .35rem; }
body.tsd40-variation-card .tsd40-vd__list li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--tsd40-gold); }
body.tsd40-variation-card .tsd40-vd__checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--tsd40-red); font-weight: 800; }
body.tsd40-variation-card .tsd40-vd__note {
	margin: .4rem 0 .9rem !important;
	padding: .7rem .9rem;
	border-left: 4px solid var(--tsd40-red);
	border-radius: 0 6px 6px 0;
	background: #fdf1f1;
	color: #3a1d1d;
	font-size: .95rem;
}
body.tsd40-variation-card .tsd40-vd__hr { border: 0; border-top: 1px solid #efefef; margin: .7rem 0; }
body.tsd40-variation-card .tsd40-vd__cta { margin: .2rem 0 .4rem !important; }
body.tsd40-variation-card a.tsd40-vd__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	min-height: 2.6rem;
	padding: .55rem 1.1rem;
	border: 2px solid #111;
	border-radius: 6px;
	background: #fff;
	color: #111;
	font: 700 .8rem/1.2 var(--tt-head, Montserrat, Arial, sans-serif);
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	max-width: 100%;
	box-sizing: border-box;
	transition: background-color .2s ease, color .2s ease;
}
body.tsd40-variation-card a.tsd40-vd__btn::before { content: "★"; color: var(--tsd40-gold); font-size: 1rem; }
body.tsd40-variation-card a.tsd40-vd__btn:is(:hover, :focus-visible) { background: #111; color: #fff; }
body.tsd40-variation-card .tsd40-vd--plain p { margin: 0 0 .6rem; }

/* Price + stock */
body.tsd40-variation-card .single_variation .woocommerce-variation-price {
	margin: 1rem 0 .2rem;
	padding-top: .9rem;
	border-top: 1px solid #efefef;
	font: 800 1.9rem/1.15 var(--tt-head, Montserrat, Arial, sans-serif);
}
body.tsd40-variation-card .single_variation .woocommerce-variation-description:empty + .woocommerce-variation-price { margin-top: 0; padding-top: 0; border-top: 0; }
body.tsd40-variation-card .single_variation .woocommerce-variation-price .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; margin: 0; color: #111; font: inherit; }
body.tsd40-variation-card .single_variation .woocommerce-variation-price ins { order: 1; text-decoration: none; color: var(--tsd40-red); background: none; font-weight: 800; }
body.tsd40-variation-card .single_variation .woocommerce-variation-price del { order: 2; color: #8a8a8a; font-size: .55em; font-weight: 600; opacity: 1; }
body.tsd40-variation-card .single_variation .woocommerce-variation-availability .stock,
body.tsd40-variation-card .single_variation .woocommerce-variation-availability p {
	margin: .15rem 0 0;
	font: 500 .85rem/1.4 var(--wp--preset--font-family--body, Barlow, Arial, sans-serif);
	color: #6b6b6b;
}
body.tsd40-variation-card .single_variation .woocommerce-variation-availability .out-of-stock { color: var(--tsd40-red); font-weight: 700; }

@media (max-width: 600px) {
	body.tsd40-variation-card .single_variation_wrap .woocommerce-variation.single_variation { padding: 1rem 1rem .9rem; border-radius: 8px; }
	body.tsd40-variation-card .single_variation .woocommerce-variation-price { font-size: 1.6rem; }
	body.tsd40-variation-card a.tsd40-vd__btn { width: 100%; }
	body.tsd40-variation-card .tsd40-vd__badge { font-size: .7rem; }
}
