/**
 * Helmet B2B Core - product page modules.
 *
 * Sizing rules:
 *   - Every module is fluid; nothing relies on a fixed viewport width.
 *   - Tabular data scrolls inside its own wrapper so the page itself never
 *     scrolls sideways on a phone.
 *   - The colour switcher and FAQ degrade to fully visible content when
 *     JavaScript never runs.
 *
 * @package HelmetB2BCore
 */

/* -------------------------------------------------------------------------
 * Shared section rhythm
 * ---------------------------------------------------------------------- */

.hb-product-hero,
.hb-colour-switcher,
.hb-product-specs,
.hb-product-scenarios,
.hb-product-custom,
.hb-product-qc,
.hb-product-certs,
.hb-product-downloads,
.hb-product-faq,
.hb-product-commercial,
.hb-product-compare {
	margin-block: clamp(2rem, 4vw, 3.25rem);
}

.hb-section__lede {
	max-width: 62ch;
	margin-block: 0 1.5rem;
	color: #4a5560;
	font-size: 0.9375rem;
	line-height: 1.65;
}

.hb-colour-switcher__title,
.hb-product-specs__title,
.hb-product-scenarios__title,
.hb-product-custom__title,
.hb-product-qc__title,
.hb-product-certs__title,
.hb-product-downloads__title,
.hb-product-faq__title,
.hb-product-commercial__title,
.hb-product-compare__title {
	margin-block: 0 0.5rem;
	font-size: clamp(1.25rem, 2.2vw, 1.625rem);
	letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */

.hb-product-hero {
	padding: clamp(1.25rem, 3vw, 2rem);
	background: #16202a;
	border-radius: 10px;
	color: #f4f6f8;
}

.hb-product-hero__code {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #9fb0be;
}

.hb-product-hero__tagline {
	margin: 0;
	font-size: clamp(1.125rem, 2.4vw, 1.5rem);
	line-height: 1.45;
	color: #f4f6f8;
	max-width: 52ch;
}

.hb-product-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.hb-product-hero__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.625rem 1.25rem;
	border: 1px solid #f4f6f8;
	border-radius: 6px;
	background: #f4f6f8;
	color: #16202a;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.hb-product-hero__cta:hover,
.hb-product-hero__cta:focus-visible {
	background: #ffffff;
	border-color: #ffffff;
	color: #16202a;
	text-decoration: none;
}

.hb-product-hero__cta--ghost {
	background: transparent;
	color: #f4f6f8;
	border-color: rgba(244, 246, 248, 0.45);
}

.hb-product-hero__cta--ghost:hover,
.hb-product-hero__cta--ghost:focus-visible {
	background: rgba(244, 246, 248, 0.12);
	border-color: #f4f6f8;
	color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Colour switcher
 * ---------------------------------------------------------------------- */

.hb-colour-switcher__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.hb-colour-switcher__swatch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 40px;
	padding: 0.375rem 0.75rem 0.375rem 0.5rem;
	border: 1px solid #d7dce1;
	border-radius: 999px;
	background: #fff;
	color: #2c3843;
	font-size: 0.8125rem;
	line-height: 1;
	cursor: pointer;
}

.hb-colour-switcher__swatch:hover {
	border-color: #9aa6b1;
}

.hb-colour-switcher__swatch.is-active {
	border-color: #16202a;
	box-shadow: inset 0 0 0 1px #16202a;
	color: #16202a;
	font-weight: 600;
}

.hb-colour-switcher__swatch:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

.hb-colour-switcher__dot {
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid rgba(22, 32, 42, 0.22);
	flex: 0 0 auto;
}

.hb-colour-switcher__panel[hidden] {
	display: none;
}

/* The colour name is the swatch button's own label while browsing. */
.hb-colour-switcher__panel-name {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.hb-colour-switcher__views {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Two studio angles belong side by side and fill the content column. */
@media (min-width: 700px) {
	.hb-colour-switcher__views {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hb-colour-switcher__view {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	background: #f2f4f6;
	line-height: 0;
}

.hb-colour-switcher__view img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* -------------------------------------------------------------------------
 * Photo gallery (quotation-sheet product photography).
 * ---------------------------------------------------------------------- */

.hb-product-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.hb-product-gallery__item {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	background: #f2f4f6;
	border: 1px solid #e4e7ea;
	line-height: 0;
}

.hb-product-gallery__item img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.35s ease;
}

.hb-product-gallery__item:hover img,
.hb-product-gallery__item:focus-visible img {
	transform: scale(1.02);
}

@media (max-width: 600px) {
	.hb-product-gallery {
		grid-template-columns: 1fr;
	}
}

.hb-colour-switcher__view:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

/* Without JS every panel would collapse, so keep them all visible instead. */
html:not(.hb-js) .hb-colour-switcher__panel[hidden] {
	display: block;
}

html:not(.hb-js) .hb-colour-switcher__swatches {
	display: none;
}

/* -------------------------------------------------------------------------
 * Specifications
 * ---------------------------------------------------------------------- */

.hb-product-specs__group + .hb-product-specs__group {
	margin-top: 1.75rem;
}

.hb-product-specs__heading {
	margin-block: 0 0.5rem;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: #16202a;
}

.hb-product-specs__list {
	margin: 0;
	border-top: 1px solid #e2e6ea;
}

.hb-product-specs__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: 1rem;
	padding-block: 0.6875rem;
	border-bottom: 1px solid #e2e6ea;
}

.hb-product-specs__row dt {
	margin: 0;
	color: #5a6672;
	font-size: 0.875rem;
}

.hb-product-specs__row dd {
	margin: 0;
	color: #1d2833;
	font-size: 0.875rem;
	font-weight: 500;
}

.hb-product-specs__tbd {
	color: #9aa6b1;
}

@media (max-width: 600px) {
	.hb-product-specs__row {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}
}

/* -------------------------------------------------------------------------
 * Scenarios
 * ---------------------------------------------------------------------- */

.hb-product-scenarios__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-product-scenarios__item {
	padding: 0.875rem 1rem;
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	background: #fbfbfc;
}

.hb-product-scenarios__name {
	display: block;
	font-weight: 600;
	color: #16202a;
	font-size: 0.9375rem;
}

.hb-product-scenarios__note {
	display: block;
	margin-top: 0.25rem;
	color: #5a6672;
	font-size: 0.8125rem;
	line-height: 1.55;
}

/* -------------------------------------------------------------------------
 * Customization
 * ---------------------------------------------------------------------- */

.hb-product-custom__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e2e6ea;
}

.hb-product-custom__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 1rem;
	padding-block: 0.6875rem;
	border-bottom: 1px solid #e2e6ea;
	font-size: 0.875rem;
}

.hb-product-custom__label {
	color: #16202a;
	font-weight: 600;
}

.hb-product-custom__value {
	color: #5a6672;
}

@media (max-width: 600px) {
	.hb-product-custom__item {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}
}

/* -------------------------------------------------------------------------
 * QC steps
 * ---------------------------------------------------------------------- */

.hb-product-qc__list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-product-qc__step {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	grid-template-areas:
		'index label'
		'index note';
	gap: 0 0.75rem;
	padding: 0.75rem 0.875rem;
	border-left: 2px solid #16202a;
	background: #fbfbfc;
}

.hb-product-qc__index {
	grid-area: index;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: #9aa6b1;
	padding-top: 0.125rem;
}

.hb-product-qc__label {
	grid-area: label;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #16202a;
}

.hb-product-qc__note {
	grid-area: note;
	margin-top: 0.125rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: #5a6672;
}

/* -------------------------------------------------------------------------
 * Certifications
 * ---------------------------------------------------------------------- */

.hb-product-certs__table-wrap,
.hb-product-compare__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hb-product-certs__table,
.hb-product-compare__table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.hb-product-certs__caption,
.hb-product-compare__caption {
	caption-side: bottom;
	padding-top: 0.75rem;
	color: #8894a0;
	font-size: 0.75rem;
	text-align: left;
}

.hb-product-certs__table th,
.hb-product-certs__table td,
.hb-product-compare__table th,
.hb-product-compare__table td {
	padding: 0.6875rem 0.875rem;
	text-align: left;
	border-bottom: 1px solid #e2e6ea;
	vertical-align: top;
}

.hb-product-certs__table thead th,
.hb-product-compare__table thead th {
	background: #f6f7f9;
	color: #5a6672;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-bottom: 1px solid #d7dce1;
}

.hb-product-certs__table tbody th,
.hb-product-compare__table tbody th {
	color: #16202a;
	font-weight: 600;
}

.hb-product-certs__table code,
.hb-product-compare__table code {
	font-size: 0.8125rem;
	background: #f2f4f6;
	padding: 0.125rem 0.375rem;
	border-radius: 4px;
}

/* -------------------------------------------------------------------------
 * Downloads
 * ---------------------------------------------------------------------- */

.hb-product-downloads__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-product-downloads__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.5rem 1rem;
	border: 1px solid #d7dce1;
	border-radius: 6px;
	background: #fff;
	color: #16202a;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

.hb-product-downloads__link:hover,
.hb-product-downloads__link:focus-visible {
	border-color: #16202a;
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * FAQ
 * ---------------------------------------------------------------------- */

.hb-product-faq__item {
	border-bottom: 1px solid #e2e6ea;
}

.hb-product-faq__item:first-of-type {
	border-top: 1px solid #e2e6ea;
}

.hb-product-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.9375rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #16202a;
	cursor: pointer;
	list-style: none;
}

/* Hide the default marker in every engine. */
.hb-product-faq__question::-webkit-details-marker {
	display: none;
}

.hb-product-faq__question::marker {
	content: '';
}

.hb-product-faq__question::after {
	content: '+';
	flex: 0 0 auto;
	font-size: 1.125rem;
	font-weight: 400;
	color: #8894a0;
	transition: transform 0.18s ease;
}

.hb-product-faq__item[open] .hb-product-faq__question::after {
	transform: rotate(45deg);
}

.hb-product-faq__question:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

.hb-product-faq__answer {
	padding-bottom: 0.9375rem;
	color: #4a5560;
	font-size: 0.875rem;
	line-height: 1.7;
	max-width: 68ch;
}

.hb-product-faq__answer p {
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Commercial terms
 * ---------------------------------------------------------------------- */

.hb-product-commercial__list {
	margin: 0;
	border-top: 1px solid #e2e6ea;
}

.hb-product-commercial__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 1rem;
	padding-block: 0.6875rem;
	border-bottom: 1px solid #e2e6ea;
	font-size: 0.875rem;
}

.hb-product-commercial__row dt {
	margin: 0;
	color: #5a6672;
}

.hb-product-commercial__row dd {
	margin: 0;
	color: #1d2833;
	font-weight: 500;
}

@media (max-width: 600px) {
	.hb-product-commercial__row {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}
}

/* -------------------------------------------------------------------------
 * Comparison
 * ---------------------------------------------------------------------- */

.hb-product-compare__cta {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0.25rem 0.75rem;
	border: 1px solid #d7dce1;
	border-radius: 6px;
	background: #fff;
	color: #16202a;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.hb-product-compare__cta:hover,
.hb-product-compare__cta:focus-visible {
	border-color: #16202a;
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * Print
 * ---------------------------------------------------------------------- */

@media print {
	.hb-product-hero__actions,
	.hb-colour-switcher__swatches,
	.hb-product-downloads,
	.hb-product-compare,
	.hb-product-faq__question::after {
		display: none !important;
	}

	.hb-product-hero {
		background: none;
		color: #000;
		border: 1px solid #999;
	}

	.hb-product-hero__tagline,
	.hb-product-hero__code {
		color: #000;
	}

	.hb-product-faq__item {
		break-inside: avoid;
	}

	.hb-product-faq__answer {
		display: block !important;
	}

        /* Print must not carry the sticky chrome or the mobile quote bar. */
        .hb-product-nav,
        .hb-quote-bar {
                display: none !important;
        }
}

/* -------------------------------------------------------------------------
 * In-page navigation
 *
 * A product page is long by design. This turns it into a datasheet that can be
 * scanned: the section index sticks under the header on wide screens and stays
 * a plain, scrollable strip on a phone.
 * ---------------------------------------------------------------------- */

.hb-product-nav {
	margin-block: 0 0.5rem;
	border-block: 1px solid #e2e6ea;
	background: #fff;
}

.hb-product-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	padding: 0.375rem 0;
	list-style: none;
}

.hb-product-nav__item {
	margin: 0;
}

.hb-product-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0.375rem 0.6875rem;
	border-radius: 999px;
	color: #4a5560;
	font-size: 0.8125rem;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.hb-product-nav__link:hover,
.hb-product-nav__link:focus-visible {
	background: #f2f4f6;
	color: #16202a;
}

.hb-product-nav__link:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 1px;
}

.hb-product-nav__item--cta {
	margin-left: auto;
}

.hb-product-nav__link--cta {
	background: #16202a;
	color: #fff;
	font-weight: 600;
}

.hb-product-nav__link--cta:hover,
.hb-product-nav__link--cta:focus-visible {
	background: #243544;
	color: #fff;
}

/* The datasheet is a document affordance, so it reads as a secondary action. */
.hb-product-nav__item--doc .hb-product-nav__link--doc {
	border-color: #cfd6dc;
	color: #4a5560;
}

.hb-product-nav__item--doc .hb-product-nav__link--doc::after {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-left: 0.35em;
	border: 1.5px solid currentColor;
	border-top: 0;
	border-left: 0;
	vertical-align: 0.05em;
}

.hb-product-nav__item--doc .hb-product-nav__link--doc:hover,
.hb-product-nav__item--doc .hb-product-nav__link--doc:focus-visible {
	border-color: #16202a;
	color: #16202a;
}

@media (min-width: 900px) {
	.hb-product-nav {
		position: sticky;
		top: 0;
		z-index: 30;
		margin-block: 0;
	}
}

@media (max-width: 899px) {
	.hb-product-nav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.hb-product-nav__list::-webkit-scrollbar {
		display: none;
	}

	.hb-product-nav__item--cta {
		margin-left: 0;
	}
}

/* Anchored sections must clear the sticky index when jumped to. */
.hb-colour-switcher,
.hb-product-specs,
.hb-product-scenarios,
.hb-product-custom,
.hb-product-qc,
.hb-product-certs,
.hb-product-downloads,
.hb-product-faq,
.hb-product-commercial,
.hb-inquiry {
	scroll-margin-top: 4.5rem;
}

/* -------------------------------------------------------------------------
 * Mobile quote bar
 *
 * Only ever shown by script, and only on a narrow viewport once the hero is
 * out of view. Without JS it stays hidden because the markup carries [hidden].
 * ---------------------------------------------------------------------- */

.hb-quote-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem clamp(0.75rem, 4vw, 1.25rem)
		calc(0.625rem + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid #e2e6ea;
	box-shadow: 0 -8px 24px -18px rgba(16, 28, 40, 0.5);
}

.hb-quote-bar[hidden] {
	display: none;
}

.hb-quote-bar__model {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: #16202a;
	font-size: 0.8125rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hb-quote-bar__cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1rem;
	border-radius: 999px;
	background: #16202a;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.hb-quote-bar__ghost {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.875rem;
	border: 1px solid #16202a;
	border-radius: 999px;
	color: #16202a;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.hb-quote-bar__cta:focus-visible,
.hb-quote-bar__ghost:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

@media (min-width: 900px) {
	.hb-quote-bar {
		display: none !important;
	}
}

/* The bar overlays the bottom of the page on a phone, so reserve room for it
 * only while it is actually visible. The script toggles the html class. */
@media (max-width: 899px) {
	html.hb-quote-bar-active body {
		padding-bottom: 4.5rem;
	}
}
