/*!
 * Hilal COD — order form
 * Mobile-first. Every rule is scoped under .hcod so theme styles can't leak in
 * (and ours can't leak out). Colors and sizes come from CSS variables printed
 * by the plugin from the dashboard settings.
 */

/* ---------- Tokens (fallbacks if inline variables are missing) ---------- */
.hcod,
.hcod-sticky,
.hcod-wa {
	--hc-primary: #3d6fe0;
	--hc-primary-hover: #2c58c2;
	--hc-on-primary: #fff;
	--hc-card: #fff;
	--hc-card-border: #e3e8f2;
	--hc-text: #14213d;
	--hc-muted: #7a869a;
	--hc-field: #f6f8fc;
	--hc-field-border: #e1e7f0;
	--hc-head: #3d6fe0;
	--hc-on-head: #fff;
	--hc-summary: #fff;
	--hc-total: #eef3ff;
	--hc-on-total: #2c58c2;
	--hc-error: #e5484d;
	--hc-success: #16a34a;
	--hc-font: inherit;
	--hc-max: 560px;
	--hc-radius: 18px;
	--hc-field-radius: 14px;
	--hc-field-h: 50px;
	--hc-fs: 15px;
	--hc-btn-h: 56px;
	--hc-btn-fs: 18px;
	--hc-gap: 12px;
	--hc-bw: 1px;
	--hc-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -6px rgba(16, 24, 40, .1);
	--hc-tint: color-mix(in srgb, var(--hc-primary) 9%, var(--hc-card));
	--hc-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Shell ---------- */
.hcod {
	container-type: inline-size;
	width: 100%;
	max-width: var(--hc-max);
	margin: 16px 0 20px;
	font-family: var(--hc-font);
	font-size: var(--hc-fs);
	line-height: 1.5;
	color: var(--hc-text);
	text-align: start;
	clear: both;
}
.hcod *,
.hcod *::before,
.hcod *::after { box-sizing: border-box; }
.hcod[hidden],
.hcod [hidden] { display: none !important; }

.hcod .hcod__card {
	position: relative;
	overflow: hidden;
	background: var(--hc-card);
	border: var(--hc-bw) solid var(--hc-card-border);
	border-radius: var(--hc-radius);
	box-shadow: var(--hc-shadow);
}

/* ---------- Header ---------- */
.hcod .hcod__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 11px 16px;
	background: var(--hc-head);
	color: var(--hc-on-head);
	font-size: .86em;
	font-weight: 600;
}
.hcod .hcod__head-title,
.hcod .hcod__head-badge { display: inline-flex; align-items: center; gap: 6px; }
.hcod .hcod__head-badge { font-weight: 500; opacity: .92; }
.hcod .hcod__head .hcod-icon { width: 16px; height: 16px; }

/* ---------- Form body ---------- */
.hcod .hcod__form {
	display: flex;
	flex-direction: column;
	gap: calc(var(--hc-gap) + 2px);
	margin: 0;
	padding: 18px 16px 18px;
	border: 0;
	background: none;
}
.hcod .hcod__title {
	margin: 2px 0 0;
	text-align: center;
	font-size: 1.18em;
	font-weight: 700;
	line-height: 1.35;
	color: var(--hc-text);
}
.hcod .hcod__label {
	display: block;
	margin: 0 0 8px;
	font-size: .9em;
	font-weight: 600;
	color: var(--hc-text);
}
.hcod .hcod__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Fields ---------- */
.hcod .hcod__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--hc-gap);
}
.hcod .hcod__field { position: relative; grid-column: span 1; min-width: 0; }
.hcod .hcod__field--full { grid-column: 1 / -1; }

@container (max-width: 299px) {
	.hcod .hcod__grid { grid-template-columns: minmax(0, 1fr); }
	.hcod .hcod__field { grid-column: 1 / -1; }
}

