/*
 * Bestfront Configurator skin.
 * Layered on top of WooCommerce Composite Products' native DOM. Site shell
 * (header, footer, breadcrumbs, product gallery, intro list) is NOT touched —
 * styles here are scoped to .bf-cfg-shell, the wrapper JS injects around the
 * existing .composite_form on composite product pages.
 */

.bf-cfg-shell {
	--bf-bg: #ffffff;
	--bf-bg-alt: #faf9f7;
	--bf-ink: #111111;
	--bf-ink-2: #3a3a3a;
	/* AAA-clean (~7.4:1 on white) for small / secondary text. */
	--bf-ink-3: #525252;
	/* Decoration only (dot separators, swatches). Never set as text color. */
	--bf-ink-4: #8a8a8a;
	--bf-line: #e5e5e5;
	--bf-line-2: #d4d4d4;
	/* Brand teal — kept for fills, borders, and white-on-teal compositions. */
	--bf-teal: #2a8a8a;
	--bf-teal-dark: #1f6b6b;
	/* AA-clean (~5.6:1 on white) for teal rendered as text. */
	--bf-teal-text: #185454;
	--bf-teal-soft: #f0f8f8;
	--bf-link: #2a5bd7;
	--bf-warn: #c45a3a;
	--bf-warn-bg: #fef7f2;
	--bf-warn-border: #e8c0a8;
	--bf-radius: 4px;
	--bf-radius-lg: 6px;
	--bf-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--bf-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);

	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 40px;
	align-items: start;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 60px;
	color: var(--bf-ink);
	font-size: 1rem;
	line-height: 1.5;
}

.bf-cfg-shell .composite_form {
	margin: 0;
}

.bf-cfg-shell button {
	font-family: inherit;
}

@media (max-width: 1040px) {
	.bf-cfg-shell {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.bf-cfg-shell .bf-cfg-summary {
		position: static;
	}
}

/* === Component as accordion ============================================== */

.bf-cfg-shell .composite_component {
	border-top: 1px solid var(--bf-line);
	margin: 0;
	padding: 0;
	background: transparent;
}

.bf-cfg-shell .composite_component:last-of-type {
	border-bottom: 1px solid var(--bf-line);
}

.bf-cfg-shell .composite_component .component_title {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
	user-select: none;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
	color: var(--bf-ink);
}

.bf-cfg-shell .composite_component .component_title .aria_title {
	position: absolute;
	left: -9999px;
}

.bf-cfg-shell .composite_component .component_title .step_index {
	font-weight: 600;
	color: var(--bf-ink);
	margin-right: 6px;
}

.bf-cfg-shell .composite_component .component_title .component_title_button {
	margin-left: auto;
	width: 24px;
	height: 24px;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
}

.bf-cfg-shell .composite_component .component_title .component_title_button::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(0);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--bf-ink);
	transition: transform .25s;
}

.bf-cfg-shell .composite_component:not(.open) .component_title .component_title_button::before {
	transform: translate(-50%, -50%) rotate(-90deg);
}

.bf-cfg-shell .composite_component .component_title .bf-cfg-status {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bf-ink-3);
	letter-spacing: 0.02em;
	text-transform: none;
	margin-left: auto;
}

.bf-cfg-shell .composite_component .component_title .component_title_button + .bf-cfg-status {
	margin-left: 8px;
}

.bf-cfg-shell .composite_component .component_title .bf-cfg-status.is-done {
	color: var(--bf-teal-text);
}

.bf-cfg-shell .composite_component .component_title .bf-cfg-status.is-done::before {
	content: '✓ ';
}

.bf-cfg-shell .composite_component .component_inner {
	padding: 0 0 24px;
}

/* hide composite's pagination/filter chrome we don't need */
.bf-cfg-shell .composite_component .component_pagination,
.bf-cfg-shell .composite_component .component_ordering,
.bf-cfg-shell .composite_component .component_filters,
.bf-cfg-shell .composite_component .component_navigation {
	display: none;
}

