/* WooCommerce Swatches for Elementor */

.wcse-wrap {
	font-family: inherit;
	color: inherit;
	max-width: 100%;
	overflow: visible;
	box-sizing: border-box;
}

.wcse-placeholder {
	padding: 12px;
	border: 1px dashed #c8c8c8;
	color: #666;
	font-size: 13px;
	text-align: center;
}

.wcse-attr-row {
	margin-bottom: 18px;
}

.wcse-attr-row.is-hidden {
	display: none !important;
}

.wcse-attr-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
}

.wcse-attr-title-label::after {
	content: ':';
	margin-left: 2px;
}

.wcse-attr-selected {
	font-weight: 400;
	color: #555;
}

.wcse-swatch-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: 100%;
	white-space: normal;
}

.wcse-swatch {
	--wcse-h: 40px;
	--wcse-w: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wcse-w);
	max-width: 100%;
	height: var(--wcse-h);
	padding: 0 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 0;
	border: 1px solid #ddd;
	background-color: #fff;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	color: #222;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
	position: relative;
	box-sizing: border-box;
	user-select: none;
}

.wcse-swatch:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Render-type variants */
.wcse-swatch--color,
.wcse-swatch--image {
	width: var(--wcse-w);
	padding: 0;
	overflow: hidden;
}

.wcse-swatch--label {
	min-width: var(--wcse-w);
}

/* Hidden swatch text — label is invisible but still provides accessible
   content via screen-reader-text. The swatch uses its explicit width. */
.wcse-swatch.wcse-hide-text {
	font-size: 0 !important;
	color: transparent !important;
}
.wcse-swatch.wcse-hide-text .wcse-swatch-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Shapes */
.wcse-shape-square .wcse-swatch {
	border-radius: 0;
}
.wcse-shape-rounded .wcse-swatch {
	border-radius: 6px;
}
.wcse-shape-circle .wcse-swatch {
	border-radius: 50%;
}
.wcse-shape-pill .wcse-swatch {
	border-radius: 999px;
}

/* Hidden screen-reader text */
.wcse-swatch .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Selected state */
.wcse-swatch.is-selected {
	border-color: #111;
	box-shadow: 0 0 0 2px #111;
	transform: scale(1.02);
}

/* Disabled state visualizations */
.wcse-swatch.is-disabled {
	cursor: not-allowed;
	pointer-events: none;
}

.wcse-unavail-fade .wcse-swatch.is-disabled {
	opacity: 0.35;
	filter: grayscale(100%);
}

.wcse-unavail-strike .wcse-swatch.is-disabled {
	opacity: 0.6;
}
.wcse-unavail-strike .wcse-swatch.is-disabled::after {
	content: '';
	position: absolute;
	left: -2px;
	right: -2px;
	top: 50%;
	height: 1px;
	background: #d33;
	transform: rotate(-20deg);
	pointer-events: none;
}

.wcse-unavail-hide .wcse-swatch.is-disabled {
	display: none !important;
}

/* Meta block (price + stock) */
.wcse-meta {
	margin-top: 6px;
	margin-bottom: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
}

.wcse-price {
	font-size: 18px;
	font-weight: 600;
}

.wcse-stock {
	font-size: 13px;
	color: #555;
}

.wcse-stock.in-stock {
	color: #1a7f37;
}
.wcse-stock.out-of-stock {
	color: #b42318;
}

/* Add to cart row (quantity + button) */
.wcse-cart-form {
	margin-top: 8px;
}

.wcse-cart-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

/* Quantity stepper: [ − ][ 1 ][ + ] */
.wcse-qty-wrap {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	height: 44px;
	max-width: 120px;
}

.wcse-qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 100%;
	border: none;
	background: #f5f5f5;
	color: #333;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	padding: 0;
	line-height: 1;
	transition: background-color 0.15s ease;
}

.wcse-qty-btn:hover {
	background: #e8e8e8;
}

.wcse-qty-btn:active {
	background: #ddd;
}

/* High specificity to beat theme global input[type=number] rules */
.wcse-qty-wrap input.wcse-qty[type="number"] {
	width: 48px;
	height: 100%;
	padding: 0;
	border: none;
	border-left: 1px solid #ddd;
	border-right: 1px solid #ddd;
	border-top: none;
	border-bottom: none;
	border-radius: 0;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: none;
	box-sizing: border-box;
	background: #fff;
	min-width: 0;
	max-width: none;
	outline: none;
	box-shadow: none;
}

.wcse-qty-wrap input.wcse-qty[type="number"]::-webkit-inner-spin-button,
.wcse-qty-wrap input.wcse-qty[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wcse-qty-wrap input.wcse-qty[type="number"]:focus {
	outline: none;
	box-shadow: none;
}

.wcse-add-to-cart {
	background-color: #111;
	color: #fff;
	border: none;
	padding: 12px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 4px;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.wcse-add-to-cart:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.wcse-add-to-cart:not(:disabled):hover {
	transform: translateY(-1px);
}

.wcse-add-to-cart.is-loading {
	opacity: 0.8;
	cursor: wait;
}

.wcse-cart-feedback {
	margin-top: 8px;
	font-size: 13px;
	min-height: 1em;
}

.wcse-cart-feedback.is-success {
	color: #1a7f37;
}

.wcse-cart-feedback.is-error {
	color: #b42318;
}
