/* Presentation only. PIXELFUX Core owns reference data, queries and sales rules. */
.pfx-references,
.pfx-reference-detail {
	--pfx-reference-border: var(--pfx-border);
	color: var(--pfx-dark);
	background: var(--pfx-white);
}

.pfx-references__container {
	width: min(100% - 2rem, var(--pfx-header-container));
	max-width: var(--pfx-header-container);
}

.pfx-references__header {
	padding-block: clamp(4.5rem, 9vw, 8rem) clamp(2rem, 4vw, 3.5rem);
}

.pfx-references__eyebrow {
	margin-bottom: 1.25rem;
	color: var(--pfx-red);
	font-size: 0.78rem;
	letter-spacing: 0.15em;
}

.pfx-references__header h1,
.pfx-reference-detail__header h1 {
	max-width: 18ch;
	font-size: clamp(2.8rem, 7vw, 6rem);
	line-height: 0.99;
}

.pfx-references__header > p:last-child,
.pfx-reference-detail__header > p {
	max-width: 60ch;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.pfx-references__filters {
	display: grid;
	gap: 1rem;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--pfx-reference-border);
	background: var(--pfx-gray);
}

.pfx-references__control {
	position: relative;
	display: block;
	min-width: 0;
}

.pfx-references__filters label span {
	margin-bottom: 0.5rem;
	color: var(--pfx-black);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.035em;
}

.pfx-references__filters input,
.pfx-references__filters select {
	width: 100%;
	min-height: 52px;
	padding: 0.8rem 1rem;
	border: 1px solid var(--pfx-reference-border);
	border-radius: 0;
	background: var(--pfx-white);
	box-shadow: none;
	color: var(--pfx-black);
	font: inherit;
	font-size: 0.95rem;
}

.pfx-references__filters input::placeholder { color: var(--pfx-muted); }

.pfx-references__filters input:focus,
.pfx-references__filters select:focus {
	border-color: var(--pfx-black);
	outline: 2px solid var(--pfx-red);
	outline-offset: 1px;
}

.pfx-references__control--select select {
	appearance: none;
	padding-right: 2.5rem;
}

.pfx-references__control--select::after {
	content: "";
	position: absolute;
	right: 1.15rem;
	bottom: 1.25rem;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid var(--pfx-black);
	border-bottom: 2px solid var(--pfx-black);
	transform: rotate(45deg);
	pointer-events: none;
}

.pfx-references__filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.pfx-references__filter-actions button { min-height: 52px; }
.pfx-references__filter-actions a { font-size: 0.9rem; font-weight: 700; }

.pfx-references__grid {
	display: grid;
	gap: 1.5rem;
	padding-bottom: 3rem;
}

.pfx-reference-card {
	--pfx-area-accent: var(--pfx-black);
	min-width: 0;
	border: 1px solid var(--pfx-reference-border);
	border-top: 4px solid var(--pfx-area-accent);
	background: var(--pfx-white);
}

.pfx-reference-card--patch { --pfx-area-accent: var(--pfx-red); }
.pfx-reference-card--solutions { --pfx-area-accent: var(--pfx-muted); }
.pfx-reference-card:hover,
.pfx-reference-card:focus-within { border-color: var(--pfx-area-accent); }

.pfx-reference-card__link {
	display: flex;
	min-height: 100%;
	flex-direction: column;
	color: var(--pfx-black);
	text-decoration: none;
}

.pfx-reference-card__link:hover,
.pfx-reference-card__link:focus-visible { color: var(--pfx-black); }

.pfx-reference-card__image {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--pfx-gray);
}

.pfx-reference-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pfx-reference-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(1.25rem, 2.5vw, 2rem);
}

.pfx-reference-card__category {
	margin-bottom: 0.9rem;
	color: var(--pfx-area-accent);
}

.pfx-reference-card__body h2 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 2vw, 2rem);
}