.hcod .hcod__input {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: var(--hc-field-h);
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: max(16px, var(--hc-fs)); /* 16px+ stops iOS from zooming in on focus */
	line-height: 1.2;
	color: var(--hc-text);
	background-color: var(--hc-field);
	border: 1px solid var(--hc-field-border);
	border-radius: var(--hc-field-radius);
	box-shadow: none;
	outline: 0;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.hcod .hcod__input::placeholder { color: var(--hc-muted); opacity: 1; }
.hcod .hcod__input:hover { border-color: color-mix(in srgb, var(--hc-primary) 35%, var(--hc-field-border)); }
.hcod .hcod__input:focus {
	background-color: var(--hc-card);
	border-color: var(--hc-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hc-primary) 18%, transparent);
}
.hcod .hcod__input:disabled { cursor: not-allowed; opacity: .6; }
.hcod .hcod__input--area { height: auto; min-height: calc(var(--hc-field-h) * 1.6); padding-top: 12px; padding-bottom: 12px; resize: vertical; }
/* Digits and e-mails read left-to-right, but stay aligned with the form. */
.hcod .hcod__input[type="tel"],
.hcod .hcod__input[type="email"] { unicode-bidi: plaintext; }
.hcod .hcod__input[type="tel"]::placeholder { direction: ltr; }

.hcod .hcod__select {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a869a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 13px center;
	background-size: 12px;
	text-overflow: ellipsis;
}
.hcod[dir="ltr"] .hcod__select { background-position: right 13px center; }
.hcod .hcod__select:invalid,
.hcod .hcod__select.is-empty { color: var(--hc-muted); }
.hcod .hcod__select option { color: var(--hc-text); }

.hcod[dir="rtl"] .hcod__field.has-icon .hcod__input { padding-right: 36px; padding-left: 10px; }
.hcod[dir="ltr"] .hcod__field.has-icon .hcod__input { padding-left: 36px; padding-right: 10px; }
.hcod[dir="rtl"] .hcod__field .hcod__select { padding-left: 34px; }
.hcod[dir="ltr"] .hcod__field .hcod__select { padding-right: 34px; }
.hcod .hcod__field-icon {
	position: absolute;
	right: 13px;
	top: calc(var(--hc-field-h) / 2);
	transform: translateY(-50%);
	display: flex;
	color: var(--hc-muted);
	pointer-events: none;
	transition: color .15s;
}
.hcod[dir="ltr"] .hcod__field-icon { right: auto; left: 13px; }
.hcod .hcod__field-icon .hcod-icon { width: 17px; height: 17px; }
.hcod .hcod__field:focus-within .hcod__field-icon { color: var(--hc-primary); }

/* Errors */
.hcod .hcod__error {
	display: block;
	min-height: 0;
	margin-top: 5px;
	font-size: .8em;
	font-weight: 500;
	line-height: 1.35;
	color: var(--hc-error);
}
.hcod .hcod__error:empty { display: none; }
.hcod .hcod__field.is-invalid .hcod__input { border-color: var(--hc-error); background-color: color-mix(in srgb, var(--hc-error) 5%, var(--hc-card)); }
.hcod .hcod__field.is-invalid .hcod__field-icon { color: var(--hc-error); }
.hcod .hcod__field.is-invalid { animation: hcod-nudge .32s var(--hc-ease); }

/* ---------- Variations ---------- */
.hcod .hcod__variations { display: flex; flex-direction: column; gap: 12px; }
.hcod .hcod__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.hcod .hcod__swatch {
	-webkit-appearance: none;
	appearance: none;
	min-width: 48px;
	min-height: 40px;
	margin: 0;
	padding: 6px 16px;
	font: inherit;
	font-size: .92em;
	font-weight: 500;
	line-height: 1.2;
	color: var(--hc-text);
	text-transform: none;
	letter-spacing: normal;
	background: var(--hc-field);
	border: 1.5px solid var(--hc-field-border);
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s;
}
.hcod .hcod__swatch:hover { border-color: var(--hc-primary); background: var(--hc-field); color: var(--hc-text); }
.hcod .hcod__swatch[aria-checked="true"] {
	border-color: var(--hc-primary);
	background: var(--hc-tint);
	color: var(--hc-primary);
	font-weight: 600;
}
.hcod .hcod__swatch.is-out { opacity: .4; text-decoration: line-through; }
.hcod .hcod__swatch:focus-visible { outline: 2px solid var(--hc-primary); outline-offset: 2px; }

