/* =========================================================
   Stone Circle — native WooCommerce Product Bundle plans

   Subscription state, pricing and cart submission remain owned by
   WooCommerce. These rules only remove duplicate bundle presentation after
   the shared purchase-card enhancement has initialized successfully.
   ========================================================= */

body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.bundled_product {
	display: none !important;
}

body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.bundle_price
	> p.price,
body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.bundle_price
	> .price {
	display: none !important;
}

body.single-product.sc-bundle-options-enhanced
	.summary
	> p.price,
body.single-product.sc-bundle-options-enhanced
	.summary
	> .price,
body.single-product.sc-bundle-options-enhanced
	.wp-block-kadence-wootemplate-blocks-price.kwt-price-single {
	display: none !important;
}

body.single-product.sc-bundle-options-enhanced form.bundle_form,
body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.bundle_wrap,
body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.wcsatt-options-wrapper-grouped {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.single-product.sc-bundle-options-enhanced
	form.bundle_form
	.wcsatt-options-wrapper-grouped {
	margin-bottom: 16px !important;
}

body.single-product .sc-bundle-flavour-selector {
	min-width: 0;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

body.single-product .sc-bundle-flavour-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	font: inherit;
	text-transform: uppercase;
}

body.single-product .sc-bundle-flavour-heading > span {
	font-weight: 700;
	letter-spacing: 0.04em;
}

body.single-product .sc-bundle-flavour-heading > small {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #686868;
}

body.single-product .sc-bundle-flavour-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

body.single-product .sc-bundle-flavour-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid #b8b8b8;
	border-radius: 7px;
	background: transparent;
	cursor: pointer;
	transition:
		border-color 160ms ease,
		background-color 160ms ease;
}

body.single-product .sc-bundle-flavour-option:hover {
	border-color: #252525;
}

body.single-product .sc-bundle-flavour-option.is-selected {
	border-color: #007632;
	background: rgba(0, 118, 50, 0.06);
	box-shadow: inset 0 0 0 1px #007632;
}

body.single-product .sc-bundle-flavour-option input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #007632;
}

body.single-product .sc-bundle-flavour-option > span {
	font-weight: 700;
}

@media (max-width: 480px) {
	body.single-product .sc-bundle-flavour-options {
		grid-template-columns: 1fr;
	}
}

/*
 * Kadence keeps the mobile thumbnail slider configured for six items even
 * when a bundle gallery contains only two. Match the thumbnail dimensions of
 * ordinary product pages.
 */
@media (max-width: 767px) {
	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.kadence-product-gallery-thumbnails,
	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.thumb-wrapper,
	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.splide__track,
	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.splide__list {
		width: 100% !important;
		max-width: none !important;
	}

	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.splide__list {
		justify-content: flex-start !important;
	}

	body.single-product.sc-bundle-options-enhanced
		.ksk-gallery.kt-sm-layout-above
		.kt-woo-gallery-thumbnail {
		flex: 0 0 calc(16.6667% - 4.1667px) !important;
		width: calc(16.6667% - 4.1667px) !important;
		max-width: none !important;
		height: auto !important;
		aspect-ratio: 1 / 1;
	}
}

/* Prevent an empty Kadence tooltip from extending the page below the footer. */
body.single-product.sc-bundle-options-enhanced
	> .kt-gallery-icon-tooltip:empty {
	display: none !important;
}
