/*
 * Systems catalogue: landing page, section pages and the blocks the catalogue
 * adds to product pages. Written to sit next to the theme rather than override
 * it, hence the sh- prefix on everything.
 *
 * The look follows the subject: sections are drawn as technical illustrations on
 * a faint drawing grid, and every measured value is set in a monospaced face the
 * way it appears on a dimension sheet.
 */

.sh-catalog-page,
.sh-family,
.sh-filter {
	--sh-ink: #0f172a;
	--sh-text: #475569;
	--sh-muted: #64748b;
	--sh-faint: #94a3b8;
	--sh-line: #e2e8f0;
	--sh-hairline: #eef2f7;
	--sh-surface: #fff;
	--sh-tint: #f6f8fc;
	--sh-primary: #2b7fff;
	--sh-primary-dark: #1f6ae0;
	--sh-primary-soft: #eaf2ff;
	--sh-dim: #f4713a;
	--sh-radius: 16px;
	--sh-radius-lg: 22px;
	--sh-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.sh-catalog__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Breadcrumbs */

.sh-catalog__breadcrumb {
	padding: 18px 0 0;
}

.sh-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--sh-muted);
}

.sh-breadcrumb__item + .sh-breadcrumb__item::before {
	content: "/";
	margin-right: 8px;
	color: #cbd5e1;
}

.sh-breadcrumb__link {
	color: var(--sh-muted);
	text-decoration: none;
}

.sh-breadcrumb__link:hover,
.sh-breadcrumb__link:focus-visible {
	color: var(--sh-primary);
	text-decoration: underline;
}

.sh-breadcrumb__current {
	color: var(--sh-ink);
}

/* Hero */

.sh-hero {
	padding: 22px 0 8px;
}

.sh-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
}

.sh-eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.sh-eyebrow__level {
	color: var(--sh-primary);
}

.sh-eyebrow__parent {
	position: relative;
	padding-left: 14px;
	color: var(--sh-faint);
}

.sh-eyebrow__parent::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 6px;
	height: 1px;
	background: currentColor;
}

.sh-catalog__title {
	margin: 0 0 12px;
	font-size: clamp(30px, 3.4vw, 46px);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--sh-ink);
}

.sh-catalog__intro {
	margin: 0;
	max-width: 60ch;
	font-size: 16px;
	line-height: 1.6;
	color: var(--sh-text);
}

.sh-catalog__intro p {
	margin: 0 0 8px;
}

.sh-hero--plain {
	padding-bottom: 4px;
}

/* On a listing the head stands inside the container of the page and takes its
   width: a cap of its own would leave it narrower than the goods under it on a
   wide screen, and the two would not line up */
.sh-catalog-page--listing .sh-catalog__inner {
	max-width: none;
	padding: 0;
}

/* The filter and the goods bring their own space above them */
.sh-catalog-page--listing .sh-hero {
	padding-bottom: 0;
}

/* Facts: the numbers a fitter scans before clicking anything */

.sh-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 22px 0 0;
	padding: 0;
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius);
	background: var(--sh-surface);
	overflow: hidden;
}

.sh-facts__item {
	flex: 1 1 auto;
	min-width: 118px;
	padding: 14px 18px;
	border-right: 1px solid var(--sh-hairline);
}

.sh-facts__item--wide {
	flex: 2 1 200px;
}

.sh-facts__item:last-child {
	border-right: 0;
}

.sh-facts__label {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sh-faint);
}

.sh-facts__value {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--sh-ink);
}

.sh-facts__value--mono {
	font-family: var(--sh-mono);
	font-size: 17px;
	letter-spacing: -.02em;
}

.sh-facts__item--wide .sh-facts__value {
	font-size: 15px;
	font-weight: 600;
}

/* Hero drawing */

.sh-hero__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	border-radius: var(--sh-radius-lg);
	overflow: hidden;
}

.sh-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sh-hero__drawing {
	width: 100%;
	height: 100%;
}