/* ---------- Offers ---------- */
.hcod .hcod__offers { display: flex; flex-direction: column; gap: 8px; }
.hcod .hcod__offer {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	background: var(--hc-card);
	border: 1.5px solid var(--hc-field-border);
	border-radius: var(--hc-field-radius);
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.hcod .hcod__offer:hover { border-color: color-mix(in srgb, var(--hc-primary) 45%, var(--hc-field-border)); }
.hcod .hcod__offer input { position: absolute; opacity: 0; pointer-events: none; }
.hcod .hcod__offer-dot {
	flex: none;
	width: 20px; height: 20px;
	border: 2px solid var(--hc-field-border);
	border-radius: 50%;
	transition: border-color .15s, border-width .15s;
}
.hcod .hcod__offer-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1; min-width: 0; }
.hcod .hcod__offer-label { font-weight: 600; }
.hcod .hcod__offer-badge {
	padding: 2px 8px;
	font-size: .75em;
	font-weight: 600;
	color: var(--hc-on-primary);
	background: var(--hc-primary);
	border-radius: 999px;
}
.hcod .hcod__offer-price { font-weight: 700; white-space: nowrap; }
.hcod .hcod__offer-price del { margin-inline-end: 6px; font-weight: 400; font-size: .82em; color: var(--hc-muted); }
.hcod .hcod__offer:has(input:checked) { border-color: var(--hc-primary); background: var(--hc-tint); }
.hcod .hcod__offer input:checked + .hcod__offer-dot { border-color: var(--hc-primary); border-width: 6px; }
.hcod .hcod__offer:has(input:focus-visible) { outline: 2px solid var(--hc-primary); outline-offset: 2px; }

/* ---------- Delivery type ---------- */
.hcod .hcod__delivery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hc-gap); }
.hcod .hcod__deliv {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 10px;
	min-height: var(--hc-field-h);
	background: var(--hc-field);
	border: 1.5px solid var(--hc-field-border);
	border-radius: var(--hc-field-radius);
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.hcod .hcod__deliv input { position: absolute; opacity: 0; pointer-events: none; }
.hcod .hcod__deliv-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	color: var(--hc-muted);
	background: var(--hc-card);
	border-radius: 10px;
	transition: color .15s, background-color .15s;
}
.hcod .hcod__deliv-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hcod .hcod__deliv-name { font-size: .88em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcod .hcod__deliv-price { font-size: .82em; color: var(--hc-muted); }
/* The chosen option stays the same colour as the other fields; only a neutral radio dot marks it,
   so the submit button remains the one coloured element of the form. */
.hcod .hcod__deliv::after {
	content: "";
	flex: none;
	margin-inline-start: auto;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--hc-card);
	border: 1.5px solid var(--hc-field-border);
	box-sizing: border-box;
	transition: border-width .15s, border-color .15s;
}
.hcod .hcod__deliv:has(input:checked) { border-color: color-mix(in srgb, var(--hc-text) 28%, var(--hc-field-border)); }
.hcod .hcod__deliv:has(input:checked)::after { border: 5.5px solid var(--hc-text); }
.hcod .hcod__deliv:has(input:checked) .hcod__deliv-icon { color: var(--hc-text); }
.hcod .hcod__deliv:has(input:checked) .hcod__deliv-price { color: var(--hc-text); font-weight: 600; }
.hcod .hcod__deliv:has(input:focus-visible) { outline: 2px solid var(--hc-field-border); outline-offset: 2px; }
.hcod .hcod__deliv.is-disabled { opacity: .5; cursor: not-allowed; }

