/**
 * Cup of Air — product detail pages
 * Scoped to .coa-pd (body also has .coa-product-detail)
 */

/* PDP sticky header: always opaque navy (never translucent after BF strip dismiss) */
body.coa-product-detail #sp-header.sticky .sticky__wrapper,
body.coa-product-detail .sticky .sticky__wrapper,
body.coa-product-detail.coa-bf-active #sp-header.sticky .sticky__wrapper,
body.coa-product-detail.coa-bf-active .sticky .sticky__wrapper,
body.coa-product-detail.coa-bf-strip-on #sp-header.sticky .sticky__wrapper,
body.coa-product-detail.coa-bf-strip-on .sticky .sticky__wrapper {
	background-color: rgb(1, 58, 88) !important;
	background-image: none !important;
	opacity: 1 !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}

body.coa-product-detail #sp-header.sticky a:not(.coa-nav-cta),
body.coa-product-detail #sp-header.sticky #sp-menu .sp-megamenu-parent > li > a:not(.coa-nav-cta),
body.coa-product-detail #sp-header.sticky #sp-menu .sp-megamenu-parent > li > span,
body.coa-product-detail.coa-bf-active #sp-header.sticky a:not(.coa-nav-cta),
body.coa-product-detail.coa-bf-active #sp-header.sticky #sp-menu .sp-megamenu-parent > li > a:not(.coa-nav-cta),
body.coa-product-detail.coa-bf-active #sp-header.sticky #sp-menu .sp-megamenu-parent > li > span,
body.coa-product-detail.coa-bf-strip-on #sp-header.sticky a:not(.coa-nav-cta),
body.coa-product-detail.coa-bf-strip-on #sp-header.sticky #sp-menu .sp-megamenu-parent > li > a:not(.coa-nav-cta),
body.coa-product-detail.coa-bf-strip-on #sp-header.sticky #sp-menu .sp-megamenu-parent > li > span {
	color: #ffffff !important;
}

.coa-pd {
	--coa-navy: #013a58;
	--coa-accent: #0a787e;
	--coa-turquoise: #73c3c4;
	--coa-sky: #e8f4fb;
	--coa-mist: #f4f8fb;
	--coa-ink: #1a2b36;
	--coa-body: #2f4550;
	--coa-muted: #5a6f7c;
	--coa-radius: 14px;
	--coa-wrap: 1180px;
	color: var(--coa-ink);
	font-size: var(--coa-text-md, 18px);
	line-height: var(--coa-lh-body, 1.65);
	overflow-x: clip;
}

.coa-pd *,
.coa-pd *::before,
.coa-pd *::after {
	box-sizing: border-box;
}

.sppb-addon-wrapper:has(.coa-pd),
.sppb-addon-raw-html:has(.coa-pd),
.sppb-column-addons:has(.coa-pd),
.sppb-section:has(.coa-pd) {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.sppb-section:has(.coa-pd) {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.sppb-row-container:has(.coa-pd),
.sppb-container-inner:has(.coa-pd),
.sppb-column:has(.coa-pd) {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.coa-pd-wrap {
	width: min(100% - 40px, var(--coa-wrap));
	margin-inline: auto;
}

.coa-pd-section {
	padding: var(--coa-space-section-y, 4rem) 0;
}

.coa-pd-section-alt {
	background: var(--coa-mist);
}

.coa-pd-section-title {
	margin: 0 0 1.1em;
	color: var(--coa-navy);
	font-size: var(--coa-text-2xl);
	font-weight: 700;
	letter-spacing: var(--coa-tracking-heading, -0.02em);
	line-height: var(--coa-lh-snug, 1.35);
}

.coa-pd-section-title::after {
	content: none;
	display: none;
}

/* ——— Hero ——— */
.coa-pd-hero {
	position: relative;
	padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3.5rem);
	background: linear-gradient(180deg, #eef7fb 0%, #f7fbfd 48%, #ffffff 100%);
	overflow: hidden;
}

.coa-pd-hero-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 85% 20%, rgba(115, 195, 196, 0.28), transparent 60%),
		radial-gradient(ellipse 50% 40% at 10% 80%, rgba(1, 58, 88, 0.06), transparent 55%);
	pointer-events: none;
}

.coa-pd-hero-grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: center;
}

