.osty-lps {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 18px 0 20px;
	clear: both;
}

.osty-lps__label {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #6a6a6a;
}

.osty-lps__items {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.osty-lps__item-wrap {
	display: inline-flex;
}

.osty-lps__item {
	width: 82px;
	height: 82px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: #fff;
	box-shadow: none;
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.osty-lps__item:hover,
.osty-lps__item:focus-visible {
	border-color: #8b8b8b;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	outline: none;
}

.osty-lps__item:active {
	transform: scale(0.98);
}

.osty-lps__item.is-active {
	border-color: #303030;
	box-shadow: 0 0 0 1px #303030;
}

.osty-lps__item.is-active[href] {
	cursor: pointer;
}

.osty-lps__item[data-osty-lps-tooltip] {
	position: relative;
}

.osty-lps__item[data-osty-lps-tooltip]::before,
.osty-lps__item[data-osty-lps-tooltip]::after {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 9px);
	transform: translate(-50%, 6px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
	z-index: 20;
}

.osty-lps__item[data-osty-lps-tooltip]::before {
	content: attr(data-osty-lps-tooltip);
	min-width: max-content;
	max-width: 220px;
	padding: 7px 10px;
	border-radius: 4px;
	background: rgba(32, 32, 32, 0.94);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.osty-lps__item[data-osty-lps-tooltip]::after {
	content: "";
	bottom: calc(100% + 3px);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid rgba(32, 32, 32, 0.94);
}

.osty-lps__item[data-osty-lps-tooltip]:hover::before,
.osty-lps__item[data-osty-lps-tooltip]:hover::after,
.osty-lps__item[data-osty-lps-tooltip]:focus-visible::before,
.osty-lps__item[data-osty-lps-tooltip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.osty-lps__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 3px;
	display: block;
}

/* Keep the swatch block isolated from Osty quantity and button layouts. */
form.cart > .osty-lps,
form.variations_form > .osty-lps,
.ms-variations_form > .osty-lps,
.woocommerce div.product form.cart > .osty-lps {
	flex: 0 0 100%;
	align-self: stretch;
}

.osty-lps + .ms-variations--qty,
.osty-lps + .ms-variations {
	margin-top: 0;
}

/* Osty theme compatibility: avoid inherited button styles on swatch links. */
.single-product .osty-lps a.osty-lps__item,
.woocommerce div.product .osty-lps a.osty-lps__item,
.elementor-widget-osty_linked_product_swatches a.osty-lps__item {
	color: inherit;
	background: #fff;
	padding: 3px;
	line-height: 1;
}

@media (max-width: 767px) {
	.osty-lps {
		margin: 16px 0;
	}

	.osty-lps__label {
		font-size: 12px;
		margin-bottom: 9px;
	}

	.osty-lps__items {
		gap: 8px;
	}

	.osty-lps__item {
		width: 68px;
		height: 68px;
	}

	.osty-lps--mobile-auto .osty-lps__items {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		padding-bottom: 4px;
	}

	.osty-lps--mobile-auto .osty-lps__item-wrap {
		flex: 0 0 auto;
	}

	.osty-lps--mobile-compact .osty-lps__items {
		flex-wrap: wrap;
	}
}

@media (max-width: 390px) {
	.osty-lps__item {
		width: 62px;
		height: 62px;
	}
}
