/**
 * Product Tabs Widget — base structural styles.
 *
 * Dynamic values (colors, typography, spacing) are applied by Elementor's
 * style engine via the widget's CSS selectors. This file provides only the
 * structural / layout foundation.
 */

/* ── Widget wrapper ─────────────────────────────────────────────────────── */
.bcw-pt {
	width: 100%;
}

/* ── Tab bar ────────────────────────────────────────────────────────────── */
.bcw-pt__tabbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 32px;
	border-bottom: 1px solid #dddddd;
	border-bottom-style: solid;
	padding: 0;
	margin: 0;
	list-style: none;
}

/* Sticky tab bar — position:sticky scoped to widget container */
.bcw-pt--sticky-tabbar .bcw-pt__tabbar {
	position: sticky;
	background-color: #ffffff; /* prevent scrolling content showing through */
}

/* White cap covering the viewport strip above the sticky tabbar.
   Height is driven by --bcw-pt-sticky-top (= the "Distance from Top" control value).
   margin-bottom collapses the actual space so layout is unaffected. */
.bcw-pt--sticky-tabbar::before {
	content: '';
	display: block;
	position: sticky;
	top: 0;
	height: var(--bcw-pt-sticky-top, 0px);
	background-color: #ffffff;
	margin-bottom: calc(-1 * var(--bcw-pt-sticky-top, 0px));
	pointer-events: none;
	z-index: 1;
}

/* ── Individual tab button ──────────────────────────────────────────────── */
.bcw-pt__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 0 12px;
	background: none;
	border: none;
	border-bottom-style: solid;
	border-bottom-width: 0;
	border-bottom-color: transparent;
	margin-bottom: -1px; /* overlap the tabbar bottom border */
	cursor: pointer;
	white-space: nowrap;
	font-size: inherit;
	font-family: inherit;
	color: #333333;
	transition: color 200ms ease, border-color 200ms ease, border-width 200ms ease;
}

.bcw-pt__tab:hover {
	color: #a00000;
	border-bottom-color: #a00000;
	border-bottom-width: 2px;
}

.bcw-pt__tab.is-active {
	color: #a00000;
	border-bottom-color: #a00000;
	border-bottom-width: 2px;
}

.bcw-pt__tab-icon img {
	display: block;
	width: 20px;
	height: 20px;
	object-fit: contain;
}

/* Dual icon swap */
.bcw-pt__tab .bcw-pt__tab-icon--active {
	display: none;
}

.bcw-pt__tab.is-active .bcw-pt__tab-icon--normal {
	display: none;
}

.bcw-pt__tab.is-active .bcw-pt__tab-icon--active {
	display: inline-flex;
}

/* Mobile: icon stacked above label */
@media (max-width: 767px) {
	.bcw-pt--mobile-icon-stack .bcw-pt__tab {
		flex-direction: column;
		align-items: center;
		text-align: center;
		white-space: normal;
		gap: 4px;
	}
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.bcw-pt__panel {
	display: none;
	padding: 32px 0;
}

.bcw-pt__panel.is-active {
	display: block;
}

/* ── Color panel ────────────────────────────────────────────────────────── */
.bcw-pt__color-panel {
	/* structural only */
}

.bcw-pt__color-intro {
	margin: 0 0 0.5em;
}

.bcw-pt__color-pdf-link {
	display: inline-block;
	margin-bottom: 1em;
	text-decoration: underline;
	transition: color 200ms ease;
}

.bcw-pt__also-available {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	margin-bottom: 1.5em;
}

.bcw-pt__also-available-icon {
	font-size: 1.25em;
	line-height: 1;
}

/* Gauge group */
.bcw-pt__gauge-group {
	margin-bottom: 2em;
}

.bcw-pt__gauge-heading {
	margin: 24px 0 16px;
	color: #8b7355;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Swatch grid */
.bcw-pt__swatch-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}

.bcw-pt__swatch {
	/* Prevent image intrinsic size from overriding 1fr column width */
	min-width: 0;
	/* Hard-clip any overflow so it can't push the page wider */
	overflow: hidden;
}

.bcw-pt__swatch-img {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1/1;
	width: 100%;
	background: #e0e0e0;
}

.bcw-pt__swatch-img img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
}

/* Solid hex color swatch */
.bcw-pt__swatch-hex {
	display: block;
	width: 100%;
	height: 100%;
}

/* Crinkle corner triangle */
.bcw-pt__swatch-crinkle-corner {
	position: absolute;
	inset: 0;
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	overflow: hidden;
	pointer-events: none;
}

.bcw-pt__swatch-crinkle-corner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Crinkle badge */
.bcw-pt__swatch-badge {
	position: absolute;
	bottom: 6px;
	right: 8px;
	font-size: 16px;
	line-height: 1;
	color: #ffffff;
	pointer-events: none;
}

