/**
 * HalalEco Quantity Stepper
 * Change --hqs-green below to match your brand if needed.
 */

:root {
	--hqs-green: #5da22b;
	--hqs-green-dark: #4c8a22;
	--hqs-radius: 6px;
	--hqs-height: 52px;
	/* Side gap between the button and the edge of the product card. */
	--hqs-inset: 14px;
}

.hqs {
	position: relative;
	display: block;
	width: 100%;
	margin-top: 12px;
	clear: both;
}

.hqs [hidden] {
	display: none !important;
}

/* ---------- "Add to cart" (shown until the item is in the cart) ------- */

.hqs .hqs-add {
	display: block;
	width: 100%;
	min-height: var(--hqs-height);
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: var(--hqs-radius);
	background: var(--hqs-green);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: var(--hqs-height);
	text-align: center;
	text-transform: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.hqs .hqs-add:hover,
.hqs .hqs-add:focus {
	background: var(--hqs-green-dark);
	color: #fff;
}

/* ---------- − / count / + control ------------------------------------ */

.hqs .hqs-control {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: var(--hqs-height);
	background: var(--hqs-green);
	border-radius: var(--hqs-radius);
	overflow: hidden;
}

.hqs .hqs-btn {
	flex: 0 0 24%;
	min-width: 44px;
	max-width: 96px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--hqs-green);
	color: #fff;
	font-size: 24px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hqs .hqs-btn:hover,
.hqs .hqs-btn:focus {
	background: var(--hqs-green-dark);
	color: #fff;
	outline: none;
}

.hqs .hqs-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hqs .hqs-qty {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 3px;
	padding: 0 4px;
	border: 0;
	border-radius: 2px;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
}

.hqs .hqs-qty:focus {
	outline: 2px solid var(--hqs-green-dark);
	outline-offset: -2px;
}

.hqs .hqs-qty::-webkit-outer-spin-button,
.hqs .hqs-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------- Busy / error states -------------------------------------- */

.hqs--busy {
	opacity: 0.75;
}

.hqs--busy .hqs-btn,
.hqs--busy .hqs-add {
	cursor: progress;
}

.hqs .hqs-msg {
	display: none;
	margin-top: 6px;
	color: #b3261e;
	font-size: 13px;
	line-height: 1.35;
	text-align: center;
}

.hqs--error .hqs-msg {
	display: block;
}

/* ---------- Context tweaks ------------------------------------------- */

/**
 * Product grid.
 *
 * Themify's product cards have no horizontal padding in their resting
 * state (padding: 0 0 14px), so a 100%-wide button runs edge to edge and
 * gets its corners clipped by the card's overflow:hidden. Inset it here
 * instead of relying on the card. Adjust --hqs-inset to taste.
 */
ul.products li.product .hqs,
.woocommerce ul.products li.product .hqs,
.products .product .hqs--loop {
	width: auto;
	margin-top: 14px;
	margin-right: var(--hqs-inset);
	margin-bottom: 2px;
	margin-left: var(--hqs-inset);
}

/* Hide any leftover theme add-to-cart markup in the loop. */
ul.products li.product .hqs ~ .add_to_cart_button,
ul.products li.product .hqs ~ .added_to_cart {
	display: none !important;
}

/* Single product page. */
.hqs-single-wrap {
	max-width: 320px;
	margin: 20px 0 24px;
}

.hqs--single .hqs-control,
.hqs--single .hqs-add {
	min-height: 56px;
}

/* Small screens. */
@media ( max-width: 480px ) {
	.hqs {
		--hqs-height: 44px;
	}

	.hqs .hqs-btn {
		font-size: 20px;
		min-width: 40px;
	}

	.hqs .hqs-qty {
		font-size: 16px;
	}
}


/* HalalEco W-13 (18/11/2026) : unité de vente + confirmation d'ajout */
.hqs-price-unit{font-size:.8em;font-weight:400;color:#666;margin-left:3px;white-space:nowrap}
.hqs-unit-line{display:block;margin-top:6px;font-size:12px;font-weight:700;line-height:1.2;color:#4d731a;text-align:center;white-space:nowrap}
.hqs-unit-line[hidden]{display:none}
.hqs-toast{position:fixed;left:50%;bottom:24px;z-index:99999;display:flex;align-items:center;gap:14px;max-width:calc(100% - 32px);padding:12px 18px;border-radius:10px;background:#1c1c1c;color:#fff;font-size:14px;line-height:1.35;box-shadow:0 6px 24px rgba(0,0,0,.25);opacity:0;pointer-events:none;transform:translate(-50%,20px);transition:opacity .25s,transform .25s}
.hqs-toast.is-on{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
.hqs-toast a{color:#9ccc4a;font-weight:700;text-decoration:none;white-space:nowrap}
.hlc-unit{margin-left:3px;font-size:12px;font-weight:700;color:#4d731a;white-space:nowrap}