/* Blocks */

.sh-block {
	padding: 34px 0 12px;
}

.sh-block--tint {
	margin-top: 26px;
	padding: 30px 0 38px;
	background: var(--sh-tint);
}

.sh-block__heading {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 700;
	color: var(--sh-ink);
}

.sh-catalog__empty {
	padding: 28px 0;
	color: var(--sh-muted);
}

/* Section cards */

.sh-nodes__item,
.sh-goods__item,
.sh-systems__item {
	display: flex;
}

.sh-nodes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
	gap: 18px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.sh-node {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--sh-surface);
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius);
	overflow: hidden;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sh-node:hover,
.sh-node:focus-within {
	border-color: #bcd6ff;
	box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
	transform: translateY(-2px);
}

.sh-node__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 7;
}

.sh-node__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sh-node__drawing {
	width: 76px;
	height: 76px;
}

.sh-node__cover {
	width: 100%;
	height: 100%;
}

.sh-node__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 14px;
}

.sh-node__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
}

.sh-node__link {
	color: var(--sh-ink);
	text-decoration: none;
}

.sh-node__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sh-node__link:hover,
.sh-node__link:focus-visible {
	color: var(--sh-primary);
}

.sh-node__teaser {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--sh-text);
}

.sh-node__ranges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 2px 0 0;
}

.sh-node__range-label {
	margin: 0;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--sh-faint);
}

.sh-node__range-value {
	margin: 0;
	font-family: var(--sh-mono);
	font-size: 14px;
	font-weight: 700;
	color: var(--sh-ink);
}

.sh-node__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}

.sh-node__chip {
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--sh-tint);
	color: var(--sh-muted);
	font-size: 12px;
	line-height: 1.4;
}

.sh-node__chip--more {
	font-family: var(--sh-mono);
	color: var(--sh-faint);
}

.sh-node__foot {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: auto 0 0;
	padding-top: 8px;
	font-size: 13px;
	color: var(--sh-muted);
}

.sh-node__count {
	font-family: var(--sh-mono);
	font-size: 12.5px;
}

.sh-node__go {
	color: var(--sh-primary);
	font-weight: 600;
}

/* System cards on the landing page */

.sh-systems {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sh-system {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--sh-surface);
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius-lg);
	overflow: hidden;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sh-system:hover,
.sh-system:focus-within {
	border-color: #bcd6ff;
	box-shadow: 0 18px 36px rgba(15, 23, 42, .1);
	transform: translateY(-2px);
}

.sh-system__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 8;
}

.sh-system__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sh-system__drawing {
	width: 100%;
	height: 100%;
}

.sh-system__ranges {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sh-system__range {
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .88);
	box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.sh-system__range-label {
	display: block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sh-faint);
}

.sh-system__range-value {
	display: block;
	font-family: var(--sh-mono);
	font-size: 14px;
	font-weight: 700;
	color: var(--sh-ink);
}

.sh-system__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 18px;
}

.sh-system__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 700;
}

.sh-system__link {
	color: var(--sh-ink);
	text-decoration: none;
}

.sh-system__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.sh-system__link:hover,
.sh-system__link:focus-visible {
	color: var(--sh-primary);
}

.sh-system__teaser {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--sh-text);
}

.sh-system__label {
	margin: 6px 0 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sh-faint);
}

.sh-system__sections {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sh-system__section {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 10px;
	border-radius: 10px;
	color: var(--sh-ink);
	font-size: 14px;
	text-decoration: none;
	transition: background .16s ease;
}

.sh-system__section:hover,
.sh-system__section:focus-visible {
	background: var(--sh-primary-soft);
}

.sh-system__section-icon {
	display: flex;
	flex: 0 0 auto;
	color: var(--sh-faint);
}

.sh-system__section-name {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
}

.sh-system__section-count {
	font-family: var(--sh-mono);
	font-size: 12px;
	color: var(--sh-faint);
}

.sh-system__foot {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: auto 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--sh-hairline);
	font-size: 13px;
	color: var(--sh-muted);
}