@container (max-width: 419px) {
	.hcod .hcod__deliv-icon { display: none; }
	.hcod .hcod__deliv { padding: 9px 12px; }
}
@container (max-width: 279px) {
	.hcod .hcod__delivery { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Actions: quantity + submit ---------- */
.hcod .hcod__actions { display: flex; align-items: stretch; gap: 10px; }
.hcod .hcod__qty {
	order: 2;
	flex: none;
	display: flex;
	align-items: stretch;
	width: 124px;
	height: var(--hc-btn-h);
	background: var(--hc-card);
	border: 1px solid var(--hc-field-border);
	border-radius: var(--hc-field-radius);
	overflow: hidden;
}
.hcod .hcod__qty input {
	-webkit-appearance: none;
	appearance: none;
	-moz-appearance: textfield;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	color: var(--hc-text);
	background: none;
	border: 0;
	border-inline: 1px solid var(--hc-field-border);
	border-radius: 0;
	box-shadow: none;
	outline: 0;
}
.hcod .hcod__qty input::-webkit-outer-spin-button,
.hcod .hcod__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hcod .hcod__qty-btn {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	width: 38px;
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	color: var(--hc-text);
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.hcod .hcod__qty-btn:hover { background: var(--hc-field); color: var(--hc-primary); }
.hcod .hcod__qty-btn:disabled { opacity: .35; cursor: default; background: none; color: var(--hc-text); }
.hcod .hcod__qty-btn:focus-visible,
.hcod .hcod__qty input:focus-visible { outline: 2px solid var(--hc-primary); outline-offset: -2px; }
.hcod .hcod__qty.is-locked { opacity: .55; pointer-events: none; }

.hcod .hcod__submit {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
	height: var(--hc-btn-h);
	margin: 0;
	padding: 0 20px;
	overflow: hidden;
	font: inherit;
	font-size: var(--hc-btn-fs);
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	color: var(--hc-on-primary);
	background: var(--hc-primary);
	border: 0;
	border-radius: var(--hc-field-radius);
	box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--hc-primary) 70%, transparent);
	cursor: pointer;
	transition: background-color .15s, transform .12s, box-shadow .15s;
}
.hcod .hcod__submit:hover { background: var(--hc-primary-hover); color: var(--hc-on-primary); }
.hcod .hcod__submit:active { transform: scale(.985); }
.hcod .hcod__submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--hc-primary) 45%, transparent); outline-offset: 2px; }
.hcod .hcod__submit[disabled] { cursor: progress; }
.hcod .hcod__spinner {
	display: none;
	width: 18px; height: 18px;
	border: 2.5px solid color-mix(in srgb, var(--hc-on-primary) 35%, transparent);
	border-top-color: var(--hc-on-primary);
	border-radius: 50%;
	animation: hcod-spin .7s linear infinite;
}
.hcod.is-loading .hcod__spinner { display: block; }
.hcod.is-loading .hcod__submit { animation: none !important; }

/* Button attention animations (paused while the visitor interacts) */
.hcod--anim-pulse .hcod__submit { animation: hcod-pulse 2.2s var(--hc-ease) infinite; }
.hcod--anim-shake .hcod__submit { animation: hcod-shake 4s ease-in-out infinite; }
.hcod--anim-shine .hcod__submit::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
	transform: translateX(-120%);
	animation: hcod-shine 3.2s ease-in-out infinite;
	pointer-events: none;
}
.hcod .hcod__form:focus-within .hcod__submit:not(:focus) { animation-play-state: paused; }

