/* WT Subcategory Loader — v2.0.0 */

/* ---------------------------------------------------------------
 * Crawlable pagination.
 * Visible by default (no-JS users and crawlers need it). The script
 * adds .wt-js to <html> and hides it once infinite scroll is live.
 * ------------------------------------------------------------- */
.wt-subcats-nav {
	margin: 2em 0 1em;
	text-align: center;
}

.wt-subcats-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wt-subcats-nav__list li { margin: 0; }

.wt-js .wt-subcats-nav {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------
 * Control bar under the grid: progress, button, errors
 * ------------------------------------------------------------- */
.wt-subcats-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 28px 0 8px;
	padding: 0 15px;
	text-align: center;
	min-height: 1px;
}

.wt-subcats-bar__count {
	font-size: 13px;
	letter-spacing: .02em;
	opacity: .65;
	margin: 0;
}

.wt-subcats-bar__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 26px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

.wt-subcats-bar__button:hover,
.wt-subcats-bar__button:focus-visible {
	background: currentColor;
}

.wt-subcats-bar__button:hover .wt-subcats-bar__button-label,
.wt-subcats-bar__button:focus-visible .wt-subcats-bar__button-label {
	color: #fff;
	mix-blend-mode: difference;
}

.wt-subcats-bar__button[disabled] {
	opacity: .45;
	cursor: default;
}

.wt-subcats-bar__error {
	font-size: 13px;
	color: #b3261e;
	margin: 0;
}

.wt-subcats-bar__error button {
	background: none;
	border: 0;
	padding: 0 0 0 6px;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.wt-subcats-bar__end {
	font-size: 13px;
	opacity: .5;
	margin: 0;
}

.wt-subcats-bar [hidden] { display: none !important; }

/* ---------------------------------------------------------------
 * Floating loader pill
 * ------------------------------------------------------------- */
.wt-subcats-loader {
	position: fixed;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%) translateY(8px);
	z-index: 999;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid rgba(0, 0, 0, .10);
	border-radius: 999px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .12);
	font-size: 13px;
	line-height: 1;
	color: rgba(0, 0, 0, .85);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.wt-subcats-loader.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.wt-subcats-spinner {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(0, 0, 0, .18);
	border-top-color: rgba(0, 0, 0, .7);
	border-radius: 50%;
	animation: wt-subcats-spin .7s linear infinite;
}

@keyframes wt-subcats-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
 * Skeleton tiles
 * ------------------------------------------------------------- */
.wt-skel { pointer-events: none; }

.wt-skel .box-image {
	min-height: 180px;
	border-radius: 4px;
	background: linear-gradient(90deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.10) 37%, rgba(0,0,0,.05) 63%);
	background-size: 400% 100%;
	animation: wt-subcats-shimmer 1.3s ease-in-out infinite;
}

.wt-skel .box-text-inner {
	width: 68%;
	height: 12px;
	margin: 12px auto 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .07);
}

@keyframes wt-subcats-shimmer {
	0%   { background-position: 100% 0; }
	100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wt-skel .box-image,
	.wt-subcats-spinner {
		animation: none;
	}
	.wt-subcats-loader { transition: none; }
}
