/* ==========================================================================
   The Sport — шапка сайта. Без зависимостей, ~9 КБ.
   ========================================================================== */

.tsh {
	--tsh-orange: #f08a24;
	--tsh-orange-dark: #d97a17;
	--tsh-dark: #17181b;
	--tsh-dark-2: #202226;
	--tsh-line: rgba(255, 255, 255, .1);
	--tsh-text: #f5f5f4;
	--tsh-muted: #a4a6ad;
	--tsh-top-h: 38px;
	--tsh-main-h: 68px;
	--tsh-radius: 10px;

	position: relative;
	z-index: 999;
	font-family: inherit;
	line-height: 1.35;
}

.tsh--sticky { position: sticky; top: 0; }

.tsh *,
.tsh-overlay { box-sizing: border-box; }

.tsh a { text-decoration: none; }

.tsh svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.tsh-wrap {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	gap: 20px;
}

/* ── Верхняя полоса ─────────────────────────────────────────────────────── */
.tsh-top {
	background: var(--tsh-orange);
	color: #231402;
	font-size: 13px;
}

.tsh-top .tsh-wrap { height: var(--tsh-top-h); justify-content: space-between; }

.tsh-top__promo {
	color: #231402;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tsh-top__promo:hover { opacity: .75; }

.tsh-top__nav { display: flex; align-items: center; gap: 22px; }

.tsh-top__link,
.tsh-top__nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #231402;
	font-size: 13px;
	white-space: nowrap;
	transition: opacity .15s ease;
}

.tsh-top__nav a:hover { opacity: .7; }

.tsh-top__link--icon svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; }
.tsh-top__link--wa svg { fill: currentColor; stroke: none; }

/* ── Основная полоса ────────────────────────────────────────────────────── */
.tsh-main { background: var(--tsh-dark); color: var(--tsh-text); }

.tsh-main .tsh-wrap { height: var(--tsh-main-h); }

.tsh-logo { flex: none; display: block; order: -1; }
.tsh-logo img { display: block; height: 36px; width: auto; }

/* Кнопка КАТАЛОГ */
.tsh-burger {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 42px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--tsh-orange);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	cursor: pointer;
	transition: background .18s ease;
}

.tsh-burger:hover { background: var(--tsh-orange-dark); }
.tsh-burger__icon { width: 18px; height: 13px; flex: none; }
.tsh-burger__icon svg { fill: currentColor; }

/* Крестик вместо бургера, когда каталог открыт */
.tsh.is-open .tsh-burger__icon svg rect:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tsh.is-open .tsh-burger__icon svg rect:nth-child(2) { opacity: 0; }
.tsh.is-open .tsh-burger__icon svg rect:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.tsh-burger__icon svg rect { transform-origin: center; transition: transform .22s ease, opacity .15s ease; }

/* Поиск */
.tsh-search { flex: 1 1 auto; min-width: 0; max-width: 560px; }

.tsh-search .dgwt-wcas-search-wrapp { max-width: none; }