/* ---------- Alerts & WhatsApp ---------- */
.hcod .hcod__alert {
	margin: 0;
	padding: 11px 14px;
	font-size: .9em;
	font-weight: 500;
	color: var(--hc-error);
	background: color-mix(in srgb, var(--hc-error) 8%, var(--hc-card));
	border: 1px solid color-mix(in srgb, var(--hc-error) 25%, var(--hc-card));
	border-radius: var(--hc-field-radius);
}
.hcod .hcod__wa-inline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	align-self: center;
	padding: 6px 10px;
	font-size: .9em;
	font-weight: 600;
	color: #128c4b;
	text-decoration: none;
	border-radius: 8px;
}
.hcod .hcod__wa-inline:hover { background: #e9f9ef; color: #0e7a40; }

/* Honeypot */
.hcod .hcod__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Summary ---------- */
.hcod .hcod__summary { background: var(--hc-summary); border-top: 1px solid var(--hc-card-border); }
.hcod .hcod__summary-toggle {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	font: inherit;
	font-size: .95em;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	color: var(--hc-text);
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}
.hcod .hcod__summary-toggle:hover { background: none; color: var(--hc-text); }
.hcod .hcod__summary-toggle:focus-visible { outline: 2px solid var(--hc-primary); outline-offset: -2px; }
.hcod .hcod__summary-toggle .hcod-icon { color: var(--hc-muted); transition: transform .25s var(--hc-ease); }
.hcod .hcod__summary.is-open .hcod__summary-toggle .hcod-icon { transform: rotate(180deg); }
.hcod .hcod__summary-body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .28s var(--hc-ease);
}
.hcod .hcod__summary-inner { min-height: 0; overflow: hidden; }
.hcod .hcod__summary.is-open .hcod__summary-body { grid-template-rows: 1fr; }
.hcod .hcod__summary-body { padding: 0 16px; }
.hcod .hcod__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	font-size: .92em;
}
.hcod .hcod__row + .hcod__row { border-top: 1px solid var(--hc-card-border); }
.hcod .hcod__summary.is-open .hcod__summary-inner { padding-bottom: 6px; }
.hcod .hcod__row-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hcod .hcod__row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hcod .hcod__row-muted { color: var(--hc-muted); }
.hcod .hcod__row-value { flex: none; font-weight: 600; white-space: nowrap; }
.hcod .hcod__thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--hc-field); }
.hcod .hcod__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.hcod .hcod__qty-badge {
	flex: none;
	padding: 2px 7px;
	font-size: .78em;
	font-weight: 700;
	color: var(--hc-on-primary);
	background: var(--hc-primary);
	border-radius: 6px;
}

/* ---------- Total ---------- */
.hcod .hcod__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px;
	background: var(--hc-total);
	color: var(--hc-on-total);
	font-weight: 700;
}
.hcod .hcod__total strong { font-size: 1.15em; font-weight: 800; white-space: nowrap; color: var(--hc-on-total); }
.hcod .hcod__total.is-bump strong { animation: hcod-bump .35s var(--hc-ease); }

/* ---------- Success ---------- */
.hcod .hcod__success {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 34px 20px 30px;
	text-align: center;
	outline: 0;
	animation: hcod-rise .4s var(--hc-ease);
}
.hcod .hcod__success-icon {
	display: grid;
	place-items: center;
	width: 64px; height: 64px;
	margin-bottom: 8px;
	color: #fff;
	background: var(--hc-success);
	border-radius: 50%;
	box-shadow: 0 0 0 8px color-mix(in srgb, var(--hc-success) 14%, transparent);
}
.hcod .hcod__success-icon .hcod-icon { width: 32px; height: 32px; stroke-width: 2.4; }
.hcod .hcod__success-title { margin: 0; font-size: 1.2em; font-weight: 800; }
.hcod .hcod__success-text { margin: 0; color: var(--hc-muted); }
.hcod .hcod__success-order { margin: 6px 0 0; font-weight: 700; color: var(--hc-primary); }
.hcod.is-done .hcod__form,
.hcod.is-done .hcod__summary,
.hcod.is-done .hcod__total { display: none; }

