/* 2XS Search: a full-width sheet. Brand type, square corners, hard black rules. */

.txs-ui {
	--ink: #0d0d0d;
	--paper: #fff;
	--wash: #f4f3f1;
	--mute: #6b6b6b;
	--red: #ed4029;
	--red-text: #c92d18; /* Same red, dark enough for small text. */
	--green: #00813a;
	--pad: clamp(16px, 3.4vw, 56px);
	--display: Oswald, "Roboto Condensed", sans-serif;
	--body: "Roboto Condensed", Oswald, sans-serif;

	color: var(--ink);
	font-family: var(--body);
	line-height: 1.3;
	text-align: left;
}

.txs {
	position: fixed;
	inset: 0 0 auto 0;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: 94vh;
	max-height: 94dvh;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 8px solid var(--red);
	background: var(--paper);
	overflow: hidden;
}
.txs[open] { display: flex; flex-direction: column; animation: txs-drop .28s cubic-bezier(.2, .8, .2, 1); }
.txs::backdrop { background: rgba(8, 12, 16, .62); }
.txs-ui *, .txs-ui *::before, .txs-ui *::after { box-sizing: border-box; }
.txs-ui a { color: inherit; text-decoration: none; }
.txs-ui [hidden] { display: none !important; }

@keyframes txs-drop { from { transform: translateY(-28px); opacity: 0; } }
@keyframes txs-rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes txs-sweep { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

/* The search line, set as a headline ------------------------------------- */
.txs-ui .txs-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: clamp(8px, 1.2vw, 16px) var(--pad) 4px;
	border-bottom: 3px solid var(--ink);
}
/* The logo file has blank space above and below its roundel: crop to the circle. */
.txs-ui a.txs-logo { flex: none; display: block; margin-right: 6px; border-radius: 50%; line-height: 0; }
.txs-ui a.txs-logo img { display: block; width: 60px; height: 60px; margin: 0; border-radius: 50%; object-fit: cover; }
.txs-ui input.txs-input {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--ink);
	caret-color: var(--red);
	font: 600 clamp(30px, 5.4vw, 76px)/1.5 var(--display);
	height: 1.5em !important; /* Room for the tails of g, y and p. */
	text-transform: none;
	outline: 0;
	appearance: none;
}
.txs-ui input.txs-input::placeholder { color: #b9b7b3; opacity: 1; text-transform: uppercase; }
.txs-ui input.txs-input::-webkit-search-cancel-button { display: none; }
.txs-ui button.txs-close, .txs-ui button.txs-go {
	flex: none;
	margin: 0;
	border: 2px solid var(--ink);
	border-radius: 0;
	background: var(--paper);
	color: var(--ink);
	font: 500 15px/1 var(--display);
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 14px 18px;
	cursor: pointer;
}
.txs-ui button.txs-go { background: var(--ink); color: var(--paper); }
.txs-ui button:hover, .txs-ui button:focus-visible { background: var(--red); border-color: var(--red); color: var(--paper); }
.txs-ui a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.txs-ui .txs-loading { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; overflow: hidden; }
.txs-ui .txs-loading::after { content: ""; display: block; width: 30%; height: 100%; background: var(--red); animation: txs-sweep .9s linear infinite; }

.txs-ui .txs-body { min-height: 0; overflow: auto; scroll-padding-bottom: 70px; overscroll-behavior: contain; }
.txs-ui .txs-note { margin: 0; padding: 12px var(--pad); color: var(--mute); font-size: 17px; }
.txs-ui .txs-note strong { color: var(--ink); }

/* Categories, brands, tags: one horizontal band ---------------------------- */
.txs-ui .txs-band { display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 16px var(--pad); background: var(--wash); }
.txs-ui .txs-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.txs-ui .txs-label {
	margin: 0 6px 0 0;
	color: var(--mute);
	font: 400 13px/1 var(--display);
	letter-spacing: .14em;
	text-transform: uppercase;
}
.txs-ui a.txs-chip {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-height: 50px;
	padding: 6px 14px;
	border: 2px solid var(--ink);
	background: var(--paper);
	font: 500 17px/1.2 var(--display);
	text-transform: uppercase;
	transition: box-shadow .12s, transform .12s;
}
/* Where the category sits in the shop, above its name. */
.txs-ui a.txs-chip small { color: var(--mute); font: 400 13px/1.2 var(--body); text-transform: none; }
.txs-ui a.txs-chip:hover, .txs-ui a.txs-chip.is-active { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--red); }

