/* OZB Variation Swatches — shop / archive loop (module d). Restrained, classy. */

.ozb-vs-loop {
	margin: 6px 0 10px;
}

.ozb-vs-loop-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	align-items: center;
	margin: 0 0 10px;
}

/*
 * Geometry is pinned with !important so theme button styles (Flatsome adds min-width,
 * padding and line-height to buttons) can't stretch the dots into ovals.
 */
.ozb-vs-loop-swatches .ozb-vs-swatch {
	flex: 0 0 auto;
	box-sizing: border-box !important;
	display: inline-block !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 22px !important;
	min-height: 22px !important;
	max-width: 22px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid #d3d3d3 !important;
	border-radius: 50% !important;
	line-height: 0 !important;
	aspect-ratio: 1 / 1;
	background: #fff;
	box-shadow: none;
	cursor: pointer;
	overflow: hidden;
	vertical-align: middle;
	transition: transform .12s ease, box-shadow .12s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ozb-vs-loop-swatches .ozb-vs-swatch .ozb-vs-chip {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

.ozb-vs-loop-swatches .ozb-vs-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.ozb-vs-loop-swatches .ozb-vs-swatch:hover {
	transform: scale(1.1);
}

/* Universal selected ring: white gap + dark outer, readable on any colour. */
.ozb-vs-loop-swatches .ozb-vs-swatch.is-selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #222;
	border-color: #222 !important;
}

.ozb-vs-loop-swatches .ozb-vs-swatch:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

/* Button feedback (kept subtle; inherits the theme's .button styling). */
.ozb-vs-loop-btn.is-loading {
	opacity: .7;
	pointer-events: none;
}

.ozb-vs-loop-btn.is-added {
	opacity: .9;
}

/*
 * Equal-height grids (Flatsome "equalize-box"): the swatches live inside the equalised
 * .add-to-cart-button wrapper, so every card reserves matching space. We lay that wrapper
 * out as a column and pin the button to the bottom, so swatch cards and plain cards keep
 * their buttons on the same line. Scoped to .equalize-box, so non-equalised grids and
 * other themes are untouched.
 */
.equalize-box .add-to-cart-button {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.equalize-box .add-to-cart-button > a,
.equalize-box .add-to-cart-button > .button {
	margin-top: auto;
}

.add-to-cart-button .ozb-vs-loop-swatches {
	margin: 2px 0 10px;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.ozb-vs-loop-swatches .ozb-vs-swatch { transition: none; }
	.ozb-vs-loop-swatches .ozb-vs-swatch:hover { transform: none; }
}
