.avr-bundle-save {
	margin: 28px 0;
}

.avr-bundle-save__title {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--avr-accent, #b5551a);
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 3px;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 18px;
}

.avr-bundle-save__title::before,
.avr-bundle-save__title::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--avr-accent, #b5551a);
	opacity: 0.5;
}

.avr-bundle-save__options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}

/* On narrow screens, swap the grid for a swipeable horizontal carousel -
   each card takes most of the viewport width with the next one peeking
   in, and scroll-snap makes swiping land cleanly on each card. */
@media (max-width: 600px) {
	.avr-bundle-save__options {
		display: flex;
		grid-template-columns: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		margin-bottom: 16px;
		scrollbar-width: none;
	}

	.avr-bundle-save__options::-webkit-scrollbar {
		display: none;
	}

	.avr-bundle-save__option {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}
}

.avr-bundle-save__option {
	position: relative;
	border: 1.5px solid #d4d4d8;
	border-radius: 10px;
	padding: 16px 12px 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	background: #fff;
	transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.avr-bundle-save__option:hover {
	border-color: var(--avr-accent, #b5551a);
}

.avr-bundle-save__option:active {
	transform: scale(0.98);
}

.avr-bundle-save__option:has(input:checked) {
	border-color: var(--avr-accent, #b5551a);
	background: var(--avr-accent-bg, #fdf1ea);
}

/* Keyboard focus (native input drives the visible radio dot itself, so
   show the ring on the card when the input inside it has keyboard focus). */
.avr-bundle-save__option:has(input:focus-visible) {
	outline: 2px solid var(--avr-accent, #b5551a);
	outline-offset: 2px;
}

/* Visible radio dot, top-left of the card - matches the size selector's
   radio dot and the client's reference screenshot. */
.avr-bundle-save__option input[type="radio"] {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 14px;
	height: 14px;
	margin: 0;
	accent-color: var(--avr-accent, #b5551a);
	cursor: pointer;
}

/* Visual order inside the card: image, then label/save text, then badge -
   the badge is rendered first in markup (so it can be conditional) but
   should appear last, under the "Save X%" line. */
.avr-bundle-save__image {
	order: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2px;
	margin-top: 4px;
}

.avr-bundle-save__image img {
	max-height: 48px;
	width: auto;
	display: block;
}

.avr-bundle-save__text {
	order: 2;
	display: flex;
	flex-direction: column;
	gap: 2px;
	align-items: center;
	text-align: center;
}

.avr-bundle-save__label {
	font-weight: 800;
	font-size: 16px;
	color: #18181b;
	line-height: 1.2;
}

.avr-bundle-save__save {
	color: var(--avr-accent, #b5551a);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.avr-bundle-save__badge {
	order: 3;
	position: static;
	transform: none;
	background: none;
	box-shadow: none;
	color: var(--avr-accent, #b5551a);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 0;
	border-radius: 0;
	white-space: normal;
}

/* Shown on the page's native "Add to cart" button once a bundle tier is
   actively selected, so it visually confirms the switched behavior. */
.single_add_to_cart_button.avr-bundle-mode {
	box-shadow: inset 0 0 0 2px var(--avr-accent, #b5551a);
}

/* Summary line confirming the actual charge for the actively-selected
   bundle tier, shown just above the "Add Bundle to Cart" button. */
.avr-bundle-save__selected-summary {
	text-align: center;
	background: var(--avr-accent-bg, #fdf1ea);
	border: 1px solid var(--avr-accent, #b5551a);
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 14px;
	font-size: 14px;
	color: #18181b;
}

.avr-bundle-save__selected-summary strong {
	color: var(--avr-accent, #b5551a);
}

.avr-bundle-save__note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--avr-accent, #b5551a);
	background: var(--avr-accent-bg, #fdf1ea);
	border: 1.5px solid var(--avr-accent, #b5551a);
	border-radius: 8px;
	padding: 10px 14px;
	margin-top: 12px;
}

.avr-bundle-save__note-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid var(--avr-accent, #b5551a);
	font-size: 11px;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
}

/* Top variation price, while a bundle tier is actively selected: shows
   the regular per-unit price struck through next to the tier's
   discounted per-unit price. Uses the standard <del>/<ins> tags
   WooCommerce itself uses for sale prices, so most themes will already
   style these correctly - these rules are just a plain fallback. */
.woocommerce-variation-price del.avr-bundle-save__original-price {
	opacity: 0.6;
	text-decoration: line-through;
	margin-right: 6px;
}

.woocommerce-variation-price ins.avr-bundle-save__discounted-price {
	text-decoration: none;
	color: var(--avr-accent, #b5551a);
	font-weight: 700;
}

/* Same struck-through original / discounted price treatment, applied to
   the cart page's price column for bundle-discounted lines. */
.woocommerce-cart td.product-price del.avr-bundle-save__original-price {
	opacity: 0.6;
	text-decoration: line-through;
	margin-right: 6px;
	display: inline;
}

.woocommerce-cart td.product-price ins.avr-bundle-save__discounted-price {
	text-decoration: none;
	color: var(--avr-accent, #b5551a);
	font-weight: 700;
	display: inline;
}

/* "VitalPrep - Sterile Solution" order add-on: always-visible row (never a
   collapsible dropdown) shown under the add-to-cart button on every
   product page. */
.avr-order-addon {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding: 12px 16px;
	background: #f4f4f5;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
}

.avr-order-addon__image img {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.avr-order-addon__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
}

.avr-order-addon__name {
	font-weight: 700;
	font-size: 14px;
	color: #18181b;
}

.avr-order-addon__subtitle {
	font-size: 12px;
	color: #71717a;
}

.avr-order-addon__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #18181b;
	cursor: pointer;
}

.avr-order-addon__qty {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #18181b;
	flex: 0 0 auto;
}

.avr-order-addon__qty-select {
	padding: 4px 8px;
	border: 1px solid #d4d4d8;
	border-radius: 6px;
	background: #fff;
}