/* Section headings --------------------------------------------------------- */
.txs-ui .txs-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 20px var(--pad) 12px;
	color: var(--ink);
	font: 600 18px/1 var(--display);
	letter-spacing: .12em;
	text-transform: uppercase;
}
.txs-ui .txs-head::after { content: ""; flex: 1; height: 2px; background: var(--ink); }

/* Products: five across the whole screen ----------------------------------- */
.txs-ui .txs-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(10px, 1.6vw, 26px);
	margin: 0;
	padding: 0 var(--pad) 8px;
	list-style: none;
}
.txs-ui .txs-grid li { margin: 0; animation: txs-rise .3s ease both; animation-delay: calc(var(--i) * 35ms); }
.txs-ui a.txs-tile { display: flex; flex-direction: column; height: 100%; }
.txs-ui .txs-shot {
	position: relative;
	aspect-ratio: 1;
	border: 2px solid #e6e4e0;
	background: var(--paper);
	transition: border-color .12s, box-shadow .12s, transform .12s;
}
.txs-ui .txs-shot img { position: absolute; inset: 6%; width: 88%; height: 88%; max-width: none; object-fit: contain; }
.txs-ui a.txs-tile:hover .txs-shot, .txs-ui a.txs-tile.is-active .txs-shot { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); transform: translate(-6px, -6px); }
.txs-ui .txs-flag {
	position: absolute;
	left: 0;
	bottom: 0;
	padding: 5px 10px;
	background: var(--ink);
	color: var(--paper);
	font: 400 12px/1 var(--display);
	letter-spacing: .1em;
	text-transform: uppercase;
}
.txs-ui a.txs-tile.is-out img { filter: grayscale(1); opacity: .55; }
.txs-ui .txs-name { margin-top: 12px; font: 500 clamp(15px, 1.15vw, 19px)/1.25 var(--display); }
.txs-ui .txs-price { margin-top: 6px; color: var(--red-text); font-size: 19px; font-weight: 700; }
.txs-ui .txs-price s { margin-right: 8px; color: var(--mute); font-size: 15px; font-weight: 400; }
.txs-ui .txs-stock { margin-top: 2px; color: var(--green); font-size: 14px; }
.txs-ui a.is-out .txs-stock { color: var(--mute); }