/* ---------- Sticky mobile button ---------- */
.hcod-sticky {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 9990;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
	font-family: var(--hc-font);
	background: var(--hc-card);
	border-top: 1px solid var(--hc-card-border);
	box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .25);
	transform: translateY(110%);
	transition: transform .3s var(--hc-ease);
}
.hcod-sticky .hcod-sticky__price { flex: none; max-width: 42%; font-weight: 800; color: var(--hc-text); line-height: 1.2; }
.hcod-sticky .hcod-sticky__price del { display: block; font-size: .75em; font-weight: 400; color: var(--hc-muted); }
.hcod-sticky .hcod-sticky__price ins { text-decoration: none; }
.hcod-sticky .hcod-sticky__btn {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	color: var(--hc-on-primary);
	background: var(--hc-primary);
	border: 0;
	border-radius: var(--hc-field-radius);
	box-shadow: none;
	cursor: pointer;
}
.hcod-sticky .hcod-sticky__btn:hover { background: var(--hc-primary-hover); color: var(--hc-on-primary); }
@media (max-width: 767px) {
	.hcod-sticky { display: flex; }
	.hcod-sticky.is-visible { transform: translateY(0); }
	.hcod-sticky[hidden] { display: none; }
}

/* ---------- Floating WhatsApp ---------- */
.hcod-wa {
	position: fixed;
	bottom: 20px;
	z-index: 9989;
	display: grid;
	place-items: center;
	width: 56px; height: 56px;
	color: #fff !important;
	background: #25d366;
	border-radius: 50%;
	box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .65);
	transition: transform .2s var(--hc-ease), bottom .3s var(--hc-ease);
}
.hcod-wa:hover { transform: scale(1.06); }
.hcod-wa:focus-visible { outline: 3px solid #128c4b; outline-offset: 3px; }
.hcod-wa .hcod-icon { width: 28px; height: 28px; stroke-width: 1.7; }
.hcod-wa--left { left: 18px; }
.hcod-wa--right { right: 18px; }
@media (max-width: 767px) {
	body.hcod-sticky-on .hcod-wa { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* ---------- Hide the default add-to-cart when the form replaces it ---------- */
body.hcod-replace form.cart:not(.hcod__form),
body.hcod-replace .ast-sticky-add-to-cart { display: none !important; }

/* ---------- Motion ---------- */
@keyframes hcod-spin { to { transform: rotate(360deg); } }
@keyframes hcod-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hc-primary) 50%, transparent); }
	70%  { box-shadow: 0 0 0 12px color-mix(in srgb, var(--hc-primary) 0%, transparent); }
	100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hc-primary) 0%, transparent); }
}
@keyframes hcod-shake {
	0%, 86%, 100% { transform: translateX(0); }
	88% { transform: translateX(-4px) rotate(-1deg); }
	91% { transform: translateX(4px) rotate(1deg); }
	94% { transform: translateX(-3px); }
	97% { transform: translateX(2px); }
}
@keyframes hcod-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes hcod-nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }
@keyframes hcod-bump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hcod-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.hcod *,
	.hcod *::after,
	.hcod-sticky,
	.hcod-wa { animation: none !important; transition: none !important; }
}

/* ---------- Theme-proof buttons ----------
 * Themes style every <button> with high-specificity selectors (Astra, Twenty
 * Twenty-One, Elementor kits). These skins are locked so the form always looks
 * the way it was configured. */
.hcod .hcod__submit,
.hcod .hcod__submit:hover,
.hcod .hcod__submit:focus,
.hcod-sticky .hcod-sticky__btn,
.hcod-sticky .hcod-sticky__btn:hover,
.hcod-sticky .hcod-sticky__btn:focus {
	background: var(--hc-primary) !important;
	color: var(--hc-on-primary) !important;
	border: 0 !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: var(--hc-font) !important;
}
.hcod .hcod__submit:hover,
.hcod-sticky .hcod-sticky__btn:hover { background: var(--hc-primary-hover) !important; }
.hcod .hcod__submit { box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--hc-primary) 70%, transparent) !important; border-radius: var(--hc-field-radius) !important; }
.hcod--anim-pulse .hcod__submit { box-shadow: none !important; }
.hcod-sticky .hcod-sticky__btn { box-shadow: none !important; border-radius: var(--hc-field-radius) !important; }