.pfx-reference-card__customer {
	margin-bottom: 0.75rem;
	font-weight: 700;
}

.pfx-reference-card__summary {
	margin-bottom: 1.5rem;
	color: var(--pfx-muted);
}

.pfx-reference-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid var(--pfx-reference-border);
	font-size: 0.8rem;
	font-weight: 800;
}

.pfx-reference-card__view { margin-left: auto; }
.pfx-reference-card:hover .pfx-reference-card__view { color: var(--pfx-red); }

.pfx-references__pagination {
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.pfx-references__pagination .page-numbers {
	display: grid;
	min-width: 44px;
	min-height: 44px;
	place-items: center;
	border: 1px solid var(--pfx-reference-border);
	text-decoration: none;
}

.pfx-references__pagination .current {
	border-color: var(--pfx-black);
	background: var(--pfx-black);
	color: var(--pfx-white);
}

.pfx-references__empty {
	margin-bottom: 4rem;
	padding: 3rem;
	border: 1px solid var(--pfx-reference-border);
	background: var(--pfx-gray);
}

.pfx-reference-detail { padding-block: clamp(2rem, 5vw, 5rem) 6rem; }
.pfx-reference-detail__header { padding-block: clamp(2rem, 5vw, 4rem); }
.pfx-reference-detail__layout { display: block; }
.pfx-reference-detail__media { margin-bottom: clamp(3rem, 7vw, 6rem); }

.pfx-reference-detail__featured {
	display: grid;
	min-height: 260px;
	place-items: center;
	border: 1px solid var(--pfx-reference-border);
	background: var(--pfx-gray);
}

.pfx-reference-detail__featured img {
	width: 100%;
	max-height: 680px;
	object-fit: contain;
}

.pfx-reference-detail__gallery {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-top: 1rem;
}

.pfx-reference-detail__gallery figure {
	border: 1px solid var(--pfx-reference-border);
	background: var(--pfx-gray);
}

.pfx-reference-detail__gallery img {
	width: 100%;
	height: auto;
}

.pfx-reference-detail__info { max-width: 920px; }
.pfx-reference-detail__customer { margin-bottom: 1.5rem; color: var(--pfx-black); font-size: 1.1rem; }
.pfx-reference-detail__description { max-width: 72ch; margin-block: 0 3rem; }

.pfx-reference-detail__facts { margin-bottom: 3rem; }
.pfx-reference-detail__facts div { display: grid; grid-template-columns: 1fr; gap: 0.25rem; padding-block: 1rem; }
.pfx-reference-detail__facts dt { color: var(--pfx-muted); font-size: 0.82rem; font-weight: 800; }
.pfx-reference-detail__facts dd { color: var(--pfx-black); }

.pfx-reference-detail__products {
	margin-top: 3rem;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border: 1px solid var(--pfx-reference-border);
	background: var(--pfx-gray);
}

.pfx-reference-detail__products h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.pfx-reference-detail__product { align-items: center; }
.pfx-reference-detail__product span { font-weight: 700; }

body .pfx-reference-detail__button {
	min-height: 48px;
	border-color: var(--pfx-black);
	background: var(--pfx-black);
	color: var(--pfx-white) !important;
}

body .pfx-reference-detail__button:hover {
	border-color: var(--pfx-red);
	background: var(--pfx-red);
	color: var(--pfx-white) !important;
}

@media (min-width: 640px) {
	.pfx-references__container { width: min(100% - 4rem, var(--pfx-header-container)); }
	.pfx-references__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pfx-references__filter-actions { grid-column: 1 / -1; }
	.pfx-references__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pfx-reference-detail__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pfx-reference-detail__facts div { grid-template-columns: minmax(11rem, 0.4fr) minmax(0, 1fr); gap: 1.5rem; }
}

@media (min-width: 1050px) {
	.pfx-references__filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.pfx-references__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pfx-reference-detail__gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