.bcw-pt__swatch-name {
	margin: 6px 0 0;
	font-size: 0.85rem;
}

/* ── Specs panel ────────────────────────────────────────────────────────── */
.bcw-pt__specs-layout {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	flex-wrap: wrap;
}

.bcw-pt__specs-content {
	flex: 1 1 300px;
	min-width: 0;
}

.bcw-pt__specs-content > *:first-child {
	margin-top: 0;
}

.bcw-pt__specs-content > *:last-child {
	margin-bottom: 0;
}

.bcw-pt__specs-image {
	flex-shrink: 0;
	width: 50%;
}

.bcw-pt__specs-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ── Resources panel ────────────────────────────────────────────────────── */
.bcw-pt__resources-panel {
	/* structural only */
}

.bcw-pt__resources-section {
	margin-bottom: 2.5em;
}

.bcw-pt__resources-heading {
	margin: 0 0 1em;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8b7355;
}

.bcw-pt__pdf-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.bcw-pt__pdf-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.bcw-pt__pdf-thumbnail {
	aspect-ratio: 3/4;
	overflow: hidden;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	background: #f5f5f5;
	position: relative;
	transition: box-shadow 200ms ease, border-color 200ms ease;
}

.bcw-pt__pdf-overlay {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 200ms ease;
	pointer-events: none;
	background-color: transparent;
}

.bcw-pt__pdf-card:hover .bcw-pt__pdf-overlay {
	opacity: 1;
}

.bcw-pt__pdf-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.bcw-pt__pdf-title {
	margin: 0;
	font-weight: 600;
	transition: color 200ms ease;
}

.bcw-pt__pdf-download {
	text-decoration: underline;
	font-size: 0.9rem;
	transition: color 200ms ease;
}

/* Other resources */
.bcw-pt__other-res-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bcw-pt__other-res-link {
	text-decoration: underline;
	transition: color 200ms ease;
}

/* ── Trim panel ─────────────────────────────────────────────────────────── */
.bcw-pt__trim-panel {
	/* structural only */
}

.bcw-pt__trim-intro {
	margin: 0 0 1.5em;
}

/* Global toggle wrapper */
.bcw-pt__trim-toggle-wrap {
	display: block;
	text-align: right;
}

/* ── Animated slider toggle (desktop) ─────────────────────────────────── */
.bcw-pt__trim-toggle {
	position: relative;
	display: inline-flex;
	gap: 0;
	margin-bottom: 24px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	overflow: hidden;
}

/* Sliding knob — the active background indicator */
.bcw-pt__trim-toggle-knob {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 50%;
	background-color: #a00000;
	pointer-events: none;
	z-index: 0;
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bcw-pt__trim-toggle[data-trim-active="profiles"] .bcw-pt__trim-toggle-knob {
	transform: translateX(100%);
}

.bcw-pt__trim-toggle-btn {
	position: relative;
	z-index: 1;
	cursor: pointer;
	background: transparent !important;
	border: none;
	padding: 8px 16px;
	font-size: inherit;
	font-family: inherit;
	box-shadow: none !important;
	transition: color 150ms ease;
}

.bcw-pt__trim-toggle-btn.is-active {
	color: #ffffff;
}

/* ── Per-card toggle (mobile only) ────────────────────────────────────── */
.bcw-pt__trim-card-toggle {
	display: none; /* shown via @media below */
	position: relative;
	overflow: hidden;
	margin: 0 8px 8px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
}

.bcw-pt__trim-card-toggle-knob {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 50%;
	background-color: #a00000;
	pointer-events: none;
	z-index: 0;
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bcw-pt__trim-card-toggle[data-trim-active="profiles"] .bcw-pt__trim-card-toggle-knob {
	transform: translateX(100%);
}

.bcw-pt__trim-card-toggle-btn {
	position: relative;
	z-index: 1;
	flex: 1;
	text-align: center;
	cursor: pointer;
	background: transparent !important;
	border: none;
	padding: 4px 8px;
	font-size: 0.8rem;
	font-family: inherit;
	box-shadow: none !important;
	transition: color 150ms ease;
}

.bcw-pt__trim-card-toggle-btn.is-active {
	color: #ffffff;
}

/* Trim grid */
.bcw-pt__trim-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}

.bcw-pt__trim-card {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 200ms ease;
}

.bcw-pt__trim-img-wrap {
	position: relative;
	overflow: hidden;
}

.bcw-pt__trim-img {
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #ffffff;
}

.bcw-pt__trim-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Profile diagrams should never be cropped — always letterbox inside the card */
.bcw-pt__trim-img[data-trim-img="profiles"] img {
	object-fit: contain;
}

.bcw-pt__trim-img--hidden {
	display: none;
}

.bcw-pt__trim-enlarge {
	display: block;
	width: 100%;
	background: transparent !important;
	border: none;
	padding: 4px 8px;
	text-align: left;
	cursor: pointer;
	text-decoration: underline;
	transition: color 200ms ease;
}

.bcw-pt__trim-name {
	padding: 6px 8px 10px;
	margin: 0;
	font-weight: 600;
	transition: color 200ms ease;
}

/* ── Warranty panel ─────────────────────────────────────────────────────── */
.bcw-pt__warranty-panel {
	display: flex;
	flex-direction: column;
	gap: 1em;
	align-items: flex-start;
}

.bcw-pt__warranty-badge {
	flex-shrink: 0;
}

.bcw-pt__warranty-badge img {
	display: block;
	height: auto;
}

.bcw-pt__warranty-body {
	flex: 1;
	min-width: 0;
}

.bcw-pt__warranty-content > *:first-child {
	margin-top: 0;
}

.bcw-pt__warranty-content > *:last-child {
	margin-bottom: 0;
}

.bcw-pt__warranty-link {
	text-decoration: underline;
	align-self: flex-start;
	transition: color 200ms ease;
}

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.bcw-pt__lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bcw-pt__lightbox[hidden] {
	display: none;
}

.bcw-pt__lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	cursor: pointer;
}

