/* Products: catalogue (archive, category, search) and product detail. Card base styles are in components.css. */

/* ---------- Page head ---------- */

.gp-products-page > *,
.gp-product-page > * {
	margin-block: 0;
}

/* ---------- Catalogue ---------- */

.gp-catalog {
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--80);
}

.gp-catalog > * + * {
	margin-top: var(--wp--preset--spacing--50);
}

.gp-catnav ul {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 0 0 0.25rem;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
}

.gp-catnav li {
	flex: none;
	max-width: none;
}

.gp-catnav a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.4rem 1rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color var(--wp--custom--motion--fast) ease, background-color var(--wp--custom--motion--fast) ease;
}

.gp-catnav a:hover {
	border-color: var(--wp--preset--color--indigo);
}

.gp-catnav a[aria-current="page"] {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.gp-catnav__count {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	font-weight: 500;
	opacity: 0.7;
}

.gp-filters {
	display: grid;
	gap: 0.85rem 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
	align-items: end;
	padding: 1.25rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--raised);
}

@media (min-width: 64em) {
	.gp-filters {
		grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto;
	}
}

/* Phones: search on its own row, the three menus and the button two per row. */
@media (max-width: 39.99em) {
	.gp-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 1rem;
	}

	.gp-field--search {
		grid-column: 1 / -1;
	}
}

.gp-field {
	display: grid;
	gap: 0.35rem;
}

.gp-field label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gp-field :where(input, select) {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--wp--preset--color--metal);
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text);
	font: inherit;
	font-size: 1rem;
}

.gp-field :where(input, select):hover {
	border-color: var(--wp--preset--color--steel);
}

.gp-filters__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.gp-filters__actions button {
	min-height: 46px;
	cursor: pointer;
	border: 0;
}

.gp-filters__clear {
	font-weight: 600;
	color: var(--wp--preset--color--indigo);
}

.gp-catalog__featured h2,
.gp-catalog__bar h2 {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-3);
}

.gp-catalog__featured {
	padding-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.gp-catalog__featured h2 {
	margin-bottom: 1.25rem;
}

.gp-catalog__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
	margin-bottom: 1.25rem;
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--rule);
}

.gp-catalog__count {
	margin: 0;
	color: var(--wp--preset--color--steel);
	font-size: var(--wp--preset--font-size--small);
}

/* Catalogue cards: horizontal on phones (image beside text), stacked from 40em. */
.gp-products--grid {
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 40em) {
	.gp-products--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem 1.25rem;
	}
}

@media (min-width: 64em) {
	.gp-products--grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 80em) {
	.gp-products--grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.gp-product--full .gp-product__link {
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--white);
	transition: border-color var(--wp--custom--motion--base) ease, box-shadow var(--wp--custom--motion--base) ease;
}

.gp-product--full .gp-product__link:hover {
	border-color: var(--wp--preset--color--metal);
	box-shadow: var(--wp--preset--shadow--raised);
}

@media (max-width: 39.99em) {
	.gp-product--full .gp-product__link {
		grid-template-columns: 7.5rem minmax(0, 1fr);
		grid-template-rows: auto;
		gap: 0.9rem;
		align-items: start;
	}

	.gp-product--full .gp-product__body {
		padding: 0.15rem 0 0;
	}

	.gp-product--full .gp-product__summary {
		display: none;
	}
}

.gp-product__summary {
	margin: 0.6rem 0 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--wp--preset--color--steel);
}

.gp-product__cta {
	margin-top: 0.75rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--indigo);
}

.gp-product__cta::after {
	content: "";
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.4em;
	border: solid currentColor;
	border-width: 2px 2px 0 0;
	transform: translateY(-0.1em) rotate(45deg);
	transition: translate var(--wp--custom--motion--fast) ease;
}

.gp-product__link:hover .gp-product__cta::after {
	translate: 3px 0;
}

.gp-empty {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	border: 1px dashed var(--wp--preset--color--metal);
	border-radius: var(--wp--custom--radius--medium);
	text-align: center;
}

.gp-empty > * {
	margin-inline: auto;
}

.gp-empty__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gp-empty--inline {
	padding: 1.5rem;
	text-align: left;
}

.gp-empty--inline > * {
	margin-inline: 0;
}

/* ---------- Product detail ---------- */

.gp-pd {
	padding-top: var(--wp--preset--spacing--40);
}

