/* Single product page. */

.product-page__top {
	display: grid;
	gap: var(--space-3);
	margin-bottom: var(--space-6);
}

@media (min-width: 1024px) {
	.product-page__top {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		align-items: start;
		gap: var(--space-6);
	}
}

/* Gallery. */
.product-gallery__main {
	aspect-ratio: 1;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--grey-100);
	overflow: hidden;
}

.product-gallery__main img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.product-gallery__main img.product-image--placeholder {
	object-fit: cover;
}

.product-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: var(--space-1);
	margin: var(--space-1) 0 0;
	padding: 0;
	list-style: none;
}

.product-gallery__thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--grey-100);
	overflow: hidden;
	cursor: pointer;
}

.product-gallery__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

.product-gallery__thumb[aria-current="true"] {
	border-color: var(--color-primary);
}

/* Summary. */
.product-brand {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-bottom: var(--space-1);
	color: var(--color-primary);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
}

.product-brand__logo {
	display: block;
	width: auto;
	max-width: 160px;
	height: auto;
	max-height: 44px;
}

.product-title {
	margin-bottom: var(--space-1);
	font-size: 1.625rem;
	line-height: 1.2;
}

@media (min-width: 768px) {
	.product-title {
		font-size: 2rem;
	}
}

.product-pn {
	margin: 0 0 var(--space-2);
	color: var(--color-muted);
}

.product-pn strong {
	color: var(--color-text);
	font-variant-numeric: tabular-nums;
}

.product-price {
	margin: var(--space-2) 0 var(--space-1);
	color: var(--color-primary);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}

.product-price del {
	color: var(--color-muted);
	font-size: 1.125rem;
	font-weight: 400;
}

.product-price ins {
	text-decoration: none;
}

.product-short {
	margin-top: var(--space-2);
	color: var(--grey-700);
}

.product-buy {
	margin-top: var(--space-3);
	padding-top: var(--space-3);
	border-top: 1px solid var(--color-border);
}

.product-buy form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
}

.product-buy .quantity {
	flex: none;
}

.product-buy .quantity input.qty {
	width: 88px;
	min-height: 52px;
	text-align: center;
	font-size: 1.125rem;
}

.product-buy .single_add_to_cart_button {
	flex: 1;
	min-width: 180px;
	min-height: 52px;
	border: 2px solid var(--color-accent);
	border-radius: var(--radius-md);
	background: var(--color-accent);
	color: var(--on-accent);
	font-size: 1.0625rem;
	font-weight: 700;
	cursor: pointer;
}

.product-buy .single_add_to_cart_button:hover {
	background: var(--color-accent-hover);
	border-color: var(--color-accent-hover);
}

.product-buy table.variations {
	margin-bottom: var(--space-2);
}

.product-buy table.variations th,
.product-buy table.variations td {
	display: block;
	padding: var(--space-half) 0;
	border: 0;
}

.quote-box {
	padding: var(--space-3);
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-lg);
}

.quote-box__title {
	margin: 0 0 var(--space-half);
	color: var(--color-primary);
	font-size: 1.125rem;
	font-weight: 700;
}

.quote-box__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-1);
	min-height: 44px;
	margin-top: var(--space-1);
	font-weight: 600;
}

.product-meta {
	margin: var(--space-3) 0 0;
	color: var(--color-muted);
	font-size: 0.9375rem;
}

/* Tabs. */
.product-tabs {
	margin-bottom: var(--space-6);
}

.tablist {
	display: flex;
	gap: var(--space-half);
	box-shadow: inset 0 -2px 0 var(--color-border);
	overflow-x: auto;
	scrollbar-width: none;
}

.tablist::-webkit-scrollbar {
	display: none;
}

.tab {
	flex: none;
	min-height: 48px;
	padding: 0 var(--space-2);
	border: 0;
	border-bottom: 3px solid transparent;
	background: none;
	color: var(--color-muted);
	font-weight: 600;
	cursor: pointer;
}

@media (min-width: 768px) {
	.tab {
		padding: 0 var(--space-3);
	}
}

.tab:hover {
	color: var(--color-primary);
}

.tab[aria-selected="true"] {
	border-bottom-color: var(--color-accent);
	color: var(--color-primary);
}

.tabpanel {
	padding-top: var(--space-3);
	max-width: 80ch;
}

.tabpanel[hidden] {
	display: none;
}

.js .tabpanel__title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* Specs and part number tables. */
.product-section {
	margin-bottom: var(--space-6);
}

.product-section > h2 {
	font-size: 1.25rem;
}

.data-table {
	max-width: 720px;
}

.data-table th[scope="row"] {
	width: 40%;
	background: var(--color-surface);
}

.data-table thead th {
	background: var(--color-surface);
}

.data-table__num {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.data-table-scroll {
	max-width: 720px;
	max-height: 360px;
	overflow: auto;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.data-table-scroll .data-table {
	max-width: none;
}

.data-table-scroll thead th {
	position: sticky;
	top: 0;
}

/* Sticky add to cart bar: phones only. */
.sticky-cart {
	display: none;
}

@media (max-width: 767px) {
	.sticky-cart {
		position: fixed;
		z-index: var(--header-z);
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-2);
		visibility: hidden;
		padding: var(--space-1) var(--space-2);
		padding-bottom: max(var(--space-1), env(safe-area-inset-bottom));
		border-top: 1px solid var(--color-border);
		background: #fff;
		box-shadow: 0 -4px 12px rgba(15, 42, 67, 0.12);
		transform: translateY(100%);
		transition: transform 0.2s ease, visibility 0s linear 0.2s;
	}

	.sticky-cart.is-visible {
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}

	.sticky-cart__info {
		min-width: 0;
	}

	.sticky-cart .btn {
		flex: none;
		white-space: nowrap;
	}

	.sticky-cart__name {
		margin: 0;
		overflow: hidden;
		font-size: 0.875rem;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.sticky-cart__price {
		margin: 0;
		color: var(--color-primary);
		font-weight: 700;
	}

	.single-product .site-footer {
		padding-bottom: 72px;
	}
}

.recently-viewed[hidden] {
	display: none;
}

/* Fuse5 connector markup: part details table, OE numbers, kit contents, barcode. */
.tabpanel .shop_attributes {
	max-width: 720px;
}

.tabpanel .shop_attributes th {
	width: 40%;
	background: var(--color-surface);
}

.fuse5-sc-oe-numbers,
.fuse5-sc-bom-info {
	margin: var(--space-2) 0;
	color: var(--color-muted);
	font-size: 0.9375rem;
}

.fuse5-sc-bom-info:not(:empty) {
	padding: var(--space-2);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
}

.fuse5-barcode-box {
	margin-top: var(--space-3);
	padding: var(--space-2);
	border: 1px dashed var(--grey-300);
	border-radius: var(--radius-md);
	background: #fff;
	text-align: center;
}

.fuse5-barcode-hint {
	margin: var(--space-1) 0 0;
	color: var(--color-muted);
	font-size: 0.875rem;
}

/* Phones: keep the image short enough that the title, price and Add to cart show on the first screen. */
@media (max-width: 767px) {
	.product-gallery__main {
		aspect-ratio: 4 / 3;
		max-height: 42vh;
		margin-inline: auto;
	}

	.product-gallery__main img {
		max-height: 42vh;
		width: 100%;
		object-fit: contain;
	}

	.product-gallery__main img.product-image--placeholder {
		object-fit: contain;
		padding: var(--space-4);
	}
}