.tsh-search__fallback { display: flex; height: 42px; border-radius: var(--tsh-radius); overflow: hidden; background: #fff; }
.tsh-search__fallback input[type="search"] { flex: 1; min-width: 0; border: 0; padding: 0 16px; font: inherit; font-size: 14px; color: #17181b; background: transparent; }
.tsh-search__fallback input[type="search"]:focus { outline: none; }
.tsh-search__fallback button { width: 52px; border: 0; background: var(--tsh-orange); color: #fff; cursor: pointer; display: grid; place-items: center; }
.tsh-search__fallback button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }

/* Правые инструменты */
.tsh-tools { flex: none; display: flex; align-items: center; gap: 6px; margin-left: auto; }

.tsh-tool {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 8px;
	border-radius: var(--tsh-radius);
	color: var(--tsh-text);
	transition: background .15s ease, color .15s ease;
}

.tsh-tool:hover { background: var(--tsh-dark-2); color: var(--tsh-orange); }
.tsh-tool > svg { width: 24px; height: 24px; fill: none; stroke: currentColor; }

.tsh-tools__currency { display: flex; align-items: center; margin-right: 6px; }
.tsh-tools__currency select,
.tsh-tools__currency .woocs_flag_view_item_current,
.tsh-tools__currency .woocs-style-1 { font-size: 13px; }

/* Корзина плагина Side Cart — приводим к общему виду */
.tsh-tool--cart .xoo-wsc-cart-trigger,
.tsh-tool--cart .xoo-wsc-basket { position: static !important; box-shadow: none !important; background: transparent !important; }
.tsh-tool--cart .xoo-wsc-items-count { background: var(--tsh-orange); color: #fff; }

/* ── Каталог: общий каркас ──────────────────────────────────────────────── */
.tsh-catalog {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--tsh-dark);
	color: var(--tsh-text);
	border-top: 1px solid var(--tsh-line);
	box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .2s ease, transform .2s ease;
}

.tsh-catalog[hidden] { display: none; }
.tsh.is-open .tsh-catalog { opacity: 1; transform: none; }

.tsh-catalog__inner { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

.tsh-catalog__bar { display: none; }

.tsh-catalog__body {
	display: grid;
	grid-template-columns: 262px minmax(0, 1fr);
	align-items: start;
	gap: 32px;
	padding: 22px 0 30px;
}

/* Высота ограничена окном: длинные разделы скроллятся внутри */
.tsh-lvl1,
.tsh-panels { max-height: calc(100vh - var(--tsh-top-h) - var(--tsh-main-h) - 70px); }

/* Уровень 1 — колонка категорий */
.tsh-lvl1 {
	margin: 0;
	padding: 0 18px 0 0;
	list-style: none;
	border-right: 1px solid var(--tsh-line);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.tsh-lvl1__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 14px;
	border-radius: 8px;
	color: var(--tsh-muted);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	transition: background .15s ease, color .15s ease;
}

.tsh-lvl1__link svg { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; opacity: .6; }
.tsh-lvl1__item.is-active .tsh-lvl1__link,
.tsh-lvl1__link:hover { background: var(--tsh-dark-2); color: #fff; }
.tsh-lvl1__item.is-active .tsh-lvl1__link { color: var(--tsh-orange); }

/* Панель подкатегорий */
.tsh-panels { position: relative; overflow-y: auto; overscroll-behavior: contain; }
.tsh-panel { display: none; }
.tsh-panel.is-active { display: block; animation: tsh-fade .22s ease; }

/* Раздел с фотографией: колонки слева, снимок справа */
.tsh-panel.has-media.is-active {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 0 30px;
	align-items: start;
}

.tsh-panel.has-media .tsh-panel__cols { grid-column: 1; }

.tsh-panel__media {
	display: block;
	grid-column: 2;
	grid-row: 1 / -1;
	position: sticky;
	top: 0;
	aspect-ratio: 3 / 4;
	max-height: 440px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--tsh-dark-2);
}

.tsh-panel__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.tsh-panel__media:hover img { transform: scale(1.04); }

@keyframes tsh-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tsh-panel__all {
	display: none;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	color: var(--tsh-orange);
	font-size: 14px;
	font-weight: 700;
}

.tsh-panel__all svg { width: 11px; height: 11px; fill: none; stroke: currentColor; }

.tsh-panel__cols {
	columns: 200px 4;
	column-gap: 28px;
}

.tsh-col { break-inside: avoid; margin: 0 0 22px; }

.tsh-col__title {
	display: block;
	margin-bottom: 8px;
	color: var(--tsh-orange);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
}

.tsh-col__title:hover { color: #fff; }

.tsh-col__list { margin: 0; padding: 0; list-style: none; }
.tsh-col__list li { margin: 0 0 2px; }

.tsh-col__list a {
	display: block;
	padding: 3px 0;
	color: var(--tsh-muted);
	font-size: 13.5px;
	transition: color .12s ease, transform .12s ease;
}

.tsh-col__list a:hover { color: #fff; transform: translateX(3px); }

.tsh-catalog__foot { display: none; }

/* Тонкие скроллбары внутри каталога */
.tsh-lvl1,
.tsh-panels { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.tsh-lvl1::-webkit-scrollbar,
.tsh-panels::-webkit-scrollbar { width: 6px; }
.tsh-lvl1::-webkit-scrollbar-thumb,
.tsh-panels::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 3px; }

/* Затемнение страницы */
.tsh-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .2s ease;
	z-index: 998;
}

.tsh-overlay[hidden] { display: none; }
body.tsh-open .tsh-overlay { opacity: 1; }
body.tsh-open { overflow: hidden; }

/* ── Планшет ────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
	.tsh-panel__cols { columns: 190px 3; }
	.tsh-panel.has-media.is-active { grid-template-columns: minmax(0, 1fr) 230px; }
	.tsh-catalog__body { grid-template-columns: 230px minmax(0, 1fr); }
	.tsh-top__link--icon span { display: none; }
}

/* ── Мобильные и планшеты: каталог во весь экран ────────────────────────── */
@media (max-width: 1024px) {

	.tsh { --tsh-main-h: 60px; --tsh-top-h: 34px; }

	.tsh-wrap { padding: 0 14px; gap: 12px; }

	/* Верхняя полоса — только промо */
	.tsh-top__nav { display: none; }
	.tsh-top__promo { width: 100%; text-align: center; font-size: 12px; }

	/* Основная полоса: бургер · лого · инструменты */
	.tsh-main .tsh-wrap { gap: 10px; }
	.tsh-logo { order: 0; margin: 0 auto; }
	.tsh-logo img { height: 28px; }

	.tsh-burger { order: -1; height: 38px; padding: 0 12px; gap: 0; }
	.tsh-burger__text { display: none; }

	.tsh-tools__currency { display: none; }
	.tsh-tools { gap: 2px; }
	.tsh-tool { min-width: 38px; height: 38px; }

	/* Поиск — отдельной строкой */
	.tsh-search {
		order: 10;
		flex: 1 0 100%;
		max-width: none;
		margin: 0 0 10px;
	}

	.tsh-main .tsh-wrap { height: auto; flex-wrap: wrap; padding-top: 10px; }
	.tsh-main .tsh-wrap > .tsh-burger,
	.tsh-main .tsh-wrap > .tsh-logo,
	.tsh-main .tsh-wrap > .tsh-tools { margin-bottom: 10px; }

	/* Каталог во весь экран, два «экрана» со сдвигом */
	.tsh-catalog {
		position: fixed;
		inset: 0;
		top: 0;
		border: 0;
		box-shadow: none;
		transform: translateX(-100%);
		opacity: 1;
		transition: transform .28s cubic-bezier(.4, 0, .2, 1);
		z-index: 1000;
	}

	.tsh.is-open .tsh-catalog { transform: none; }

	.tsh-catalog__inner { height: 100%; padding: 0; display: flex; flex-direction: column; }

	.tsh-catalog__bar {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		height: 56px;
		padding: 0 12px;
		border-bottom: 1px solid var(--tsh-line);
		flex: none;
	}

	.tsh-catalog__title { text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

	.tsh-catalog__back {
		display: none;
		align-items: center;
		gap: 6px;
		color: var(--tsh-muted);
		font-size: 14px;
		cursor: pointer;
	}

	.tsh-catalog__back svg { width: 12px; height: 12px; fill: none; stroke: currentColor; }
	.tsh-catalog.is-sub .tsh-catalog__back { display: inline-flex; }

	.tsh-catalog__close {
		justify-self: end;
		width: 38px;
		height: 38px;
		padding: 8px;
		border: 0;
		border-radius: 50%;
		background: var(--tsh-dark-2);
		color: var(--tsh-text);
		cursor: pointer;
	}

	.tsh-catalog__close svg { fill: none; stroke: currentColor; }

	.tsh-catalog__body {
		position: relative;
		display: block;
		flex: 1 1 auto;
		max-height: none;
		padding: 0;
		overflow: hidden;
	}

	.tsh-lvl1 {
		height: 100%;
		padding: 8px 12px 40px;
		border: 0;
		-webkit-overflow-scrolling: touch;
	}

	.tsh-lvl1__link {
		padding: 15px 14px;
		font-size: 16px;
		color: #fff;
		border-bottom: 1px solid var(--tsh-line);
		border-radius: 0;
	}

	.tsh-lvl1__item.is-active .tsh-lvl1__link { background: none; color: #fff; }
	.tsh-lvl1__link svg { width: 13px; height: 13px; opacity: .5; }

	.tsh-panels {
		position: absolute;
		inset: 0;
		background: var(--tsh-dark);
		padding: 8px 12px 40px;
		transform: translateX(100%);
		transition: transform .28s cubic-bezier(.4, 0, .2, 1);
		-webkit-overflow-scrolling: touch;
	}

	.tsh-catalog.is-sub .tsh-panels { transform: none; }

	.tsh-panel__all { display: flex; padding: 6px 2px 14px; margin: 0 0 6px; border-bottom: 1px solid var(--tsh-line); }

	.tsh-panel__cols { columns: 1; }
	.tsh-panel.has-media.is-active { display: block; }
	.tsh-panel__media { display: none; }
	.tsh-col { margin-bottom: 6px; border-bottom: 1px solid var(--tsh-line); padding-bottom: 10px; }
	.tsh-col__title { font-size: 16px; padding: 10px 2px 4px; margin: 0; }
	.tsh-col__list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 2px 8px; }

	.tsh-col__list a {
		padding: 7px 12px;
		border-radius: 999px;
		background: var(--tsh-dark-2);
		color: #d7d8dc;
		font-size: 13px;
	}

	.tsh-col__list a:hover { transform: none; }

	.tsh-catalog__foot {
		display: flex;
		flex-wrap: wrap;
		gap: 8px 18px;
		flex: none;
		padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--tsh-line);
		background: var(--tsh-dark-2);
	}

	.tsh-catalog__foot a { color: var(--tsh-muted); font-size: 13.5px; }
	.tsh-catalog__cur { flex-basis: 100%; margin-top: 2px; }

	.tsh-overlay { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.tsh *,
	.tsh-catalog,
	.tsh-panels { transition: none !important; animation: none !important; }
}

/* Счётчик избранного (если включён в настройках) */
.tsh-tool--wish { position: relative; }
.tsh-tool--wish .wishlist_products_counter_number {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--tsh-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}
.tsh-tool--wish .wishlist_products_counter_text { display: none; }

/* Фолбэк-корзина (когда Side Cart выключен) */
.tsh-cart-fallback { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: inherit; }
.tsh-cart-fallback svg { fill: none; stroke: currentColor; }
.tsh-cart-fallback__n {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--tsh-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}