/* Courses: wide bands, picture beside words -------------------------------- */
.txs-ui .txs-courses { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.txs-ui .txs-courses a.txs-tile { flex-direction: row; align-items: center; gap: 16px; border: 2px solid var(--ink); }
.txs-ui .txs-courses .txs-shot { flex: none; width: 110px; border: 0; }
.txs-ui .txs-courses a.txs-tile:hover, .txs-ui .txs-courses a.is-active { box-shadow: 6px 6px 0 var(--red); }
.txs-ui .txs-courses a.txs-tile:hover .txs-shot, .txs-ui .txs-courses a.is-active .txs-shot { box-shadow: none; transform: none; }
.txs-ui .txs-courses .txs-name { margin: 0; }
.txs-ui .txs-courses .txs-stock { display: none; }

/* Pages and blog posts: quietest ------------------------------------------- */
.txs-ui .txs-reads { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 0 var(--pad) 8px; font-size: 17px; }
.txs-ui .txs-reads a { border-bottom: 2px solid #d8d5d0; }
.txs-ui .txs-reads a:hover, .txs-ui .txs-reads a.is-active { border-color: var(--red); }

.txs-ui a.txs-all {
	position: sticky; /* Always in reach, however long the results. */
	bottom: 0;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	margin-top: 18px;
	padding: 18px var(--pad);
	background: var(--ink);
	color: var(--paper);
	font: 500 20px/1.2 var(--display);
	letter-spacing: .08em;
	text-transform: uppercase;
}
.txs-ui a.txs-all:hover, .txs-ui a.txs-all.is-active { background: var(--red); color: var(--paper); }

/* Nothing found ------------------------------------------------------------ */
.txs-ui .txs-empty { padding: 36px var(--pad) 44px; }
.txs-ui .txs-empty p { margin: 0 0 20px; font: 400 clamp(22px, 2.6vw, 36px)/1.25 var(--display); }
.txs-ui a.txs-contact { display: inline-block; padding: 15px 24px; background: var(--red-text); color: var(--paper); font: 500 17px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.txs-ui a.txs-contact:hover { background: var(--ink); color: var(--paper); }

.txs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Smaller screens ---------------------------------------------------------- */
@media (max-width: 1099px) {
	.txs-ui .txs-grid:not(.txs-courses) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	/* Sized so the whole prompt fits beside the Close button. */
	.txs-ui input.txs-input::placeholder { font-size: min(4.4vw, 24px); }
	.txs-ui a.txs-logo { margin-right: 0; }
	.txs-ui a.txs-logo img { width: 38px; height: 38px; }
	.txs { height: 100vh; height: 100dvh; max-height: 100dvh; border: 0; }
	.txs-ui .txs-body { flex: 1; }
	.txs-ui .txs-bar { gap: 8px; }
	.txs-ui button.txs-go { display: none; } /* The keyboard has a search key. */
	.txs-ui button.txs-close { padding: 11px 12px; font-size: 13px; }
	/* Chips scroll sideways rather than pushing products off the screen. */
	.txs-ui .txs-band { flex-wrap: nowrap; overflow-x: auto; gap: 24px; padding-block: 12px; }
	.txs-ui .txs-set { flex: none; flex-wrap: nowrap; }
	.txs-ui a.txs-chip { white-space: nowrap; }
	.txs-ui .txs-grid:not(.txs-courses) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.txs-ui, .txs-ui * { animation: none !important; transition: none !important; }
}

/* Results page -------------------------------------------------------------- */
.txs-page { width: 100%; padding-bottom: 40px; background: var(--paper); }
.txs-ui .txs-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 28px var(--pad) 14px; border-bottom: 3px solid var(--ink); }
.txs-ui .txs-title h1 { margin: 0; color: var(--mute); font: 400 clamp(24px, 3.2vw, 44px)/1.3 var(--display); text-transform: none; overflow-wrap: anywhere; }
.txs-ui .txs-title h1 em { color: var(--ink); font-style: normal; font-weight: 600; }
.txs-ui .txs-title p { margin: 0; color: var(--mute); font-size: 17px; }
.txs-page .txs-grid { row-gap: 30px; }
.txs-page .txs-grid li { animation: none; }
.txs-ui .txs-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 30px var(--pad) 6px; }
.txs-ui .txs-pager a { min-width: 46px; padding: 11px; border: 2px solid var(--ink); text-align: center; font: 500 17px/1 var(--display); }
.txs-ui .txs-pager a[aria-current], .txs-ui .txs-pager a:hover { background: var(--ink); color: var(--paper); }
.txs-ui .txs-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin: 36px var(--pad) 0; padding: 26px; background: var(--wash); font: 400 22px var(--display); }

/* Contact lightbox ---------------------------------------------------------- */
.txs-ask { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); margin: auto; padding: 28px; border: 0; border-bottom: 8px solid var(--red); border-radius: 0; background: var(--paper); overflow: auto; }
.txs-ask::backdrop { background: rgba(8, 12, 16, .72); }
.txs-ui.txs-ask h2 { margin: 0 0 18px; padding-right: 80px; color: var(--ink); font: 600 28px/1.25 var(--display); }
.txs-ui.txs-ask button { margin: 0; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 500 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 12px 16px; cursor: pointer; }
.txs-ui.txs-ask button.txs-close { position: absolute; top: 14px; right: 14px; padding: 9px 11px; font-size: 13px; }
.txs-ui.txs-ask button.txs-send { width: 100%; padding: 17px; background: var(--ink); color: var(--paper); }
.txs-ui.txs-ask button:hover { background: var(--red-text); border-color: var(--red-text); color: var(--paper); }
.txs-ui.txs-ask button:disabled { opacity: .5; cursor: wait; }
.txs-ui .txs-field { display: block; margin: 0 0 14px; }
.txs-ui .txs-field span { display: block; margin-bottom: 5px; font: 500 16px var(--display); }
.txs-ui .txs-field input { width: 100%; height: 48px; margin: 0; padding: 0 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 400 18px var(--body); box-shadow: none; }
.txs-ui .txs-field input:focus { outline: 3px solid var(--red); outline-offset: 1px; }
.txs-ui .txs-trap { position: absolute; left: -9999px; }
.txs-ui .txs-message { margin: 0 0 12px; color: var(--red-text); font-size: 17px; }
.txs-ui .txs-message:empty { display: none; }
.txs-ui .txs-thanks p { margin: 0; font: 400 22px/1.35 var(--display); }

