/*
 * Matches steeltrackae.com (Hello Elementor). Colours come from the site's Elementor global settings when present;
 * sizes and fonts follow the site's About page. Fallbacks are the values used on the live site.
 */

.sts-shop,
body.sts-single {
	--sts-red: var(--e-global-color-primary, #ea2227);
	--sts-navy: var(--e-global-color-secondary, #243169);
	--sts-ink: #333;
	--sts-text: var(--e-global-color-text, #4d5b68);
	--sts-muted: #7c8693;
	--sts-line: #e4e7ee;
	--sts-line-strong: #c9cfdb;
	--sts-soft: #f7f8fa;
	--sts-font: var(--e-global-typography-text-font-family, "Montserrat"), "Montserrat", sans-serif;
	/* The site's large headings use the system font stack (Hello Elementor's default) at weight 300. */
	--sts-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--sts-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M313.9 216H12c-6.6 0-12 5.4-12 12v56c0 6.6 5.4 12 12 12h301.9v46.1c0 21.4 25.9 32.1 41 17l86.1-86.1c9.4-9.4 9.4-24.6 0-33.9l-86.1-86.1c-15.1-15.1-41-4.4-41 17V216z'/%3E%3C/svg%3E");
}

.sts-shop {
	box-sizing: border-box;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 72px 0 100px;
	color: var(--sts-ink);
	font-family: var(--sts-font);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.5625;
	letter-spacing: 0.5px;
}

.sts-shop *,
.sts-shop *::before,
.sts-shop *::after {
	box-sizing: inherit;
}

.sts-shop a {
	color: inherit;
}

/* Doubled class: Hello Elementor underlines links inside .page-content with the same specificity. */
.sts-shop.sts-shop a {
	text-decoration: none;
}

.sts-shop h1,
.sts-shop h2,
.sts-shop h3,
.sts-shop p,
.sts-shop ul {
	margin: 0;
	padding: 0;
}

.sts-shop ul {
	list-style: none;
}

.sts-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.sts-shop :focus-visible {
	outline: 2px solid var(--sts-navy);
	outline-offset: 2px;
}

/* Section width follows the site's header and footer: 1400px content, 40px side padding (20px on phones). */
body.sts-shop-page:not([class*="elementor-page-"]) .site-main,
body.sts-single:not([class*="elementor-page-"]) .site-main {
	max-width: 1480px;
	padding-inline: 40px;
}

@media (max-width: 767px) {
	body.sts-shop-page:not([class*="elementor-page-"]) .site-main,
	body.sts-single:not([class*="elementor-page-"]) .site-main {
		padding-inline: 20px;
	}
}

/* Hello Elementor pulls .alignwide blocks out by -80px on each side, which overflows the screen. */
.theme-hello-elementor .alignwide:has(.sts-shop) {
	margin-right: 0;
	margin-left: 0;
}

/* Section heading: eyebrow + title, centred like the site's inner pages */

.sts-intro {
	max-width: 820px;
	margin: 0 auto 64px;
	text-align: center;
}

.sts-shop .sts-eyebrow,
.sts-shop .sts-sidebar-title {
	color: var(--sts-navy);
	font-family: var(--sts-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.sts-shop .sts-heading {
	margin-top: 16px;
	color: var(--sts-navy);
	font-family: var(--sts-display);
	font-size: 50px;
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.sts-shop .sts-lead {
	margin-top: 18px;
	letter-spacing: 1px;
}

/* Search */

.sts-search {
	position: relative;
	display: flex;
	max-width: 680px;
	margin: 36px auto 0;
}

.sts-search-icon {
	position: absolute;
	top: 50%;
	left: 22px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	fill: none;
	stroke: var(--sts-navy);
	stroke-width: 1.75;
	stroke-linecap: round;
	pointer-events: none;
}

.sts-shop .sts-search input[type="search"] {
	flex: 1;
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 22px 0 56px;
	border: 1px solid var(--sts-line-strong);
	border-radius: 0;
	background: #fff;
	color: var(--sts-ink);
	font-family: var(--sts-font);
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 1px;
	box-shadow: none;
	transition: border-color 0.3s, box-shadow 0.3s;
	-webkit-appearance: none;
	appearance: none;
}

.sts-shop .sts-search input[type="search"]::placeholder {
	color: var(--sts-muted);
	opacity: 1;
}

.sts-shop .sts-search input[type="search"]:focus {
	border-color: var(--sts-navy);
	outline: none;
	box-shadow: 0 0 0 3px rgba(36, 49, 105, 0.12);
}

.sts-shop .sts-search-submit,
.sts-shop .sts-search-submit:hover,
.sts-shop .sts-search-submit:focus {
	height: 58px;
	margin: 0 0 0 -1px;
	padding: 0 32px;
	border: 0;
	border-radius: 0;
	background: var(--sts-navy);
	color: #fff;
	font-family: var(--sts-font);
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
}

.sts-js .sts-search-submit {
	display: none;
}

/* Layout */

.sts-body {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	gap: 60px;
	align-items: start;
}

/* Categories */

.sts-sidebar {
	position: sticky;
	top: 32px;
}

.sts-shop .sts-sidebar-title {
	margin: 0 0 12px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--sts-line);
	font-size: 14px;
}

.sts-cats {
	display: flex;
	flex-direction: column;
}

.sts-shop .sts-cat > a {
	position: relative;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0 9px 16px;
	color: var(--sts-ink);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.45;
	letter-spacing: 0.5px;
	transition: color 0.3s;
}

.sts-shop .sts-cat > a::before {
	content: "";
	position: absolute;
	top: 9px;
	bottom: 9px;
	left: 0;
	width: 2px;
	background: transparent;
	transition: background-color 0.3s;
}

.sts-shop .sts-cat > a:hover {
	color: var(--sts-red);
}

.sts-shop .sts-cat.is-active > a {
	color: var(--sts-navy);
	font-weight: 500;
}

.sts-shop .sts-cat.is-active > a::before {
	background: var(--sts-red);
}

.sts-cat-count {
	flex: none;
	color: var(--sts-muted);
	font-size: 14px;
	font-weight: 300;
	font-variant-numeric: tabular-nums;
}

.sts-cats-sub {
	margin-left: 16px;
}

/* Results */

.sts-results-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--sts-line);
}

.sts-shop .sts-title {
	color: var(--sts-navy);
	font-family: var(--sts-display);
	font-size: 34px;
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.sts-shop .sts-count {
	margin-top: 6px;
	color: var(--sts-text);
	font-size: 15px;
	letter-spacing: 1px;
}

.sts-shop .sts-clear {
	flex: none;
	color: var(--sts-navy);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 2px;
	text-transform: uppercase;
	border-bottom: 1px solid currentColor;
	transition: color 0.3s;
}

.sts-shop .sts-clear:hover {
	color: var(--sts-red);
}

.sts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 28px;
	transition: opacity 0.2s;
}

.sts-results[aria-busy="true"] .sts-grid,
.sts-results[aria-busy="true"] .sts-empty {
	opacity: 0.45;
}

/* Product card */

.sts-shop .sts-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--sts-line);
	background: #fff;
	transition: border-color 0.3s, box-shadow 0.3s;
}

.sts-shop .sts-card-link:hover {
	border-color: transparent;
	box-shadow: 0 10px 34px rgba(0, 26, 61, 0.1);
}

.sts-card-media {
	aspect-ratio: 1 / 1;
	padding: 24px;
	overflow: hidden;
	background: #fff;
}

.sts-shop .sts-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transition: transform 0.5s;
}