.gp-pd__top {
	display: grid;
	gap: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--70);
}

@media (min-width: 60em) {
	.gp-pd__top {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--wp--preset--spacing--70);
		align-items: start;
	}

	.gp-pd__gallery {
		position: sticky;
		top: calc(var(--gp-header-h) + 1.5rem);
	}
}

.gp-pd__stage {
	margin: 0;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--large);
	background: radial-gradient(110% 85% at 50% 18%, #FFFFFF 0%, var(--wp--preset--color--surface) 72%);
	border: 1px solid var(--wp--preset--color--rule);
	overflow: hidden;
}

.gp-pd__stage img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.gp-pd__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.gp-pd__thumbs button {
	display: block;
	width: 4.5rem;
	height: 4.5rem;
	padding: 0.2rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--surface);
	cursor: pointer;
}

.gp-pd__thumbs button[aria-pressed="true"] {
	border-color: var(--wp--preset--color--indigo);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--indigo);
}

.gp-pd__thumbs img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.gp-pd__summary > * {
	margin-block: 0;
}

.gp-pd__summary > * + * {
	margin-top: 1.25rem;
}

.gp-pd__cat {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
}

.gp-pd__cat a {
	color: var(--wp--preset--color--indigo);
	text-decoration: none;
}

.gp-pd__cat span {
	padding: 0.1rem 0.55rem;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--ink);
	font-size: 0.875rem;
}

.gp-pd__title {
	margin-top: 0.5rem !important;
	font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0;
}

/* Key figures echo the spec plate: large Saira values on hairline cells. */
.gp-pd__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	margin: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.gp-pd__facts > div {
	padding: 0.9rem 1rem 1rem 0;
}

.gp-pd__facts > div + div {
	padding-left: 1rem;
	border-left: 1px solid var(--wp--preset--color--rule);
}

.gp-pd__facts dt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel);
}

.gp-pd__facts dd {
	margin: 0.15rem 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
	font-weight: 700;
	font-stretch: 112%;
	line-height: 1.1;
	color: var(--wp--preset--color--ink);
}

.gp-pd__lead {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.6;
}

.gp-pd__label {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--steel);
}

.gp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gp-chips li {
	max-width: none;
	padding: 0.25rem 0.65rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--pill);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

.gp-chips .gp-chips__more {
	border-style: dashed;
}

.gp-pd__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	padding-top: 0.5rem;
}

.gp-pd__actions .wp-element-button {
	text-decoration: none;
}

.gp-doc-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0.55rem 1rem;
	border: 1.5px solid var(--wp--preset--color--indigo);
	border-radius: var(--wp--custom--radius--small);
	color: var(--wp--preset--color--indigo);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	text-decoration: none;
}

.gp-doc-link span {
	padding: 0 0.3rem;
	border-radius: 3px;
	background: var(--wp--preset--color--indigo);
	color: var(--wp--preset--color--white);
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
}

.gp-doc-link:hover {
	background: rgb(56 57 141 / 0.08);
}

/* In-page navigation sticks below the header. */
.gp-pd__toc {
	position: sticky;
	top: var(--gp-header-h);
	z-index: 10;
	background: rgb(255 255 255 / 0.96);
	border-block: 1px solid var(--wp--preset--color--rule);
}

.admin-bar .gp-pd__toc {
	top: calc(var(--gp-header-h) + var(--wp-admin--admin-bar--height, 0px));
}