.coa-pd-back {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin: 0 0 1rem;
	color: var(--coa-accent);
	font-size: var(--coa-text-sm, 16px);
	font-weight: 600;
	text-decoration: none;
}

.coa-pd-back:hover,
.coa-pd-back:focus {
	color: var(--coa-navy);
	text-decoration: underline;
}

.coa-pd-kicker {
	margin: 0 0 0.65rem;
	color: var(--coa-muted);
	font-size: var(--coa-text-sm, 16px);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.coa-pd-kicker-cap {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.2em 0.65em;
	border-radius: 999px;
	background: rgba(115, 195, 196, 0.22);
	color: var(--coa-navy);
	font-size: 0.92em;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 700;
}

.coa-pd-title {
	margin: 0 0 0.3em;
	color: var(--coa-navy);
	font-size: var(--coa-text-display);
	font-weight: 700;
	letter-spacing: var(--coa-tracking-display, -0.03em);
	line-height: var(--coa-lh-tight, 1.2);
}

.coa-pd-lead {
	margin: 0 0 1.5rem;
	max-width: 36em;
	color: var(--coa-body);
	font-size: var(--coa-text-lg, 21px);
	line-height: var(--coa-lh-lead, 1.55);
}

.coa-pd-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.coa-pd-compare-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 650;
	color: var(--coa-navy, #013a58);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-size: var(--coa-text-md, 1.125rem);
	line-height: 1.35;
}

.coa-pd-hero-media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	padding: 1rem;
}

.coa-pd-hero-media img {
	display: block;
	width: min(100%, 520px);
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 28px 40px rgba(1, 58, 88, 0.14));
}

/* ——— Highlights ——— */
.coa-pd-highlights {
	padding-top: 0;
	margin-top: -1.5rem;
	position: relative;
	z-index: 1;
}

.coa-pd-hl-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.coa-pd-hl {
	padding: 1.1rem 1.15rem;
	background: #fff;
	border: 0;
	border-radius: var(--coa-radius);
	box-shadow: var(--coa-shadow-md);
}

.coa-pd-hl-label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--coa-muted);
	font-size: var(--coa-text-sm, 16px);
	font-weight: 600;
}

.coa-pd-hl-value {
	display: block;
	color: var(--coa-navy);
	font-size: var(--coa-text-lg, 21px);
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

/* ——— Split body ——— */
.coa-pd-split {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
	gap: clamp(1.5rem, 3vw, 2.75rem);
	align-items: start;
}

.coa-pd-prose p {
	margin: 0 0 1.05em;
	color: var(--coa-body);
	max-width: 40em;
}

.coa-pd-aside {
	padding: 1.5rem 1.4rem;
	background: var(--coa-sky);
	border-radius: var(--coa-radius);
}

.coa-pd-capex {
	margin: 0 0 0.65rem;
	color: var(--coa-navy);
	font-size: var(--coa-text-lg, 21px);
	font-weight: 700;
	line-height: 1.3;
}

.coa-pd-aside-text {
	margin: 0 0 1.15rem;
	color: var(--coa-body);
	font-size: var(--coa-text-sm, 16px);
	line-height: 1.5;
}

.coa-pd-aside-actions {
	display: grid;
	gap: 10px;
}

/* ——— Specs — same row system as homepage .compare-table ——— */
.coa-pd-specs,
.coa-pd-specs.compare-table-wrap {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 4px 0 8px;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	box-sizing: border-box;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
}

.coa-pd-specs table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0 12px;
	font-family: inherit;
	color: #013a58;
}

.coa-pd-specs th,
.coa-pd-specs td {
	padding: 18px 20px;
	text-align: left;
	vertical-align: top;
	border: 0;
	font-size: var(--coa-text-md, 18px);
	line-height: 1.45;
	box-shadow: var(--coa-shadow-sm);
}