.sts-card-link:hover .sts-card-media img {
	transform: scale(1.04);
}

.sts-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 20px 22px 22px;
	border-top: 1px solid var(--sts-line);
}

.sts-card-cat {
	color: var(--sts-text);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.sts-shop .sts-card-title {
	display: -webkit-box;
	overflow: hidden;
	color: var(--sts-navy);
	font-family: var(--sts-font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: 0.3px;
	text-transform: none;
	transition: color 0.3s;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sts-card-link:hover .sts-card-title {
	color: var(--sts-red);
}

.sts-card-sku {
	margin-top: auto;
	padding-top: 6px;
	color: var(--sts-muted);
	font-size: 14px;
	letter-spacing: 1px;
	font-variant-numeric: tabular-nums;
}

/* Empty state */

.sts-empty {
	padding: 72px 24px;
	background: var(--sts-soft);
	text-align: center;
}

.sts-shop .sts-empty p:first-child {
	color: var(--sts-navy);
	font-family: var(--sts-display);
	font-size: 28px;
	font-weight: 300;
}

.sts-shop .sts-empty p + p {
	margin-top: 8px;
	letter-spacing: 1px;
}

/* Buttons: the site's style — Montserrat 16px/300, 2px tracking, 15px 40px, square, long arrow */

.sts-shop .sts-button {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-top: 28px;
	padding: 15px 40px;
	border: 1px solid var(--sts-navy);
	background: var(--sts-navy);
	color: #fff;
	font-size: 16px;
	font-weight: 300;
	line-height: 24px;
	letter-spacing: 2px;
	text-transform: uppercase;
	transition: all 0.3s ease-in-out;
}

.sts-shop .sts-button:hover {
	background: #fff;
	color: var(--sts-navy);
}

.sts-arrow {
	width: 18px;
	height: 10px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

/* Pagination */

.sts-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 56px;
}

.sts-page,
.sts-page-gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 0 14px;
	font-size: 16px;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.sts-shop a.sts-page {
	border: 1px solid var(--sts-line-strong);
	color: var(--sts-navy);
	transition: border-color 0.3s, color 0.3s;
}

.sts-shop a.sts-page:hover {
	border-color: var(--sts-red);
	color: var(--sts-red);
}

.sts-page.is-current {
	border: 1px solid var(--sts-navy);
	background: var(--sts-navy);
	color: #fff;
}

.sts-page-gap {
	min-width: 20px;
	padding: 0;
	color: var(--sts-muted);
}

/* Tablet */

@media (max-width: 1024px) {
	.sts-body {
		grid-template-columns: 230px minmax(0, 1fr);
		gap: 40px;
	}

	.sts-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 20px;
	}
}

/* Mobile: categories become a swipeable row of chips */

@media (max-width: 800px) {
	.sts-shop {
		padding: 48px 0 64px;
	}

	.sts-intro {
		margin-bottom: 32px;
	}

	.sts-shop .sts-heading {
		font-size: 40px;
	}

	.sts-search {
		margin-top: 28px;
	}

	.sts-shop .sts-search input[type="search"],
	.sts-shop .sts-search-submit {
		height: 54px;
	}

	.sts-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.sts-sidebar {
		position: static;
	}

	.sts-shop .sts-sidebar-title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.sts-cats {
		flex-direction: row;
		gap: 8px;
		padding: 2px 0 6px;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.sts-cats::-webkit-scrollbar {
		display: none;
	}

	.sts-cats-sub {
		display: contents;
	}

	.sts-cat {
		display: contents;
	}

	.sts-shop .sts-cat > a {
		flex: none;
		gap: 8px;
		padding: 10px 18px;
		border: 1px solid var(--sts-line-strong);
		font-size: 15px;
		white-space: nowrap;
	}

	.sts-shop .sts-cat > a::before {
		display: none;
	}

	.sts-shop .sts-cat.is-active > a {
		border-color: var(--sts-navy);
		background: var(--sts-navy);
		color: #fff;
		font-weight: 400;
	}

	.sts-shop .sts-cat.is-active > a .sts-cat-count {
		color: rgba(255, 255, 255, 0.7);
	}

	.sts-results-head {
		margin-bottom: 20px;
		padding-bottom: 16px;
	}

	.sts-shop .sts-title {
		font-size: 28px;
	}

	.sts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.sts-card-media {
		padding: 12px;
	}

	.sts-card-body {
		gap: 4px;
		padding: 14px;
	}

	.sts-shop .sts-card-title {
		font-size: 15px;
	}

	.sts-card-cat {
		font-size: 11px;
		letter-spacing: 1px;
	}

	.sts-card-sku {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sts-shop * {
		transition: none !important;
	}
}
