/**
 * Qing Variation Add-to-Cart styles.
 *
 * Attribute dropdown(s) on top, then a row with the quantity stepper and
 * a full-width black "Add To Cart" button, matching the reference design.
 */

.qing-vcart {
	width: 100%;
	max-width: 100%;
}

.qing-vcart__notice,
.qing-vcart__hint {
	color: #777;
	font-size: 13px;
	margin-top: 8px;
}

/* ---- Attributes / dropdowns ------------------------------------------ */
.qing-vcart__attributes {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 16px;
}

.qing-vcart__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.qing-vcart__label {
	font-size: 15px;
	color: #333;
	line-height: 1.4;
}

.qing-vcart__select-wrap {
	position: relative;
	width: 100%;
}

.qing-vcart__select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	height: 52px;
	padding: 0 44px 0 16px;
	font-size: 16px;
	color: #111;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 0;
	line-height: 1.2;
	cursor: pointer;
	box-sizing: border-box;
}

.qing-vcart__select:focus {
	outline: none;
	border-color: #111;
}

/* The opened dropdown list is rendered by the OS with a light background,
 * so force dark option text (otherwise white-on-white is invisible). */
.qing-vcart__select option {
	color: #111;
	background-color: #fff;
}

.qing-vcart__chevron {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	pointer-events: none;
	display: inline-flex;
	line-height: 0;
}

.qing-vcart__chevron svg {
	width: 22px;
	height: 22px;
	fill: #333;
}

/* ---- Row: quantity + button ------------------------------------------ */
.qing-vcart__row {
	display: flex;
	align-items: stretch;
	gap: 12px;
}

/* Quantity stepper */
.qing-vcart__qty {
	display: inline-flex;
	align-items: center;
	width: 160px;
	flex: 0 0 auto;
	border: 1px solid #ddd;
	background-color: #fff;
	color: #111;
	box-sizing: border-box;
}

.qing-vcart__qty-btn {
	flex: 0 0 auto;
	width: 44px;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	font-size: 20px;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	padding: 0;
	user-select: none;
	-webkit-user-select: none;
	transition: opacity 0.2s ease;
}

.qing-vcart__qty-btn:hover {
	opacity: 0.6;
}

.qing-vcart__qty-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -3px;
}

.qing-vcart__qty-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	pointer-events: none;
}

.qing-vcart__qty-btn i {
	pointer-events: none;
}

.qing-vcart__qty-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 16px;
	color: inherit;
	padding: 0;
	-moz-appearance: textfield;
}

.qing-vcart__qty-input::-webkit-outer-spin-button,
.qing-vcart__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.qing-vcart__qty-input:focus {
	outline: none;
}

/* Add to cart button */
.qing-vcart__btn {
	flex: 1 1 auto;
	min-height: 56px;
	height: 56px;
	border: 0;
	background-color: #fff;
	color: #111;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	border-radius: 0;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	padding: 0 20px;
	user-select: none;
	-webkit-user-select: none;
}

.qing-vcart__btn:hover {
	background-color: #e0e0e0;
}

.qing-vcart__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.qing-vcart__btn-icon {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.qing-vcart__btn-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	pointer-events: none;
}

.qing-vcart__btn[aria-disabled="true"],
.qing-vcart__btn.is-loading {
	opacity: 0.55;
	cursor: not-allowed;
}

.qing-vcart__btn.is-loading {
	position: relative;
	color: transparent;
}

.qing-vcart__btn.is-loading .qing-vcart__btn-icon,
.qing-vcart__btn.is-loading .qing-vcart__btn-text {
	visibility: hidden;
}

.qing-vcart__btn.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(0, 0, 0, 0.25);
	border-top-color: #111;
	border-radius: 50%;
	animation: qing-vcart-spin 0.7s linear infinite;
}

@keyframes qing-vcart-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---- Feedback message ------------------------------------------------- */
.qing-vcart__message {
	margin-top: 12px;
	font-size: 14px;
	min-height: 0;
}

.qing-vcart__message.is-error {
	color: #c0392b;
}

.qing-vcart__message.is-success {
	color: #1e7e34;
}

.qing-vcart__message a {
	color: inherit;
	text-decoration: underline;
	margin-left: 6px;
}