.coa-pd-specs th {
	width: 34%;
	font-weight: 600;
	color: #013a58;
	background: #f3fbfc;
	border-radius: 14px 0 0 14px;
	white-space: normal;
	overflow-wrap: break-word;
}

.coa-pd-specs td {
	color: #5a6f7c;
	background: #fff;
	border-radius: 0 14px 14px 0;
}

.coa-pd-specs tr:nth-child(even) td {
	background: #fff;
}

/* ——— Quote head + SPPB form ——— */
.coa-pd-wrap.coa-pd-quote-head {
	width: min(100% - 40px, 720px);
	margin-inline: auto;
	margin-bottom: 0;
}

.coa-pd-quote-lead {
	margin: -0.4em 0 0;
	max-width: none;
	color: var(--coa-body);
	font-size: var(--coa-text-lg, 21px);
	line-height: var(--coa-lh-lead, 1.55);
}

.coa-pd-delivery-note {
	margin: 0 auto 1.5rem;
	max-width: 720px;
	padding: 0 20px;
	color: var(--coa-muted, #5a6b7a);
	font-size: var(--coa-text-sm, 15px);
	line-height: var(--coa-lh-snug, 1.45);
	text-align: center;
}

body.coa-product-detail .sppb-section:has(.sppb-addon-form-builder) {
	padding: 0 0 var(--coa-space-section-y, 4rem) !important;
	background: #fff;
}

body.coa-product-detail .sppb-section:has(.sppb-addon-form-builder) .sppb-row-container {
	width: min(100% - 40px, 720px);
	margin-inline: auto;
}

body.coa-product-detail .sppb-addon-form-builder .sppb-btn {
	background: var(--coa-turquoise) !important;
	border-color: var(--coa-turquoise) !important;
	color: var(--coa-navy) !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	min-height: 50px;
	box-shadow: none !important;
}

body.coa-product-detail .sppb-addon-form-builder .sppb-btn:hover,
body.coa-product-detail .sppb-addon-form-builder .sppb-btn:focus {
	background: #8fd0d1 !important;
	border-color: #8fd0d1 !important;
	color: var(--coa-navy) !important;
}

/* ——— Related ——— */
.coa-pd-related-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.25rem;
}

.coa-pd-related-head .coa-pd-section-title {
	margin-bottom: 0;
}

.coa-pd-carousel-nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	margin-bottom: 0.55em;
}

.coa-pd-carousel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--coa-navy);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: var(--coa-shadow-sm);
}

.coa-pd-carousel-btn:hover,
.coa-pd-carousel-btn:focus-visible {
	color: var(--coa-accent);
	outline: none;
}

.coa-pd-carousel-btn:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* Related carousel lives in its own .coa-pd — don't clip card shadows */
.coa-pd:has(.coa-pd-carousel) {
	overflow: visible;
}

.coa-pd-section:has(.coa-pd-carousel),
.coa-pd-wrap:has(.coa-pd-carousel) {
	overflow: visible;
}

.coa-pd-carousel {
	position: relative;
	overflow: visible;
	/* Outer gutter: shadows paint here, outside the scrollport clip */
	padding: 4px 0 8px;
}

.coa-pd-related {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	/*
	 * Side + bottom padding must live INSIDE the scrollport — overflow-x:auto
	 * always clips shadows that stick out of the padding box.
	 */
	padding: 12px 22px 36px;
	margin: 0 -22px -8px;
	scrollbar-width: none;
}

.coa-pd-related::-webkit-scrollbar {
	display: none;
}

.coa-pd-related > .coa-pd-card {
	flex: 0 0 calc((100% - 36px) / 3);
	min-width: 0;
	scroll-snap-align: start;
}

.coa-pd-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 0;
	border-radius: var(--coa-radius);
	overflow: hidden;
	text-decoration: none !important;
	color: inherit;
	box-shadow: var(--coa-shadow-sm);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.coa-pd-card:hover,
.coa-pd-card:focus {
	box-shadow: var(--coa-shadow-hover);
	transform: translateY(-2px);
}

.coa-pd-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 0.7rem 0.85rem;
	background: linear-gradient(180deg, #eef7fb, #fff);
}