.gp-pd__toc ul {
	display: flex;
	gap: 0.25rem 1.5rem;
	margin-block: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.gp-pd__toc li {
	flex: none;
	max-width: none;
}

.gp-pd__toc a {
	display: block;
	padding-block: 0.85rem;
	color: var(--wp--preset--color--steel);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.gp-pd__toc a:hover {
	color: var(--wp--preset--color--indigo);
}

.gp-pd__body {
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Data sheet layout: heading in a left column, content on the right. */
.gp-pd__section {
	display: grid;
	gap: 0.75rem 2rem;
	padding-block: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--rule);
	scroll-margin-top: calc(var(--gp-header-h) + 4rem);
}

.gp-pd__section:first-child {
	border-top: 0;
}

.gp-pd__section > * {
	margin-block: 0;
	grid-column: 1 / -1;
}

@media (min-width: 60em) {
	.gp-pd__section {
		grid-template-columns: 15rem minmax(0, 1fr);
	}

	.gp-pd__section > * {
		grid-column: 2;
	}

	.gp-pd__section > h2 {
		grid-column: 1;
		grid-row: 1 / span 4;
	}
}

.gp-pd__section h2 {
	font-size: var(--wp--preset--font-size--heading-3);
}

.gp-pd__prose {
	color: var(--wp--preset--color--text);
	max-width: 68ch;
}

.gp-ticks {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gp-ticks--cols {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
}

.gp-ticks li {
	position: relative;
	padding-left: 1.75rem;
}

.gp-ticks li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.45em;
	width: 0.7rem;
	height: 0.4rem;
	border: solid var(--wp--preset--color--indigo);
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}

.gp-standards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gp-standards li {
	max-width: none;
	padding: 0.7rem 0.9rem;
	border-left: 3px solid var(--wp--preset--color--indigo);
	background: var(--wp--preset--color--surface);
	border-radius: 0 var(--wp--custom--radius--small) var(--wp--custom--radius--small) 0;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* Typical properties table. */
.gp-table {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--medium);
}

.gp-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.gp-table caption {
	padding: 0.85rem 1rem;
	text-align: left;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel);
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.gp-table th,
.gp-table td {
	padding: 0.7rem 1rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.gp-table thead th {
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gp-table tbody tr:last-child > * {
	border-bottom: 0;
}

.gp-table tbody th {
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

.gp-table td[data-label] {
	color: var(--wp--preset--color--steel);
	white-space: nowrap;
}

.gp-table__result {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--ink);
	text-align: right !important;
	white-space: nowrap;
}

.gp-table thead th:last-child {
	text-align: right;
}

/* Phones: each row becomes a small block, so nothing is clipped or needs sideways scrolling. */
@media (max-width: 39.99em) {
	.gp-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.gp-table tbody tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.15rem 1rem;
		padding: 0.7rem 0.9rem;
		border-bottom: 1px solid var(--wp--preset--color--rule);
	}

	.gp-table tbody tr:last-child {
		border-bottom: 0;
	}

	.gp-table tbody :where(th, td) {
		padding: 0;
		border: 0;
	}

	.gp-table td[data-label] {
		grid-column: 1;
		grid-row: 2;
		font-size: 0.8125rem;
		white-space: normal;
	}

	.gp-table__result {
		grid-column: 2;
		grid-row: 1 / span 2;
		align-self: center;
	}
}

.gp-pd__note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel);
}

.gp-specs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
	margin: 0;
	border-top: 1px solid var(--wp--preset--color--rule);
}

.gp-specs > div {
	padding: 0.85rem 1rem 0.85rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

.gp-specs dt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel);
}

.gp-specs dd {
	margin: 0.1rem 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gp-packshots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(45%, 9.5rem), 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gp-packshots li {
	max-width: none;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}

.gp-packshots img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.gp-docs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gp-docs li {
	max-width: none;
}

.gp-docs__link {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	gap: 0.1rem 1rem;
	align-items: center;
	padding: 1rem 1.15rem;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--wp--custom--radius--medium);
	color: inherit;
	text-decoration: none;
	transition: border-color var(--wp--custom--motion--fast) ease, box-shadow var(--wp--custom--motion--fast) ease;
}

.gp-docs__link:hover {
	border-color: var(--wp--preset--color--indigo);
	box-shadow: var(--wp--preset--shadow--raised);
}

.gp-docs__type {
	grid-row: span 2;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3.5rem;
	border-radius: 4px 12px 4px 4px;
	background: var(--wp--preset--color--indigo);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.gp-docs__name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.gp-docs__meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--steel);
}

.gp-pd__related {
	padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--80);
	background: var(--wp--preset--color--surface);
}

.gp-pd__related .gp-product__media {
	background: var(--wp--preset--color--white);
}

.gp-pd__related h2 {
	font-size: var(--wp--preset--font-size--heading-2);
}

/* The in-page bar follows the compact sticky header on desktop. */
@media (min-width: 68em) {
	body:has(.gp-header.is-scrolled) .gp-pd__toc {
		top: calc(var(--gp-header-h) - 0.9rem);
	}

	.admin-bar:has(.gp-header.is-scrolled) .gp-pd__toc {
		top: calc(var(--gp-header-h) - 0.9rem + var(--wp-admin--admin-bar--height, 0px));
	}
}