.hcod .hcod__qty-btn,
.hcod .hcod__qty-btn:focus,
.hcod .hcod__summary-toggle,
.hcod .hcod__summary-toggle:hover,
.hcod .hcod__summary-toggle:focus {
	background: transparent !important;
	color: var(--hc-text) !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	font-family: var(--hc-font) !important;
}
.hcod .hcod__qty-btn:hover { background: var(--hc-field) !important; color: var(--hc-primary) !important; }
.hcod .hcod__qty-btn:disabled { background: transparent !important; color: var(--hc-text) !important; }

.hcod .hcod__swatch,
.hcod .hcod__swatch:focus {
	background: var(--hc-field) !important;
	color: var(--hc-text) !important;
	border: 1.5px solid var(--hc-field-border) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-transform: none !important;
	font-family: var(--hc-font) !important;
}
.hcod .hcod__swatch:hover { border-color: var(--hc-primary) !important; }
.hcod .hcod__swatch[aria-checked="true"] {
	background: var(--hc-tint) !important;
	color: var(--hc-primary) !important;
	border-color: var(--hc-primary) !important;
}
.hcod .hcod__input,
.hcod .hcod__qty input { font-family: var(--hc-font) !important; box-shadow: none; }
.hcod[dir="rtl"] .hcod__input[type="tel"],
.hcod[dir="rtl"] .hcod__input[type="email"] { text-align: right; }

/* ---------- Theme-proof fields ----------
 * Elementor "Site settings → Form fields" and some themes style every input with
 * selectors like `.elementor-kit-5 input:not([type=button])` that outrank ours.
 * The field skin is locked the same way as the buttons. */
.hcod .hcod__input {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 100% !important;
	max-width: none !important;
	height: var(--hc-field-h) !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 14px !important;
	font-size: max(16px, var(--hc-fs)) !important;
	line-height: 1.2 !important;
	color: var(--hc-text) !important;
	background-color: var(--hc-field) !important;
	border: 1px solid var(--hc-field-border) !important;
	border-radius: var(--hc-field-radius) !important;
	box-shadow: none !important;
	outline: 0 !important;
	text-indent: 0 !important;
	letter-spacing: normal !important;
}
.hcod .hcod__input:hover { border-color: color-mix(in srgb, var(--hc-primary) 35%, var(--hc-field-border)) !important; }
.hcod .hcod__input:focus {
	background-color: var(--hc-card) !important;
	border-color: var(--hc-primary) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hc-primary) 18%, transparent) !important;
}
.hcod .hcod__field.is-invalid .hcod__input {
	border-color: var(--hc-error) !important;
	background-color: color-mix(in srgb, var(--hc-error) 5%, var(--hc-card)) !important;
}
.hcod .hcod__input--area { height: auto !important; min-height: calc(var(--hc-field-h) * 1.6) !important; padding-top: 12px !important; padding-bottom: 12px !important; }
.hcod .hcod__select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a869a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-size: 12px !important;
	background-position: left 13px center !important;
}
.hcod[dir="ltr"] .hcod__select { background-position: right 13px center !important; }
.hcod[dir="rtl"] .hcod__field .hcod__select { padding-left: 34px !important; }
.hcod[dir="ltr"] .hcod__field .hcod__select { padding-right: 34px !important; }
.hcod[dir="rtl"] .hcod__field.has-icon .hcod__input { padding-right: 36px !important; padding-left: 10px !important; }
.hcod[dir="ltr"] .hcod__field.has-icon .hcod__input { padding-left: 36px !important; padding-right: 10px !important; }
.hcod .hcod__qty input {
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	border-inline: 1px solid var(--hc-field-border) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--hc-text) !important;
}

/* Long prices (e.g. "27 500,00 د.ج"): stack old/new price, keep badges on one line. */
.hcod .hcod__offer-badge { white-space: nowrap; }
.hcod .hcod__offer-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.hcod .hcod__offer-price del { margin: 0; }
.hcod-sticky .hcod-sticky__price { flex: 0 1 auto; min-width: 0; max-width: 48%; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
