/* Woo Quantity Upsell — front-end bars */
.wqu-block {
	margin: 18px 0;
	font-family: inherit;
	/* Force a full-width row so the Add to Cart button drops below the bars,
	   even inside themes that lay out form.cart with flex, grid or floats. */
	width: 100% !important;
	flex: 0 0 100% !important;
	grid-column: 1 / -1 !important;
	float: none !important;
	clear: both;
	box-sizing: border-box;
}
/* Allow the flex-based add-to-cart form to wrap, so our full-width block pushes
   the quantity + button onto the next line instead of squeezing them beside it. */
form.cart {
	flex-wrap: wrap !important;
}
/* Float-based themes: make sure the button clears the block and starts a new line. */
form.cart .wqu-block ~ .single_add_to_cart_button,
form.cart .wqu-block ~ .quantity,
.wqu-block ~ .single_add_to_cart_button {
	clear: both !important;
	float: none !important;
}
.wqu-block-title {
	color: var(--wqu-title-color, #000);
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 10px;
}
.wqu-bars {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr;
}
.wqu-bars.wqu-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wqu-bars.wqu-cols-3 { grid-template-columns: repeat(3, 1fr); }

.wqu-bar {
	position: relative;
	border: 1.5px solid var(--wqu-bar-border, #c4c8d2);
	background: var(--wqu-bar-bg, #f2f2f2);
	border-radius: var(--wqu-radius, 8px);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.wqu-bar:hover { border-color: var(--wqu-bar-selected-border, #0d1e47); }
.wqu-bar--selected {
	background: var(--wqu-bar-selected-bg, #fff);
	border-color: var(--wqu-bar-selected-border, #0d1e47);
	box-shadow: 0 0 0 1px var(--wqu-bar-selected-border, #0d1e47) inset;
}
.wqu-radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.wqu-bar-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	cursor: pointer;
	margin: 0;
}
.wqu-bar-radio {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--wqu-bar-border, #c4c8d2);
	background: #fff;
	position: relative;
	transition: border-color .15s ease;
}
.wqu-bar--selected .wqu-bar-radio {
	border-color: var(--wqu-bar-selected-border, #0d1e47);
}
.wqu-bar--selected .wqu-bar-radio::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--wqu-bar-selected-border, #0d1e47);
}
.wqu-bar-content {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.wqu-bar-left { display: flex; flex-direction: column; gap: 2px; }
.wqu-bar-first { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wqu-bar-title {
	color: var(--wqu-bar-title-color, #000);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}
.wqu-bar-subtitle {
	color: var(--wqu-bar-subtitle-color, #555);
	font-size: 13px;
}
.wqu-bar-label {
	background: var(--wqu-label-bg, #e6ebf5);
	color: var(--wqu-label-color, #264487);
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 6px;
	white-space: nowrap;
}
.wqu-bar-pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.2;
}
.wqu-bar-price {
	color: var(--wqu-price-color, #000);
	font-size: 17px;
	font-weight: 700;
}
.wqu-bar-full-price {
	color: var(--wqu-full-price-color, #555);
	font-size: 13px;
	text-decoration: line-through;
}
.wqu-popular {
	position: absolute;
	top: 0;
	right: 12px;
	transform: translateY(-50%);
	background: var(--wqu-popular-bg, #000);
	color: var(--wqu-popular-color, #fff);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 20px;
	z-index: 2;
}
/* Stacked layout: pricing keeps to the right on narrow screens */
@media (max-width: 480px) {
	.wqu-bars.wqu-cols-2,
	.wqu-bars.wqu-cols-3 { grid-template-columns: 1fr; }
	.wqu-bar-title { font-size: 16px; }
}

/* --- Per-pack flavour pickers (mix-and-match on variable products) --------- */
/* Bars-off standalone picker: no bars chrome, just the variation dropdown. */
.wqu-block--novars {
	margin: 12px 0;
}
.wqu-block--novars .wqu-flavors {
	margin: 0;
}
.wqu-flavors {
	margin: 12px 0 4px;
	display: grid;
	gap: 8px;
	width: 100% !important;
	flex: 0 0 100% !important;
	grid-column: 1 / -1 !important;
	float: none !important;
	clear: both;
	box-sizing: border-box;
}
.wqu-flavor-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
}
.wqu-flavor-caption {
	flex: 0 0 auto;
	min-width: 52px;
	color: var(--wqu-bar-subtitle-color, #555);
	font-size: 12px;
	font-weight: 600;
}
/* Hidden native select keeps the real value / form submission. */
.wqu-flavor-select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Custom, image-aware dropdown. */
.wqu-dd {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	outline: none;
}
.wqu-dd-current {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	border: 1.5px solid var(--wqu-bar-border, #c4c8d2);
	border-radius: var(--wqu-radius, 8px);
	background: #fff;
	cursor: pointer;
	line-height: 1.2;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wqu-dd:hover .wqu-dd-current,
.wqu-dd--open .wqu-dd-current {
	border-color: var(--wqu-bar-selected-border, #0d1e47);
}
.wqu-dd--open .wqu-dd-current {
	box-shadow: 0 0 0 1px var(--wqu-bar-selected-border, #0d1e47) inset;
}
.wqu-flavors .wqu-dd-img,
img.wqu-dd-img {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 8px !important;
	object-fit: cover;
	background: #f2f2f2;
	display: block;
	overflow: hidden;
}
.wqu-dd-img--empty {
	background: #ececec;
}
.wqu-dd-label {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--wqu-bar-title-color, #000);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wqu-dd-caret {
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--wqu-bar-subtitle-color, #777);
	transition: transform .15s ease;
}
.wqu-dd--open .wqu-dd-caret {
	transform: rotate(180deg);
}
.wqu-dd-menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 4px;
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	max-height: 240px;
	overflow-y: auto;
	background: #fff;
	border: 1.5px solid var(--wqu-bar-selected-border, #0d1e47);
	border-radius: var(--wqu-radius, 8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	display: none;
}
.wqu-dd--open .wqu-dd-menu {
	display: block;
}
.wqu-dd-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 6px;
	cursor: pointer;
}
.wqu-dd-opt:hover {
	background: var(--wqu-bar-bg, #f2f2f2);
}
.wqu-dd-opt.is-active {
	background: var(--wqu-label-bg, #e6ebf5);
}
@media (max-width: 480px) {
	.wqu-flavor-row { gap: 8px; }
	.wqu-flavor-caption { min-width: 44px; }
}

/* --- Modern product gallery thumbnails ------------------------------------ */
/* Styles WooCommerce's built-in FlexSlider thumbnail row (.flex-control-thumbs)
   into a clean, rounded, single-row strip under the main image. When there are
   more thumbs than fit, the row scrolls horizontally. Clicking a thumb already
   swaps the main image via FlexSlider; this is purely visual. The main image is
   intentionally left with its original (square) corners. */
.woocommerce-product-gallery .flex-control-thumbs {
	--wqu-thumbs-gap: 10px;
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: var(--wqu-thumbs-gap);
	margin: 14px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
	/* !important: some themes force overflow:hidden on the FlexSlider control nav,
	   which clips the extra thumbnails and makes the row impossible to scroll. */
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch;
	/* Hide the scrollbar itself; the row is still scrollable/swipeable. */
	scrollbar-width: none;
	-ms-overflow-style: none;
	/* Tell the browser this row scrolls horizontally so FlexSlider's swipe
	   handling doesn't fight the native scroll. */
	touch-action: pan-x;
}
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}
/* Each thumb takes an equal share of the row so exactly N (admin-configured,
   default 5) fit across the visible width; any extras scroll horizontally. */
.woocommerce-product-gallery .flex-control-thumbs li {
	flex: 0 0 calc((100% - (var(--wqu-thumbs-visible, 5) - 1) * var(--wqu-thumbs-gap)) / var(--wqu-thumbs-visible, 5)) !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	list-style: none !important;
	line-height: 0;
}
.woocommerce-product-gallery .flex-control-thumbs li img {
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 12px !important;
	border: 2px solid var(--wqu-thumb-border, #e6e6e6) !important;
	cursor: pointer;
	opacity: .7;
	display: block;
	box-sizing: border-box;
	transition: opacity .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.woocommerce-product-gallery .flex-control-thumbs li img:hover {
	opacity: 1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	opacity: 1;
	border-color: var(--wqu-bar-selected-border, #0d1e47) !important;
}
@media (max-width: 480px) {
	.woocommerce-product-gallery .flex-control-thumbs {
		--wqu-thumbs-gap: 8px;
		/* Breathing room at both ends of the scrollable row. */
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* --- Product image lightbox (PhotoSwipe) caption --------------------------- */
/* WooCommerce fills PhotoSwipe's caption bar from each image's title/alt text,
   which shows as a line of text under the enlarged image. Hide it so the
   lightbox shows only the image. */
.pswp__caption {
	display: none !important;
}