.bcw-pt__lightbox-dialog {
	position: relative;
	z-index: 1;
	line-height: 0; /* prevents phantom space below img */
}

.bcw-pt__lightbox-img {
	display: block;
	max-width: 90vw;
	max-height: 90vh !important;
	width: auto;
	height: auto !important;
}

.bcw-pt__lightbox-dialog .bcw-pt__lightbox-close {
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.6);
	border: none;
	border-radius: 50%;
	box-shadow: none;
	color: #ffffff;
	padding: 8px !important;
	cursor: pointer;
	transition: color 150ms ease, background-color 150ms ease, opacity 150ms ease, box-shadow 150ms ease, border-radius 150ms ease;
}

.bcw-pt__lightbox-close svg {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	pointer-events: none;
}

.bcw-pt__lightbox-dialog .bcw-pt__lightbox-close:hover {
	opacity: 1;
}

/* "Click to Enlarge" button — mobile label swap */
.bcw-pt__trim-enlarge-label--mobile {
	display: none;
}

/* ── Responsive fallbacks ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.bcw-pt__swatch-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.bcw-pt__trim-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.bcw-pt__pdf-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.bcw-pt__specs-image {
		width: 50%;
	}
}

@media (max-width: 767px) {
	.bcw-pt__tabbar {
		gap: 16px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
	}

	.bcw-pt__tab {
		flex-shrink: 0;
	}

	/* ── Center mode: tabs wrap and center-align ────────────────────── */
	.bcw-pt--mobile-tabs-center .bcw-pt__tabbar {
		flex-wrap: wrap;
		overflow-x: visible;
		justify-content: center;
	}

	.bcw-pt--mobile-tabs-center .bcw-pt__tab {
		flex-shrink: 1;
	}

	/* ── Stretch mode: tabs grow equally to fill the row ────────────── */
	.bcw-pt--mobile-tabs-stretch .bcw-pt__tabbar {
		flex-wrap: nowrap;
		overflow-x: hidden;
	}

	.bcw-pt--mobile-tabs-stretch .bcw-pt__tab {
		flex: 1;
		justify-content: center;
		text-align: center;
		white-space: normal;
		min-width: 0; /* allow shrinking below content size */
	}

	.bcw-pt__swatch-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.bcw-pt__trim-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.bcw-pt__pdf-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.bcw-pt__specs-layout {
		flex-direction: column;
	}

	.bcw-pt__specs-image {
		width: 100%;
	}

	/* Hide global toggle on mobile; per-card toggles take over */
	.bcw-pt__trim-toggle-wrap {
		display: none;
	}

	.bcw-pt__trim-card-toggle {
		display: flex;
	}

	/* "Click to Enlarge" label swap on mobile */
	.bcw-pt__trim-enlarge-label--desktop {
		display: none;
	}

	.bcw-pt__trim-enlarge-label--mobile {
		display: inline;
	}
}
.bcw-pt {
    isolation: isolate;
}

.bcw-pt__tabbar {
    z-index: 100;
}

.bcw-pt__trim-card {
    z-index: 0;
    isolation: isolate;
}
.bcw-pt__trim-card-toggle-knob,
.bcw-pt__trim-toggle-knob {
    pointer-events: none !important;
}

.bcw-pt__trim-card-toggle-btn {
    position: relative;
    z-index: 2;
}