/* The header search box (replaces YITH's) ----------------------------------- */
.txs-box { display: flex; width: 100%; margin: 0; border: 2px solid #111; background: #fff; }
.txs-box:focus-within { box-shadow: 4px 4px 0 #111; }
.txs-box input[type="search"] { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 14px; border: 0; border-radius: 0; box-shadow: none; background: #fff; color: #111; font: 400 18px Oswald, sans-serif; appearance: none; }
.txs-box input[type="search"]::placeholder { text-transform: uppercase; letter-spacing: .06em; color: #777; }
.txs-box button { display: flex; flex: none; align-items: center; justify-content: center; width: 48px; margin: 0; padding: 0; border: 0; border-radius: 0; background: #111; color: #fff; cursor: pointer; }
.txs-box button:hover { background: #ed4029; }
.mobile-search .txs-box { margin: 8px 0; }
@media (max-width: 767px) {
	.txs-page .txs-grid:not(.txs-courses) { row-gap: 22px; }
}

/* Announcing the new search: runs once, then sits still ---------------------- */
.txs-box { position: relative; }
.txs-new {
	position: absolute;
	right: -8px;
	bottom: calc(100% - 7px);
	z-index: 2;
	display: flex;
	align-items: stretch;
	background: #111;
	color: #fff;
	box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
	font: 500 14px/24px Oswald, sans-serif;
	letter-spacing: .07em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transform: skewX(-14deg) rotate(-2deg); /* The slant of the 2XS mark. */
	transform-origin: right bottom;
	padding-right: 12px;
	animation: txs-land .55s cubic-bezier(.2, 1.5, .4, 1) .5s both, txs-nudge .7s ease-in-out 3.2s 2;
}
.txs-new b { margin-right: 10px; padding: 0 10px; background: #c92d18; color: #fff; font-weight: 700; line-height: 24px; }
.txs-box.is-new { animation: txs-ring 1.4s ease-out .9s 3; }
/* A gust of light across the field. */
.txs-box.is-new::after {
	content: "";
	position: absolute;
	inset: 0 48px 0 0;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 35%, rgba(237, 64, 41, .22) 50%, transparent 65%) no-repeat;
	background-size: 60% 100%;
	background-position: -160% 0;
	animation: txs-gust 1.4s ease-in-out .9s 3;
}
.txs-box.is-new:focus-within, .txs-box.is-new:hover { animation: none; box-shadow: 4px 4px 0 #111; }
.txs-box button svg { transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.txs-box button:hover svg, .txs-box:focus-within button svg { transform: scale(1.2) rotate(-12deg); }
.txs-used .txs-new { display: none; }
.txs-used .txs-box.is-new, .txs-used .txs-box.is-new::after { animation: none; }
.mobile-search .txs-box.is-new { margin-top: 22px; }
.txs-used .mobile-search .txs-box.is-new { margin-top: 8px; }
.mobile-search .txs-new { right: 6px; }

@keyframes txs-land { from { opacity: 0; transform: skewX(-14deg) rotate(8deg) translate(26px, -22px); } }
@keyframes txs-nudge { 30% { transform: skewX(-14deg) rotate(-6deg) translateY(-5px); } 65% { transform: skewX(-14deg) rotate(1deg); } }
@keyframes txs-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .95); } 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }
@keyframes txs-gust { from { background-position: -160% 0; } to { background-position: 260% 0; } }

@media (prefers-reduced-motion: reduce) {
	.txs-new, .txs-box.is-new, .txs-box.is-new::after { animation: none; }
	.txs-box button svg { transition: none; }
}
