/* ==========================================================================
   Commander & WhatsApp: luxury theme
   Colors come from CSS variables set in the plugin settings:
   --wcw-primary, --wcw-accent, --wcw-wa
   ========================================================================== */

/* ---------- Buy row: quantity on top, buttons side by side ---------- */

.wcw-buy {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: .8em;
}

.wcw-buy .quantity {
	flex: 0 0 100%;
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	margin: 0 0 .2em !important;
	float: none !important;
}

.wcw-buy .quantity::before {
	content: "Quantité";
	display: block;
	margin-bottom: .55em;
	font-size: .72em;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #6b6b6b;
}

/* Quantity stepper */
.wcw-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 2px;
	background: #fff;
	overflow: hidden;
}

.wcw-stepper .qty {
	width: 3.4em !important;
	min-height: 46px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1px solid rgba(0, 0, 0, .1) !important;
	border-right: 1px solid rgba(0, 0, 0, .1) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-align: center;
	font-weight: 600;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.wcw-step {
	width: 46px;
	min-height: 46px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--wcw-primary, #111) !important;
	font-size: 1.25em;
	line-height: 1;
	cursor: pointer;
	box-shadow: none !important;
	transition: background .2s ease, color .2s ease;
}

.wcw-step:hover {
	background: var(--wcw-primary, #111) !important;
	color: #fff !important;
}

/* Shared button look (Commander, WhatsApp, form buttons) */
.wcw-buy .single_add_to_cart_button,
.wcw-buy .wcw-whatsapp,
.wcw-commander,
.wcw-submit,
.wcw-wa-submit {
	box-sizing: border-box;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .6em;
	min-height: 52px;
	margin: 0 !important;
	padding: .85em 1.4em !important;
	border-radius: 2px !important;
	font-size: .82em !important;
	font-weight: 600 !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none !important;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
	transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease, filter .25s ease;
}

.wcw-buy .single_add_to_cart_button,
.wcw-buy .wcw-whatsapp {
	flex: 1 1 0;
	min-width: 150px;
}

/* Commander = deep main color with gold hairline */
.wcw-buy .single_add_to_cart_button,
.wcw-commander,
.wcw-submit {
	background: var(--wcw-primary, #111) !important;
	color: #fff !important;
	border: 1px solid var(--wcw-accent, #c8a35a) !important;
}

.wcw-buy .single_add_to_cart_button:hover,
.wcw-commander:hover,
.wcw-submit:hover {
	background: var(--wcw-accent, #c8a35a) !important;
	color: var(--wcw-primary, #111) !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

/* WhatsApp */
.wcw-whatsapp,
.wcw-whatsapp:visited,
.wcw-wa-submit {
	background: var(--wcw-wa, #25d366) !important;
	color: #fff !important;
	border: 1px solid var(--wcw-wa, #25d366) !important;
}

.wcw-whatsapp:hover,
.wcw-whatsapp:focus,
.wcw-wa-submit:hover {
	color: #fff !important;
	filter: brightness(.9);
	transform: translateY(-1px);
}

.wcw-whatsapp .wcw-icon {
	display: inline-flex;
}

.wcw-whatsapp .wcw-icon svg {
	width: 1.45em;
	height: 1.45em;
	fill: currentColor;
}

.wcw-submit:disabled,
.wcw-wa-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
	transform: none;
}

/* ---------- Shop loop: Commander + WhatsApp side by side ---------- */

.wcw-loop-actions {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: stretch;
	gap: .5em;
	width: 100%;
}

.wcw-loop-actions .wcw-commander,
.wcw-loop-actions > .button:not(.wcw-whatsapp) {
	flex: 1 1 auto;
	min-height: 46px;
	padding: .7em 1em !important;
}

/* WhatsApp is icon-only in the loop so both buttons always fit on one line */
.wcw-loop-actions .wcw-whatsapp {
	flex: 0 0 46px;
	min-width: 46px;
	min-height: 46px;
	padding: 0 !important;
}

.wcw-loop-actions .wcw-whatsapp .wcw-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Direct order panel (below the buttons) ---------- */

.wcw-direct {
	box-sizing: border-box;
	width: 100%;
	clear: both;
	margin: 1.2em 0;
	padding: 1.8em 1.6em 1.4em;
	border: 1px solid rgba(0, 0, 0, .08);
	border-top: 2px solid var(--wcw-accent, #c8a35a);
	border-radius: 2px;
	background: #fff;
	color: #1b1b1b;
	box-shadow: 0 22px 48px rgba(0, 0, 0, .09);
	animation: wcwIn .38s ease both;
}

.wcw-direct[hidden] {
	display: none !important;
}

@keyframes wcwIn {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.wcw-direct__title {
	margin: 0 0 1.1em;
	text-align: center;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.2em;
	font-weight: 400;
	letter-spacing: .03em;
	color: var(--wcw-primary, #111);
}

.wcw-direct__title::after {
	content: "";
	display: block;
	width: 54px;
	height: 1px;
	margin: .8em auto 0;
	background: var(--wcw-accent, #c8a35a);
}

.wcw-total {
	margin: 0 0 1.4em;
	padding: .75em 1em;
	text-align: center;
	font-size: .85em;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wcw-primary, #111);
	background: #faf6ec;
	background: color-mix(in srgb, var(--wcw-accent, #c8a35a) 14%, transparent);
	border-radius: 2px;
}

.wcw-total:empty {
	display: none;
}

.wcw-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.4em;
}

.wcw-field {
	margin: 0 0 1.1em;
}

.wcw-field label {
	display: block;
	font-size: .7em;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.wcw-field abbr {
	color: var(--wcw-accent, #c8a35a);
	text-decoration: none;
}

.wcw-field input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: .2em 0 0;
	padding: .7em .1em !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(0, 0, 0, .22) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 1rem;
	color: #1b1b1b;
	transition: border-color .2s ease;
}

.wcw-field input:focus {
	outline: none;
	border-bottom-color: var(--wcw-accent, #c8a35a) !important;
	box-shadow: 0 1px 0 var(--wcw-accent, #c8a35a) !important;
}

.wcw-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wcw-msg {
	margin: 0 0 1em;
	font-size: .92em;
	text-align: center;
}

.wcw-msg:empty {
	display: none;
}

.wcw-msg--error {
	color: #b3261e;
}

.wcw-msg--success {
	color: #1a7f37;
	font-weight: 600;
}

.wcw-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .8em;
}

.wcw-actions .button {
	flex: 1 1 200px;
}

.wcw-note {
	margin: 1.1em 0 0;
	text-align: center;
	font-size: .7em;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #8a8a8a;
}

@media (max-width: 520px) {
	.wcw-fields {
		grid-template-columns: 1fr;
	}

	.wcw-direct {
		padding: 1.4em 1.1em 1.1em;
	}
}