/* === Generic option cleanup ============================================= */

.bf-cfg-shell .composite_component .component_options {
	padding: 0;
}

.bf-cfg-shell .composite_component .component_options_inner {
	padding: 0;
}

/* === Role: system (radio buttons → chips) =============================== */

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_buttons fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_buttons ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button_container {
	margin: 0;
	flex: 0 0 auto;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button {
	display: block;
	border: 1px solid var(--bf-line-2);
	background: #fff;
	border-radius: var(--bf-radius);
	padding: 14px 20px;
	min-width: 200px;
	cursor: pointer;
	transition: all .2s;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button:hover {
	border-color: var(--bf-ink-2);
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button[aria-selected="true"],
.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button.is-selected {
	border-color: var(--bf-teal);
	background: var(--bf-teal-soft);
	box-shadow: inset 0 0 0 1px var(--bf-teal);
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button input[type="radio"] {
	position: absolute;
	left: -9999px;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button .component_option_radio_button_select {
	font-size: 0;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button .title {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--bf-ink);
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_radio_button .price {
	display: block;
	font-size: 0.8125rem;
	color: var(--bf-ink-3);
	margin-top: 2px;
	font-weight: 400;
}

/* System with thumbnails layout — also render as chips */
.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnails_container {
	display: flex !important;
	gap: 12px;
	flex-wrap: wrap;
	padding: 0;
	margin: 0;
	list-style: none;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnail_container {
	margin: 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	flex: 1 1 200px;
	min-width: 0;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnail {
	border: 1px solid var(--bf-line-2);
	background: #fff;
	border-radius: var(--bf-radius);
	padding: 14px 18px;
	cursor: pointer;
	transition: all .2s;
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: auto;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnail:hover {
	border-color: var(--bf-ink-2);
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnail[aria-selected="true"] {
	border-color: var(--bf-teal);
	background: var(--bf-teal-soft);
	box-shadow: inset 0 0 0 1px var(--bf-teal);
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .thumbnail_image {
	display: none;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .thumbnail_title {
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--bf-ink);
	display: block;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .thumbnail_price {
	font-size: 0.8125rem;
	color: var(--bf-ink-3);
	font-weight: 400;
}

.bf-cfg-shell .composite_component[data-bf-role="system"] .thumbnail_buttons,
.bf-cfg-shell .composite_component[data-bf-role="system"] .component_option_thumbnail_select {
	display: none;
}

/* === Role: swatch (thumbnails → swatch tiles) =========================== */

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnails_container {
	display: grid !important;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	padding: 0;
	margin: 0;
}

@media (max-width: 1040px) {
	.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnails_container {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 720px) {
	.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnails_container {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
	.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail {
		padding: 12px;
	}
	.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_image {
		margin-bottom: 10px;
	}
	.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_title {
		font-size: 0.9375rem;
	}
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail_container {
	margin: 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	padding: 0 !important;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail {
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	padding: 8px;
	background: #fff;
	cursor: pointer;
	transition: all .15s;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail:hover {
	border-color: var(--bf-ink-3);
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail[aria-selected="true"] {
	border-color: var(--bf-teal);
	box-shadow: inset 0 0 0 1px var(--bf-teal);
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_image {
	aspect-ratio: 1;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 6px;
	background: var(--bf-swatch, #eee);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
	width: 100%;
	display: block;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_image .component_option_thumbnail_link {
	display: block;
	width: 100%;
	height: 100%;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail_link {
	pointer-events: none;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_title {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--bf-ink);
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_price {
	display: none;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .thumbnail_buttons,
.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_option_thumbnail_select {
	display: none;
}

.bf-cfg-shell .composite_component[data-bf-role="swatch"] .component_summary {
	display: none;
}

.bf-cfg-shell .bf-finish-callouts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 16px;
	font-size: 0.875rem;
	color: var(--bf-ink-2);
}

.bf-cfg-shell .bf-finish-callouts > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bf-cfg-shell .bf-finish-callouts b {
	color: var(--bf-ink);
	font-weight: 600;
}

.bf-cfg-shell .bf-finish-callouts .bf-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--bf-teal);
	display: inline-block;
}

.bf-cfg-shell .bf-compare-link {
	color: var(--bf-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
}

/* === Role: fronts (thumbnails grid + tabs) ============================== */

.bf-cfg-shell .bf-fronts-tabs {
	display: inline-flex;
	background: var(--bf-bg-alt);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	padding: 3px;
	margin: 0 0 14px;
	gap: 2px;
}

.bf-cfg-shell .bf-fronts-tab {
	padding: 8px 16px;
	border-radius: 3px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bf-ink-2);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.bf-cfg-shell .bf-fronts-tab.is-active {
	background: var(--bf-ink);
	color: #fff;
}

.bf-cfg-shell .bf-fronts-tab .bf-cnt {
	display: inline-block;
	min-width: 18px;
	padding: 0 5px;
	margin-left: 6px;
	background: var(--bf-line);
	border-radius: 9px;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: var(--bf-ink-3);
}

.bf-cfg-shell .bf-fronts-tab.is-active .bf-cnt {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}


.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnails_container {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	padding: 0;
	margin: 0;
	list-style: none;
}

@media (max-width: 1040px) {
	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnails_container {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 720px) {
	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnails_container {
		grid-template-columns: repeat(2, 1fr);
	}
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnail_container {
	margin: 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	padding: 0 !important;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnail_container[data-bf-tab-hidden="true"],
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product[data-bf-tab-hidden="true"] {
	display: none !important;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnail {
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	background: #fff;
	cursor: pointer;
	transition: all .15s;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 100%;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnail:hover {
	border-color: var(--bf-ink-3);
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_option_thumbnail[aria-selected="true"] {
	border-color: var(--bf-teal);
	box-shadow: inset 0 0 0 1px var(--bf-teal);
	background: var(--bf-teal-soft);
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .thumbnail_image {
	background: #fff;
	padding: 8px;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .thumbnail_description {
	padding: 8px 12px 10px;
	border-top: 1px solid var(--bf-line);
	font-size: 0.875rem;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .thumbnail_title {
	display: block;
	font-weight: 500;
	color: var(--bf-ink);
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .thumbnail_price {
	display: block;
	font-size: 0.8125rem;
	color: var(--bf-ink-2);
	font-variant-numeric: tabular-nums;
	margin-top: 2px;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .thumbnail_buttons {
	display: none;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_summary {
	margin-top: 16px;
	padding: 14px 16px;
	background: var(--bf-bg-alt);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	font-size: 0.875rem;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_summary .quantity {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .component_summary .quantity input.qty {
	width: 60px;
	text-align: center;
	border: 1px solid var(--bf-line-2);
	border-radius: var(--bf-radius);
	padding: 4px 6px;
	font-variant-numeric: tabular-nums;
}

.bf-cfg-shell .bf-fronts-empty {
	padding: 28px 16px;
	text-align: center;
	font-size: 0.875rem;
	color: var(--bf-ink-3);
	background: var(--bf-bg-alt);
	border-radius: var(--bf-radius);
	margin: 8px 0;
}

/* === Tabular layout for bundled items inside a fronts/picker component === */

.bf-cfg-shell .bf-fronts-thead {
	display: grid;
	grid-template-columns: 92px minmax(120px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr) 130px;
	column-gap: 12px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--bf-line-2);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bf-ink-3);
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) ul.bundled_products,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_products {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	grid-template-columns: none !important;
	column-count: auto !important;
}

/* Hide just the bits of a bundled item we've replaced with our row cells
   (image, title, excerpt, optional-include checkbox). The .details > .cart
   subtree stays visible so WooCommerce Product Add-ons (e.g. HENGSLER)
   can render below the row when the user picks the item. The native qty
   input itself is still hidden — our stepper drives it. */
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product > .bundled_product_images,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_product_title,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_product_excerpt,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_product_optional_checkbox,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_item_after_cart_details .quantity,
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product input.bundled_qty {
	display: none !important;
}

/* Style the addon panel (e.g. WC-PAO Hengsler radios) that renders below
   the row when the item is picked. */
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .details {
	padding: 0 12px 12px;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_item_cart_details {
	background: var(--bf-bg-alt);
	border-radius: var(--bf-radius);
	padding: 12px 14px;
	margin-top: 4px;
	font-size: 0.875rem;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bundled_item_cart_details > * + * {
	margin-top: 8px;
}

/* Numeric addon fields (HØYDE / DYBDE in mm) get a range slider beside
   the text input for quick visual selection within min/max. */
.bf-cfg-shell .bf-addon-control {
	display: flex;
	align-items: center;
	gap: 14px;
}

.bf-cfg-shell .bf-addon-control input.bf-addon-slider {
	flex: 1;
	min-width: 0;
	margin: 0;
	height: 26px;
	background: transparent !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	-webkit-appearance: none;
	appearance: none;
}

.bf-cfg-shell .bf-addon-control input.bf-addon-slider:focus {
	outline: none !important;
	box-shadow: none !important;
}

.bf-cfg-shell .bf-addon-control input.bf-addon-slider::-webkit-slider-runnable-track {
	height: 4px;
	background: var(--bf-line);
	border: 0;
	border-radius: 2px;
}
.bf-cfg-shell .bf-addon-control input.bf-addon-slider::-moz-range-track {
	height: 4px;
	background: var(--bf-line);
	border: 0;
	border-radius: 2px;
}

.bf-cfg-shell .bf-addon-control input.bf-addon-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--bf-teal);
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	margin-top: -10px;
}
.bf-cfg-shell .bf-addon-control input.bf-addon-slider::-moz-range-thumb {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--bf-teal);
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: pointer;
}

.bf-cfg-shell .bf-addon-control input.wc-pao-addon-field {
	width: 88px !important;
	max-width: 88px !important;
	flex: 0 0 88px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	padding: 6px 8px;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid var(--bf-line);
	background: transparent;
	transition: background .15s;
	box-sizing: border-box;
	position: static !important;
}

/* Force our injected row to render BEFORE the native .details (which holds
   the addon panel + qty controls), regardless of DOM order. */
.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .bf-front-row {
	order: 0;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product .details {
	order: 1;
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product:hover {
	background: var(--bf-bg-alt);
}

.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product.bf-has-qty {
	background: var(--bf-teal-soft);
}

.bf-cfg-shell .bf-front-row {
	display: grid;
	grid-template-columns: 92px minmax(120px, 1.4fr) minmax(110px, 1fr) minmax(110px, 1fr) 130px;
	column-gap: 12px;
	align-items: center;
	padding: 12px;
	min-height: 88px;
	text-align: left;
}

.bf-cfg-shell .bf-front-row > * {
	text-align: left;
}

.bf-cfg-shell .bf-front-row .bf-front-qty {
	display: flex;
	justify-content: flex-end;
}

.bf-cfg-shell .bf-front-swatch {
	width: 80px;
	height: 80px;
	background: transparent;
	border-radius: 2px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* When the swatch contains the merchant's existing front-preview SVG,
   reset its sizing so it fills the cell instead of running at 420px. */
.bf-cfg-shell .bf-front-swatch .bf-front-preview {
	margin: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bf-cfg-shell .bf-front-swatch .bf-front-preview__canvas {
	max-width: 100% !important;
	width: 100%;
	height: 100%;
}

.bf-cfg-shell .bf-front-swatch svg,
.bf-cfg-shell .bf-front-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	max-width: 100%;
	max-height: 100%;
}

.bf-cfg-shell .bf-front-name {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bf-cfg-shell .bf-front-name-main {
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--bf-ink);
	line-height: 1.25;
}

.bf-cfg-shell .bf-front-name-sub {
	font-size: 0.8125rem;
	color: var(--bf-ink-3);
	line-height: 1.25;
	font-variant-numeric: tabular-nums;
}

.bf-cfg-shell .bf-front-size {
	font-size: 0.875rem;
	color: var(--bf-ink-3);
	font-variant-numeric: tabular-nums;
}

.bf-cfg-shell .bf-front-price {
	font-size: 0.875rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--bf-ink);
	white-space: nowrap;
}

.bf-cfg-shell .bf-front-price .price {
	font-weight: 500;
}

.bf-cfg-shell .bf-front-price .bundled_item_price_quantity {
	font-size: 0.75rem;
	color: var(--bf-ink-3);
	font-weight: 400;
	margin-left: 2px;
}

.bf-cfg-shell .bf-front-price .woocommerce-Price-amount {
	color: inherit;
}

.bf-cfg-shell .bf-front-qty {
	display: flex;
	justify-content: flex-end;
}

.bf-cfg-shell .bf-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--bf-line-2);
	border-radius: var(--bf-radius);
	background: #fff;
	overflow: hidden;
}

.bf-cfg-shell .bf-stepper .bf-step {
	width: 30px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	color: var(--bf-ink-2);
	font-size: 1.125rem;
	cursor: pointer;
}

.bf-cfg-shell .bf-stepper .bf-step:hover {
	background: var(--bf-bg-alt);
	color: var(--bf-ink);
}

.bf-cfg-shell .bf-stepper .bf-step-val {
	min-width: 32px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bf-ink);
}


@media (max-width: 720px) {
	/* On phones the 5-column row doesn't fit. Restructure each row into a
	   2D grid: swatch on the left, name + meta stacked in the middle,
	   stepper pinned right. The column header is hidden — the stacked cell
	   layout self-labels. Each row reads as a soft card with breathing room. */
	.bf-cfg-shell .bf-fronts-thead {
		display: none;
	}

	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) ul.bundled_products,
	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_products {
		padding: 4px 0 !important;
	}

	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product {
		border: 1px solid var(--bf-line);
		border-radius: 10px;
		margin: 0 0 12px !important;
		background: #fff;
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	}

	.bf-cfg-shell .composite_component:is([data-bf-role="fronts"],[data-bf-role="picker"]) .bundled_product.bf-has-qty {
		border-color: var(--bf-teal);
		box-shadow: 0 0 0 1px var(--bf-teal), 0 1px 3px rgba(0, 0, 0, 0.05);
	}

	.bf-cfg-shell .bf-front-row {
		grid-template-columns: 64px minmax(0, 1fr) auto;
		grid-template-areas:
			"swatch name  qty"
			"swatch meta  qty"
			"swatch price qty";
		column-gap: 12px;
		row-gap: 4px;
		padding: 14px 12px;
		min-height: 0;
		text-align: left;
		align-items: start;
	}
	.bf-cfg-shell .bf-front-swatch {
		grid-area: swatch;
		width: 64px;
		height: 64px;
		align-self: center;
	}
	.bf-cfg-shell .bf-front-name {
		grid-area: name;
		gap: 3px;
		min-width: 0;
	}
	.bf-cfg-shell .bf-front-name-main {
		font-size: 1rem;
		font-weight: 600;
		line-height: 1.25;
	}
	.bf-cfg-shell .bf-front-name-sub {
		line-height: 1.35;
		font-size: 0.8125rem;
		color: var(--bf-ink-2);
	}
	.bf-cfg-shell .bf-front-size {
		grid-area: meta;
		font-size: 0.875rem;
		color: var(--bf-ink-2);
		/* No nowrap — let it wrap naturally if the column shrinks. */
	}
	.bf-cfg-shell .bf-front-price {
		grid-area: price;
		text-align: left;
		font-weight: 600;
		font-size: 0.9375rem;
		color: var(--bf-ink);
		margin-top: 2px;
	}
	.bf-cfg-shell .bf-front-price small,
	.bf-cfg-shell .bf-front-price .bundled_item_price_quantity {
		color: var(--bf-ink-2);
		font-size: 0.75rem;
		font-weight: 400;
	}
	.bf-cfg-shell .bf-front-qty {
		grid-area: qty;
		align-self: center;
	}
	.bf-cfg-shell .bf-stepper {
		font-size: 0.875rem;
		border: 1px solid var(--bf-line-2);
	}
	.bf-cfg-shell .bf-stepper .bf-step {
		width: 32px;
		height: 32px;
		color: var(--bf-ink);
		font-size: 1.125rem;
	}
	.bf-cfg-shell .bf-stepper .bf-step-val {
		min-width: 24px;
		font-weight: 600;
		color: var(--bf-ink);
	}

	/* Tab bar on mobile gets a touch more padding so tabs are tappable. */
	.bf-cfg-shell .bf-fronts-tab {
		padding: 10px 14px;
		font-size: 0.875rem;
	}

	/* Component title on mobile — bigger, bolder. */
	.bf-cfg-shell .composite_component .component_title {
		font-size: 1rem;
	}

	/* Sticky summary spacing tighter on mobile. */
	.bf-cfg-summary {
		padding: 16px;
	}
	.bf-cfg-summary .bf-sum-title {
		font-size: 1.0625rem;
	}
}

/* === Role: accessory (grouped checkbox grid) ============================ */

/* Accessory components render in-place using the native composite + bundle
   markup (the previous prototype's grouped checkbox block is no longer
   injected — see configurator.js). */

.bf-cfg-shell .bf-accessories-block {
	border-top: 1px solid var(--bf-line);
	padding: 0;
}

.bf-cfg-shell .bf-accessories-block .bf-acc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
	cursor: pointer;
	user-select: none;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
}

.bf-cfg-shell .bf-accessories-block .bf-acc-head::before {
	content: '';
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--bf-ink);
	transition: transform .25s;
}

.bf-cfg-shell .bf-accessories-block[data-bf-open="false"] .bf-acc-head::before {
	transform: rotate(-90deg);
}

.bf-cfg-shell .bf-accessories-block .bf-cfg-status {
	margin-left: auto;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bf-ink-3);
}

.bf-cfg-shell .bf-accessories-block .bf-cfg-status.is-done {
	color: var(--bf-teal-text);
}

.bf-cfg-shell .bf-accessories-block .bf-cfg-status.is-done::before {
	content: '✓ ';
}

.bf-cfg-shell .bf-accessories-block[data-bf-open="false"] .bf-acc-grid {
	display: none;
}

.bf-cfg-shell .bf-acc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding-bottom: 24px;
}

@media (max-width: 720px) {
	.bf-cfg-shell .bf-acc-grid {
		grid-template-columns: 1fr;
	}
}

.bf-cfg-shell .bf-acc-item {
	display: flex;
	gap: 12px;
	align-items: center;
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	padding: 12px 14px;
	cursor: pointer;
	transition: all .15s;
	background: #fff;
}

.bf-cfg-shell .bf-acc-item:hover {
	border-color: var(--bf-ink-3);
}

.bf-cfg-shell .bf-acc-item.is-on {
	border-color: var(--bf-teal);
	background: var(--bf-teal-soft);
}

.bf-cfg-shell .bf-acc-check {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 1.5px solid var(--bf-line-2);
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #fff;
	font-size: 0.75rem;
}

.bf-cfg-shell .bf-acc-item.is-on .bf-acc-check {
	background: var(--bf-teal);
	border-color: var(--bf-teal);
}

.bf-cfg-shell .bf-acc-item.is-on .bf-acc-check::before {
	content: '✓';
}

.bf-cfg-shell .bf-acc-body {
	flex: 1;
}

.bf-cfg-shell .bf-acc-body .bf-acc-name {
	font-weight: 500;
	font-size: 0.875rem;
	color: var(--bf-ink);
	display: block;
}

.bf-cfg-shell .bf-acc-body .bf-acc-desc {
	font-size: 0.8125rem;
	color: var(--bf-ink-3);
	display: block;
}

.bf-cfg-shell .bf-acc-price {
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	text-align: right;
	color: var(--bf-ink-2);
}

.bf-cfg-shell .bf-acc-price small {
	display: block;
	font-size: 0.75rem;
	color: var(--bf-ink-3);
	font-weight: 400;
}

/* === Sticky summary aside =============================================== */

.bf-cfg-summary {
	position: sticky;
	top: 20px;
	background: #fff;
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius-lg);
	padding: 20px;
	box-shadow: var(--bf-shadow);
}

.bf-cfg-summary .bf-sum-title {
	font-size: 1.0625rem;
	font-weight: 600;
	margin: 0 0 4px;
}

.bf-cfg-summary .bf-sum-sub {
	font-size: 0.8125rem;
	color: var(--bf-ink-3);
	padding-bottom: 16px;
	border-bottom: 1px solid var(--bf-line);
	margin-bottom: 14px;
}

.bf-cfg-summary .bf-sum-row {
	display: flex;
	justify-content: space-between;
	font-size: 0.875rem;
	padding: 4px 0;
	color: var(--bf-ink-2);
}

.bf-cfg-summary .bf-sum-row b {
	color: var(--bf-ink);
	font-weight: 500;
}

.bf-cfg-summary .bf-sum-divider {
	border-top: 1px dashed var(--bf-line);
	margin: 10px 0;
}

.bf-cfg-summary .bf-sum-items {
	max-height: 220px;
	overflow-y: auto;
	font-size: 0.875rem;
	margin: 10px -4px;
	padding: 0 4px;
}

.bf-cfg-summary .bf-sum-empty {
	color: var(--bf-ink-3);
	font-size: 0.875rem;
	text-align: center;
	padding: 24px 0;
	font-style: italic;
}

.bf-cfg-summary .bf-sum-line {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid var(--bf-line);
}

.bf-cfg-summary .bf-sum-line:last-child {
	border-bottom: none;
}

.bf-cfg-summary .bf-sum-line .bf-n {
	line-height: 1.3;
}

.bf-cfg-summary .bf-sum-line .bf-n small {
	color: var(--bf-ink-3);
	display: block;
	font-size: 0.75rem;
	margin-top: 1px;
}

.bf-cfg-summary .bf-sum-line .bf-p {
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	font-size: 0.875rem;
	text-align: right;
	white-space: nowrap;
}

.bf-cfg-summary .bf-sum-breakdown {
	padding: 10px 0;
	border-top: 1px solid var(--bf-line);
}

.bf-cfg-summary .bf-sum-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 12px 0 16px;
	border-top: 1px solid var(--bf-ink);
	margin-top: 8px;
}

.bf-cfg-summary .bf-sum-total .bf-t {
	font-size: 0.875rem;
	font-weight: 600;
}

.bf-cfg-summary .bf-sum-total .bf-v {
	font-size: 1.5rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.bf-cfg-summary .bf-sum-total small {
	font-size: 0.75rem;
	color: var(--bf-ink-3);
	font-weight: 400;
	display: block;
	text-align: right;
}

/* The [hidden] attribute should always win over our author display rules. */
.bf-cfg-summary [hidden] {
	display: none !important;
}

.bf-cfg-summary .bf-cfg-validation {
	background: var(--bf-warn-bg);
	border: 1px solid var(--bf-warn-border);
	color: var(--bf-warn);
	padding: 10px 12px;
	border-radius: var(--bf-radius);
	font-size: 0.8125rem;
	margin: 8px 0;
	line-height: 1.45;
}

.bf-cfg-summary .bf-cfg-validation-head {
	font-weight: 600;
	margin-bottom: 6px;
}

.bf-cfg-summary .bf-cfg-validation-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bf-cfg-summary .bf-cfg-validation-list li {
	padding: 2px 0;
}

.bf-cfg-summary .bf-cfg-validation-list .msg-source {
	font-weight: 600;
	color: var(--bf-ink);
}

.bf-cfg-summary .bf-cfg-validation-list .msg-content {
	color: var(--bf-warn);
}

.bf-cfg-summary .bf-suggest {
	background: #f5faf7;
	border: 1px solid #c8dfd2;
	border-radius: var(--bf-radius);
	padding: 12px;
	font-size: 0.8125rem;
	margin-top: 14px;
}

.bf-cfg-summary .bf-suggest b {
	display: block;
	font-size: 0.875rem;
	color: var(--bf-ink);
	margin-bottom: 4px;
}

.bf-cfg-summary .bf-suggest p {
	color: var(--bf-ink-2);
	margin: 0 0 8px;
	font-size: 0.8125rem;
}

.bf-cfg-summary .bf-suggest button {
	font-size: 0.8125rem;
	color: var(--bf-teal-text);
	font-weight: 600;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.bf-cfg-summary .bf-cfg-cta {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background: var(--bf-teal);
	color: #fff;
	border: 0;
	border-radius: var(--bf-radius);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	cursor: pointer;
	margin-top: 6px;
	transition: background .15s;
}

.bf-cfg-summary .bf-cfg-cta:hover {
	background: var(--bf-teal-dark);
}

.bf-cfg-summary .bf-cfg-cta:disabled {
	background: var(--bf-line-2);
	color: var(--bf-ink-3);
	cursor: not-allowed;
}

.bf-cfg-summary .bf-share-row {
	display: flex;
	gap: 6px;
	margin-top: 8px;
}

.bf-cfg-summary .bf-share-row button {
	flex: 1;
	padding: 8px 6px;
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	font-size: 0.75rem;
	color: var(--bf-ink-2);
	letter-spacing: 0.03em;
	background: #fff;
	cursor: pointer;
}

.bf-cfg-summary .bf-share-row button:hover {
	background: var(--bf-bg-alt);
	color: var(--bf-ink);
}

/* === The native composite price/CTA disappear; we render our own ======== */

.bf-cfg-shell .composite_form > .composite_message {
	margin-top: 12px;
}

.bf-cfg-shell .composite_data > .composite_wrap > .composite_button,
.bf-cfg-shell .composite_data > .composite_wrap > .composite_price,
.bf-cfg-shell .composite_data > .composite_wrap > .composite_status,
.bf-cfg-shell .composite_data > .composite_wrap > .composite_availability {
	display: none !important;
}

/* === Compare modal ====================================================== */

.bf-cfg-compare-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 24px;
}

.bf-cfg-compare-overlay.is-open {
	display: flex;
}

.bf-cfg-compare-modal {
	background: #fff;
	border-radius: var(--bf-radius-lg);
	max-width: 1000px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	box-shadow: var(--bf-shadow-md);
}

.bf-cfg-compare-head {
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--bf-line);
}

.bf-cfg-compare-head h4 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
}

.bf-cfg-compare-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 1.125rem;
	color: var(--bf-ink-2);
}

.bf-cfg-compare-close:hover {
	background: var(--bf-bg-alt);
}

.bf-cfg-compare-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	padding: 20px 24px;
}

.bf-cfg-compare-col {
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	overflow: hidden;
}

.bf-cfg-compare-col .bf-cmp-swatch {
	aspect-ratio: 4 / 3;
	background: var(--bf-swatch, #eee);
}

.bf-cfg-compare-col .bf-cmp-body {
	padding: 10px 12px;
}

.bf-cfg-compare-col .bf-cmp-name {
	font-weight: 500;
	font-size: 0.875rem;
}

.bf-cfg-compare-col .bf-cmp-pick {
	width: 100%;
	padding: 8px;
	font-size: 0.8125rem;
	font-weight: 500;
	background: var(--bf-teal);
	color: #fff;
	border: 0;
	border-radius: 2px;
	margin-top: 8px;
	cursor: pointer;
}

.bf-cfg-compare-col .bf-cmp-pick:hover {
	background: var(--bf-teal-dark);
}