.sh-system__count {
	font-family: var(--sh-mono);
}

.sh-system__more {
	position: relative;
	z-index: 1;
	color: var(--sh-primary);
	font-weight: 600;
	text-decoration: none;
}

.sh-system__more:hover,
.sh-system__more:focus-visible {
	text-decoration: underline;
}

/* Drawing fields. Colour drives currentColor inside the drawings, so one
   drawing serves every family. */

.sh-icon-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.sh-cover--drain    { background: linear-gradient(135deg, #eef1f6 0%, #dde3ec 100%); color: #4c5f78; }
.sh-cover--supply   { background: linear-gradient(135deg, #e9f2ff 0%, #d3e4ff 100%); color: #2668c8; }
.sh-cover--pipes    { background: linear-gradient(135deg, #eaf4fb 0%, #d5e8f6 100%); color: #2b7aae; }
.sh-cover--fittings { background: linear-gradient(135deg, #f1f0fc 0%, #e1dff6 100%); color: #5b51ac; }
.sh-cover--frame    { background: linear-gradient(135deg, #eff6ed 0%, #dfead9 100%); color: #547b3f; }
.sh-cover--plate    { background: linear-gradient(135deg, #fcf4ea 0%, #f4e5d1 100%); color: #a06d2c; }
.sh-cover--plate-small { background: linear-gradient(135deg, #fbf1f0 0%, #f3ddd9 100%); color: #a55842; }
.sh-cover--plate-bar   { background: linear-gradient(135deg, #f7f2ec 0%, #ebe0d3 100%); color: #7d6644; }
.sh-cover--mount    { background: linear-gradient(135deg, #f8eef1 0%, #eddce2 100%); color: #9c4763; }
.sh-cover--press    { background: linear-gradient(135deg, #eaf7f3 0%, #d5ece4 100%); color: #2a8571; }
.sh-cover--silent   { background: linear-gradient(135deg, #eef0fa 0%, #dcdff2 100%); color: #4b53a0; }
.sh-cover--outdoor  { background: linear-gradient(135deg, #fbf2e8 0%, #f2e2cd 100%); color: #96652a; }
.sh-cover--weld     { background: linear-gradient(135deg, #e9f6f7 0%, #d3eaed 100%); color: #22798a; }
.sh-cover--ppr      { background: linear-gradient(135deg, #f3f5e9 0%, #e5e9d1 100%); color: #6e7a35; }

.sh-cover__dim {
	stroke: var(--sh-dim);
}

/* Focus, motion */

.sh-catalog-page a:focus-visible,
.sh-filter a:focus-visible {
	outline: 2px solid var(--sh-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (max-width: 991px) {
	.sh-hero__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.sh-hero__media {
		order: -1;
		aspect-ratio: 16 / 8;
	}
}

@media (max-width: 575px) {
	.sh-systems {
		grid-template-columns: 1fr;
	}

	.sh-nodes {
		grid-template-columns: 1fr;
	}

	.sh-goods {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.sh-facts__item {
		min-width: 50%;
		border-bottom: 1px solid var(--sh-hairline);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sh-node,
	.sh-system,
	.sh-good,
	.sh-system__section {
		transition: none;
	}

	.sh-node:hover,
	.sh-system:hover {
		transform: none;
	}
}

/* Shared helper */

.sh-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Sidebar filter of a catalogue section */

.sh-filter-column {
	align-self: flex-start;
}

.sh-filter {
	padding: 18px;
	background: var(--sh-surface);
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius);
}

.sh-filter__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sh-hairline);
}

.sh-filter__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--sh-ink);
}

.sh-filter__head-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sh-filter__reset {
	color: var(--sh-muted);
	font-size: 13px;
	text-decoration: none;
}

.sh-filter__reset:hover,
.sh-filter__reset:focus-visible {
	color: var(--sh-primary);
	text-decoration: underline;
}

.sh-filter__close {
	display: none;
	padding: 4px;
	border: 0;
	background: none;
	color: var(--sh-muted);
	cursor: pointer;
}

.sh-filter__section {
	border-bottom: 1px solid var(--sh-hairline);
}

.sh-filter__section:last-of-type {
	border-bottom: 0;
}

.sh-filter__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 13px 0;
	border: 0;
	background: none;
	color: var(--sh-ink);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.sh-filter__chevron {
	flex: 0 0 auto;
	color: var(--sh-faint);
	transition: transform .18s ease;
}

.sh-filter__section.is-open .sh-filter__chevron {
	transform: rotate(180deg);
}

.sh-filter__section-body {
	display: none;
	padding-bottom: 14px;
}

.sh-filter__section.is-open .sh-filter__section-body {
	display: block;
}

.sh-filter__section-body--plain {
	display: block;
	padding: 13px 0;
}

.sh-filter__values {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sh-filter__values--scroll {
	max-height: 264px;
	overflow-y: auto;
}

.sh-filter__option {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 2px;
	color: var(--sh-text);
	font-size: 14px;
	cursor: pointer;
}

.sh-filter__option:hover {
	color: var(--sh-ink);
}

.sh-filter__checkbox {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	accent-color: var(--sh-primary);
}

.sh-filter__option-text {
	flex: 1 1 auto;
}

.sh-filter__option-count {
	font-family: var(--sh-mono);
	font-size: 12px;
	color: var(--sh-faint);
}

.sh-filter__price {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sh-filter__price-field {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	gap: 4px;
	min-width: 0;
	padding: 7px 10px;
	border: 1px solid var(--sh-line);
	border-radius: 10px;
}

.sh-filter__price-field:focus-within {
	border-color: var(--sh-primary);
}

.sh-filter__price-prefix {
	color: var(--sh-faint);
	font-size: 13px;
}

.sh-filter__price-field input {
	width: 100%;
	min-width: 0;
	border: 0;
	background: none;
	color: var(--sh-ink);
	font-size: 14px;
	outline: none;
}

.sh-filter__price-dash {
	flex: 0 0 8px;
	height: 1px;
	background: var(--sh-line);
}

.sh-filter__actions {
	padding-top: 14px;
	border-top: 1px solid var(--sh-hairline);
}

.sh-filter__submit {
	width: 100%;
	padding: 11px 18px;
	border: 0;
	border-radius: 10px;
	background: var(--sh-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.sh-filter__submit:hover,
.sh-filter__submit:focus-visible {
	background: var(--sh-primary-dark);
}

/* Mobile drawer */

.sh-filter-fab {
	display: none;
	/* Bottom left: the support bubble of the theme already sits on the right */
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 950;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--sh-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(43, 127, 255, .35);
	cursor: pointer;
}

.sh-filter-fab__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #fff;
	color: var(--sh-primary);
	font-family: var(--sh-mono);
	font-size: 12px;
	font-weight: 700;
}

.sh-filter-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1040;
	background: rgba(15, 23, 42, .45);
}

@media (max-width: 1199px) {
	/* The theme hides the left column below this width, and the drawer lives
	   inside it, so the column stays in the flow with no size of its own */
	aside#column-left.sh-filter-column {
		display: block !important;
		width: 0 !important;
		max-width: none !important;
		flex: 0 0 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		position: static !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.sh-filter-fab {
		display: inline-flex;
	}

	.sh-filter__close {
		display: block;
	}

	.sh-filter {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1050;
		max-height: 86vh;
		overflow-y: auto;
		border-radius: 18px 18px 0 0;
		transform: translateY(100%);
		transition: transform .22s ease;
	}

	.sh-filter.is-open {
		transform: translateY(0);
	}

	body.sh-filter-locked {
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sh-filter,
	.sh-filter__chevron {
		transition: none;
	}
}