.coa-pd-card-media img {
	display: block;
	width: auto;
	max-width: 96%;
	max-height: 360px;
	object-fit: contain;
}

.coa-pd-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.15rem 1.35rem 1.4rem;
}

.coa-pd-card-title {
	color: var(--coa-navy);
	font-size: var(--coa-text-lg, 21px);
	font-weight: 700;
	line-height: 1.3;
}

.coa-pd-card-meta {
	color: var(--coa-muted);
	font-size: var(--coa-text-md, 18px);
}

.coa-pd-card-cta {
	margin-top: 0.45rem;
	color: #0b6e73;
	font-size: var(--coa-text-md, 18px);
	font-weight: 700;
}

.coa-pd-card:hover .coa-pd-card-cta,
.coa-pd-card:focus .coa-pd-card-cta,
.coa-pd-card:focus-visible .coa-pd-card-cta {
	color: #085a5e;
	text-decoration: underline;
}

/* ——— Responsive ——— */
@media (max-width: 991px) {
	.coa-pd-hero-grid,
	.coa-pd-split {
		grid-template-columns: 1fr;
	}

	.coa-pd-hero-media {
		order: -1;
		min-height: 0;
		padding: 0;
	}

	.coa-pd-hero-media img {
		width: min(100%, 380px);
	}

	.coa-pd-hl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.coa-pd-related {
		padding: 10px 16px 32px;
		margin: 0 -16px -4px;
		gap: 14px;
	}

	.coa-pd-related > .coa-pd-card {
		flex-basis: min(78%, 320px);
		min-width: min(78%, 280px);
	}

	.coa-pd-card-media img {
		max-height: 280px;
	}

	.coa-pd-highlights {
		margin-top: 0;
		padding-top: var(--coa-space-section-y, 3rem);
	}
}

@media (max-width: 640px) {
	.coa-pd-wrap {
		width: min(100% - 28px, var(--coa-wrap));
	}

	.coa-pd-hl-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.coa-pd-hl {
		padding: 0.9rem;
	}

	.coa-pd-hl-value {
		font-size: var(--coa-text-md, 17px);
	}

	.coa-pd-actions {
		flex-direction: column;
	}

	.coa-pd-actions .coa-btn {
		width: 100%;
	}

	.coa-pd-related-head {
		align-items: center;
	}

	.coa-pd-related {
		padding: 8px 14px 28px;
		margin: 0 -14px -4px;
		gap: 12px;
	}

	.coa-pd-related > .coa-pd-card {
		flex-basis: min(86vw, 300px);
		min-width: min(86vw, 280px);
		max-width: 300px;
	}

	.coa-pd-card-body {
		padding: 1rem 1.1rem 1.2rem;
	}

	.coa-pd-card-title {
		font-size: clamp(16px, 4.5vw, 19px);
	}

	.coa-pd-card-media img {
		max-height: 220px;
	}

	.coa-pd-specs th,
	.coa-pd-specs td {
		padding: 14px 16px;
		font-size: var(--coa-text-sm, 15px);
		box-shadow: var(--coa-shadow-sm);
	}

	.coa-pd-specs th {
		white-space: normal;
		width: 40%;
	}

	/* CA-N52: stay inside 360px viewport (override global .compare-table-wrap content-box + negative margin) */
	.coa-pd-specs.compare-table-wrap {
		max-width: 100%;
		box-sizing: border-box;
		overflow-x: auto;
		margin-left: 0;
		margin-right: 0;
		padding-left: 0;
		padding-right: 0;
	}
}

/* Quote form sits between detail top and related; align to wrap width */
.sppb-section.coa-pd-form-section .sppb-row-container,
.sppb-section.coa-pd-form-section .sppb-container-inner {
	width: min(100% - 40px, 1180px) !important;
	max-width: 720px !important;
	margin-inline: auto !important;
}

.sppb-section.coa-pd-form-section .sppb-addon-form-builder,
.coa-pd-form {
	max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.coa-pd-card {
		transition: none;
	}
	.coa-pd-card:hover,
	.coa-pd-card:focus {
		transform: none;
	}
}
