/* COD Form: templates and options (Customize > COD Form).
   Template rules use one template class + one element class, so your own
   Customizer colours and sizes (which are more specific) always win. */

/* ---------- Shared mechanics ---------- */
.hx-cf-fields { display: grid; gap: inherit; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.hx-cf-item .hx-field { min-width: 0; }
.hx-cf-item .hx-field__input { width: 100%; }
.hx-cf-item { display: grid; gap: 6px; min-width: 0; align-content: start; }
.hx-cf-label { display: block; margin: 0 2px; color: var(--hx-ink); font-size: 14px; font-weight: 700; line-height: 1.4; }
.hx-cf-label b { color: #dc2626; font-weight: 700; }
.hx-order--wa-only .hx-cf-fields { display: none; }

.hx-cf--icons-hide .hx-field__icon { display: none; }
.hx-cf--icons-hide .hx-field__input { border-radius: 10px; }

.hx-cf--cols-2 .hx-cf-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hx-cf--cols-2 .hx-cf-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 750px) {
	.hx-cf--cols-2d .hx-cf-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hx-cf--cols-2d .hx-cf-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.hx-cf--btnicon-hide .hx-order__btn svg { display: none; }
.hx-cf--anim-none .hx-order__btn { animation: none; }
.hx-cf--anim-pulse .hx-order__btn { animation: hx-cf-pulse 2.2s ease-in-out 1s infinite; }
@keyframes hx-cf-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
	.hx-cf .hx-order__btn { animation: none; }
}

/* ---------- Bold & urgent ---------- */
.hx-order.hx-cf--urgent { padding: 0 0 18px; gap: 14px; overflow: hidden; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16); }
.hx-cf--urgent > :not(.hx-order__head) { margin-inline: 16px; }
.hx-cf--urgent .hx-order__head { margin: 0; padding: 16px 18px 14px; background: var(--hx-primary); }
.hx-cf--urgent .hx-order__title { color: #fff; }
.hx-cf--urgent .hx-order__sub { color: rgba(255, 255, 255, 0.86); }
.hx-cf--urgent .hx-field__input { background: #fff; border-color: #d1d5db; }
.hx-cf--urgent .hx-order__btn { min-height: 62px; border-radius: 14px; background: var(--hx-primary); color: #fff; font-size: 24px; box-shadow: 0 8px 20px rgba(var(--hx-primary-rgb), 0.32); }
.hx-cf--urgent .hx-order__btn:hover { background: var(--hx-primary-dark); filter: none; }
.hx-cf--urgent .hx-order__trust { gap: 8px; }
.hx-cf--urgent .hx-order__trust li { padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--hx-primary) 8%, #fff); }

/* ---------- Clean checkout ---------- */
.hx-order.hx-cf--checkout { border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(17, 24, 39, 0.06); }
.hx-cf--checkout .hx-order__title { color: var(--hx-ink); font-size: 21px; }
.hx-cf--checkout .hx-field__input { background: #fff; border: 1.5px solid #d1d5db; font-weight: 600; }
.hx-cf--checkout .hx-field__input:focus { border-color: var(--hx-primary); }
.hx-cf--checkout .hx-order__btn { border-radius: 12px; }
.hx-cf--checkout .hx-order__trust { padding-top: 12px; border-top: 1px dashed #e5e7eb; color: #4b5563; font-weight: 600; }

/* ---------- Trust card ---------- */
.hx-order.hx-cf--trust { border: 2px solid var(--hx-primary); border-top-width: 8px; border-radius: 16px; }
.hx-cf--trust .hx-order__trust { order: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; font-size: 12px; }
.hx-cf--trust .hx-order__trust li { flex-direction: column; justify-content: center; gap: 4px; padding: 10px 6px; border: 1px solid color-mix(in srgb, var(--hx-primary) 16%, #fff); border-radius: 12px; background: color-mix(in srgb, var(--hx-primary) 6%, #fff); line-height: 1.35; text-align: center; white-space: normal; }
.hx-cf--trust .hx-order__trust li span { font-size: 22px; line-height: 1; }
.hx-cf--trust .hx-order__actions { order: 2; }
.hx-cf--trust .hx-order__btn { background: var(--hx-primary); color: #fff; box-shadow: 0 8px 18px rgba(var(--hx-primary-rgb), 0.32); }
.hx-cf--trust .hx-order__btn:hover { background: var(--hx-primary-dark); }

/* ---------- Soft rounded ---------- */
.hx-order.hx-cf--soft { border: 0; border-radius: 24px; background: color-mix(in srgb, var(--hx-primary) 7%, #fff); box-shadow: 0 10px 30px rgba(var(--hx-primary-rgb), 0.12); }
.hx-cf--soft .hx-field { overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--hx-primary) 18%, #fff); border-radius: 999px; background: #fff; }
.hx-cf--soft .hx-field__icon { border: 0; border-radius: 0; background: transparent; color: var(--hx-primary); }
.hx-cf--soft .hx-field__input { border: 0; border-radius: 0; background: transparent; }
.hx-cf--soft .hx-field:focus-within { border-color: var(--hx-primary); box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), 0.15); }
.hx-cf--soft .hx-field:focus-within .hx-field__icon { background: transparent; color: var(--hx-primary); }
.hx-cf--soft .hx-field__input:focus { background: transparent; box-shadow: none; }
.hx-cf--soft .hx-field.is-invalid { border-color: #dc2626; background: #fff5f5; }
.hx-cf--soft .hx-field.is-invalid .hx-field__input { background: transparent; }
.hx-cf--soft .hx-order__btn { border-radius: 999px; }
.hx-cf--soft .hx-order__wa { border-radius: 999px; }

/* ---------- Minimal ---------- */
.hx-order.hx-cf--minimal { padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.hx-cf--minimal .hx-order__head { text-align: right; }
.hx-cf--minimal .hx-order__title { color: var(--hx-ink); font-size: 21px; }
.hx-cf--minimal .hx-cf-label { color: #6b7280; font-size: 13px; font-weight: 600; }
.hx-cf--minimal .hx-field__input { padding: 0 2px; border: 0; border-bottom: 2px solid #d1d5db; border-radius: 0; background: transparent; }
.hx-cf--minimal .hx-field__input:focus { border-color: var(--hx-primary); background: transparent; box-shadow: none; }
.hx-cf--minimal .hx-field.is-invalid .hx-field__input { background: transparent; }
.hx-cf--minimal .hx-order__btn { border-radius: 10px; box-shadow: none; }
.hx-cf--minimal .hx-order__trust { justify-content: flex-start; color: #6b7280; font-weight: 600; }
html[dir="ltr"] .hx-cf--minimal .hx-order__head { text-align: left; }

/* Product page typography on phones (Cairo everywhere, calmer sizes).
   Same specificity as the templates; your Customizer sizes stay stronger. */
.hx-product, .hx-order { letter-spacing: 0; }
.hx-order .hx-field__input::placeholder { letter-spacing: 0; }
@media (max-width: 749px) {
	.hx-product .hx-product__title { font-family: "Cairo", var(--hx-font); font-size: 20px; font-weight: 800; line-height: 1.5; }
	.hx-product .hx-pp { gap: 4px 10px; margin: 4px 0 18px; }
	.hx-product .hx-pp__num { font-size: 30px; }
	.hx-product .hx-pp__cur { font-size: 15px; }
	.hx-product .hx-pp__old { font-size: 15px; }
	.hx-product .hx-pp__badge { padding: 4px 8px; font-size: 12px; }
	.hx-cf { padding: 18px 14px 16px; gap: 12px; }
	.hx-cf .hx-order__title { font-size: 18px; line-height: 1.55; }
	.hx-cf .hx-order__sub { margin-top: 2px; color: #6b7280; font-size: 13px; line-height: 1.6; }
	.hx-cf .hx-offers { gap: 10px; margin: 2px 0 6px; }
	.hx-cf .hx-offer { gap: 10px; padding: 10px 12px; }
	.hx-cf .hx-offer__dot { width: 18px; height: 18px; }
	.hx-cf .hx-offer.is-on .hx-offer__dot { border-width: 5px; }
	.hx-cf .hx-offer__label { font-size: 15px; line-height: 1.4; }
	.hx-cf .hx-offer__save { padding: 0 7px; font-size: 11.5px; line-height: 1.8; }
	.hx-cf .hx-offer__now { font-size: 17px; }
	.hx-cf .hx-offer__now small, .hx-cf .hx-offer__was { font-size: 11.5px; }
	.hx-cf .hx-field { height: 50px; }
	.hx-cf .hx-field__icon { flex-basis: 46px; }
	.hx-cf .hx-field__icon svg { width: 20px; height: 20px; }
	.hx-cf .hx-field__input { font-size: 16px; }
	.hx-cf .hx-field__input::placeholder { font-size: 14.5px; }
	.hx-cf .hx-cf-label { font-size: 13px; }
	.hx-cf .hx-order__btn { min-height: 54px; font-size: 19px; }
	.hx-cf .hx-order__wa { min-height: 54px; font-size: 16px; }
}

/* Quantity offers as a dropdown */
.hx-offers--dd { position: relative; display: block; }
.hx-dd__btn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 12px 14px; border: 1.5px solid var(--hx-primary); border-radius: 12px; background: color-mix(in srgb, var(--hx-primary) 6%, #fff); color: inherit; font: inherit; letter-spacing: 0; text-align: right; cursor: pointer; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 12%, transparent); }
.hx-dd__btn:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 2px; }
.hx-dd__cur { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.hx-dd__cur .hx-offer__main { flex: 1 1 auto; }
.hx-dd__chev { flex: 0 0 auto; color: var(--hx-primary); transition: transform 0.2s; }
.hx-offers--dd.is-open .hx-dd__chev { transform: rotate(180deg); }
.hx-offers--dd:not(.is-ready) .hx-dd__btn { display: none; }
.hx-offers--dd:not(.is-ready) .hx-dd__list { display: grid; gap: 12px; }
.hx-offers--dd.is-ready .hx-dd__list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; display: none; gap: 4px; padding: 6px; border: 1px solid #e3e6ea; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18); }
.hx-offers--dd.is-open .hx-dd__list { display: grid; }
.hx-dd__list .hx-offer { border-color: transparent; box-shadow: none; }
.hx-dd__list .hx-offer:hover { background: #f6f7f8; }
.hx-dd__list .hx-offer.is-on { border-color: transparent; background: color-mix(in srgb, var(--hx-primary) 8%, #fff); box-shadow: none; }
.hx-dd__list .hx-offer__badge { position: static; flex: 0 0 auto; }
@media (max-width: 749px) {
	.hx-dd__btn { gap: 10px; padding: 10px 12px; }
}

/* ---------- Shipping: home / office tap cards (not a list) ---------- */
.hx-ship { display: grid; gap: 10px; margin-top: 4px; text-align: right; }
.hx-ship__title { margin: 0 2px; color: var(--hx-ink); font-size: 14px; font-weight: 800; line-height: 1.4; }
.hx-ship__title b { color: #dc2626; }
.hx-ship__cards { display: grid; gap: 10px; }
.hx-ship__card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--hx-line, #e3e6ea); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, opacity .15s; }
.hx-ship__card input { position: absolute; opacity: 0; pointer-events: none; }
.hx-ship__card:hover { border-color: var(--hx-primary); }
.hx-ship__card.is-on { border-color: var(--hx-primary); background: color-mix(in srgb, var(--hx-primary) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 14%, transparent); }
.hx-ship__card.is-on .hx-offer__dot { border: 6px solid var(--hx-primary); }
.hx-ship__card:focus-within { outline: 2px solid var(--hx-primary); outline-offset: 2px; }
.hx-ship__card.is-off { opacity: .45; cursor: not-allowed; }
.hx-ship__main { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.hx-ship__label { color: var(--hx-ink); font-size: 15px; font-weight: 800; line-height: 1.35; }
.hx-ship__sub { color: #6b7280; font-size: 12px; font-weight: 600; line-height: 1.4; }
.hx-ship__price { flex: 0 0 auto; color: var(--hx-ink); font-size: 17px; font-weight: 800; white-space: nowrap; }
.hx-ship__hint { margin: 0 2px; color: #6b7280; font-size: 13px; font-weight: 600; line-height: 1.5; }
.hx-ship__summary { display: grid; gap: 6px; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--hx-primary) 35%, #fff); border-radius: 12px; background: color-mix(in srgb, var(--hx-primary) 5%, #fff); }
.hx-ship__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; color: #4b5563; }
.hx-ship__row strong { color: var(--hx-ink); font-size: 15px; }
.hx-ship__row--total { padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--hx-primary) 18%, #fff); font-size: 15px; }
.hx-ship__row--total strong { color: var(--hx-primary); font-size: 19px; font-weight: 800; }
.hx-ship.is-invalid .hx-ship__title { color: #dc2626; }
.hx-ship.is-invalid .hx-ship__card { border-color: #f0b4b4; }
.hx-ship[data-hx-ship-state="wait"] .hx-ship__card, .hx-ship[data-hx-ship-state="unavailable"] .hx-ship__card { opacity: .45; }

/* ---------- Colour/size revealed after choosing an offer ---------- */
.hx-choose { display: grid; gap: 10px; align-content: start; }
.hx-choose[hidden] { display: none; }
.hx-choose.is-open { animation: hx-choose-in .25s ease-out; }
@keyframes hx-choose-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hx-choose.is-open { animation: none; } }
.hx-choose__head {
	display: grid; gap: 2px; padding: 10px 12px;
	border-radius: 12px; background: #f7f7f8; border: 1px solid #eceef1;
}
.hx-choose__title { margin: 0; color: var(--hx-ink); font-size: 14px; font-weight: 800; line-height: 1.35; }
.hx-choose__hint { margin: 0; color: #6b7280; font-size: 12px; font-weight: 600; line-height: 1.45; }

/* ---------- One colour/size block per piece (#1, #2, #3) ---------- */
.hx-pieces { display: grid; gap: 8px; }
.hx-pieces [data-hx-pieces-list] { display: grid; gap: 8px; }
.hx-piece {
	padding: 12px; border: 1px solid #e8eaed; border-radius: 14px;
	background: #fff; box-shadow: 0 1px 2px rgba(23, 25, 29, 0.04);
}
.hx-piece__head {
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px dashed #eceef1;
	color: var(--hx-ink); font-size: 13px; font-weight: 800; line-height: 1.3;
}
.hx-piece__num {
	display: inline-grid; place-items: center;
	min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px;
	background: var(--hx-ink); color: #fff; font-size: 12px; font-weight: 800; line-height: 1;
}
.hx-piece.is-invalid { border-color: #dc2626; background: #fff8f8; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08); }
.hx-piece--main { margin: 0; }
.hx-choose .hx-piece .hx-vgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.hx-choose .hx-piece .hx-vsel { align-self: start; }
.hx-choose .hx-piece .hx-vsel.hx-has-chips { display: block; height: auto; padding-top: 0; min-height: 0; }
.hx-choose .hx-piece .hx-vgrid .hx-vsel__label {
	position: static; transform: none; display: block;
	margin: 0 0 8px; font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--hx-ink); white-space: nowrap;
}
.hx-choose .hx-piece .hx-chips { min-width: 0; gap: 8px; margin: 0; }
.hx-order .hx-chips { margin-bottom: 0; }
.hx-choose .hx-piece .hx-chip { flex: 0 1 auto; min-height: 40px; padding: 6px 12px; font-size: 14px; font-weight: 700; border-width: 1.5px; border-radius: 10px; }
.hx-choose .hx-piece .hx-chip--color { padding-inline-start: 8px; }
.hx-choose .hx-piece .hx-chip__sw { width: 18px; height: 18px; }
.hx-choose .hx-piece .hx-chip.is-on { box-shadow: none; }

/* ---------- Colour / size chips (tap to choose, not a dropdown) ---------- */
.hx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-vsel.hx-has-chips .hx-vsel__wrap { display: none; }
.hx-vgrid .hx-vsel.hx-has-chips { padding-top: 27px; }
.hx-chip {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--hx-line, #d8dde3);
	border-radius: 12px; background: #fff; color: var(--hx-ink); font: inherit;
	font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer;
	transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .12s;
}
.hx-chip:hover { border-color: var(--hx-ink); }
.hx-chip:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 2px; }
.hx-chip.is-on {
	border-color: var(--hx-ink); background: var(--hx-ink); color: #fff;
	box-shadow: none;
}
.hx-chip.is-off, .hx-chip:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.hx-chip--color { padding-inline-start: 10px; }
.hx-chip__sw {
	flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.8);
}
.hx-chip.is-on .hx-chip__sw { box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 2px #fff; }

/* Algeria: commune locked until wilaya is chosen */
.hx-cf select.hx-cf-select.is-locked,
.hx-order select[data-hx-commune].is-locked {
	opacity: 0.55;
	cursor: not-allowed;
	background-color: #f3f4f6;
}
.hx-cf select.hx-cf-select:not(.is-locked),
.hx-order select[data-hx-commune]:not(.is-locked) {
	cursor: pointer;
}

/* ---------- Compact order box: less scrolling, still easy for ages 17-65 ----------
   Shorter box, but text stays >=16px in inputs and every tap target >=44px. */
body.single-product .hx-order.hx-cf { padding: 14px 12px 12px; gap: 10px; border-width: 1.5px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
body.single-product .hx-order .hx-order__head { margin: 0; }
body.single-product .hx-order .hx-order__title { font-size: 18px; line-height: 1.35; }
body.single-product .hx-order .hx-order__sub { margin-top: 2px; font-size: 13px; line-height: 1.45; }
body.single-product .hx-order .hx-offers { gap: 8px; margin: 0; }
body.single-product .hx-order .hx-offer { gap: 8px; padding: 9px 10px; border-radius: 10px; }
body.single-product .hx-order .hx-offer__dot { width: 18px; height: 18px; }
body.single-product .hx-order .hx-offer.is-on .hx-offer__dot { border-width: 5px; }
body.single-product .hx-order .hx-offer__label { font-size: 15px; }
body.single-product .hx-order .hx-offer__now { font-size: 17px; }
body.single-product .hx-order .hx-cf-fields { gap: 8px; }
body.single-product .hx-order .hx-field { height: 46px; }
body.single-product .hx-order .hx-field__icon { flex-basis: 42px; }
body.single-product .hx-order .hx-field__icon svg { width: 19px; height: 19px; }
body.single-product .hx-order .hx-field__input { font-size: 16px; padding: 0 10px; }
body.single-product .hx-order .hx-ship { gap: 6px; margin: 0; }
body.single-product .hx-order .hx-ship__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.single-product .hx-order .hx-ship__card { min-height: 62px; padding: 8px 10px; gap: 8px; border-radius: 10px; }
body.single-product .hx-order .hx-ship__sub { display: none; }
body.single-product .hx-order .hx-ship__label { font-size: 14px; line-height: 1.3; }
body.single-product .hx-order .hx-ship__price { font-size: 16px; }
body.single-product .hx-order .hx-ship__summary { gap: 4px; padding: 8px 10px; border-radius: 10px; }
body.single-product .hx-order .hx-ship__row--total { padding-top: 4px; }
body.single-product .hx-order .hx-ship__row--total strong { font-size: 17px; }
body.single-product .hx-order .hx-order__btn { min-height: 52px; margin: 0; border-radius: 12px; font-size: 19px; }
body.single-product .hx-order .hx-order__trust { gap: 4px 10px; margin: 0; font-size: 12px; }
body.single-product .hx-order .hx-order__msg { padding: 8px 10px; }

/* Customer data: name|phone then wilaya|commune. */
body.single-product .hx-order .hx-cf-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.single-product .hx-order .hx-cf-item { min-width: 0; }
body.single-product .hx-order .hx-cf-item--name,
body.single-product .hx-order .hx-cf-item--phone,
body.single-product .hx-order .hx-cf-item--wilaya,
body.single-product .hx-order .hx-cf-item--commune { grid-column: auto; }
body.single-product .hx-order select.hx-field__input { text-overflow: ellipsis; }
body.single-product .hx-order .hx-field { height: 46px; }
body.single-product .hx-order .hx-field__icon { flex-basis: 40px; }
body.single-product .hx-order .hx-field__input { font-size: 15px; padding: 0 10px; }

/* الولاية / البلدية — clearer select cards */
body.single-product .hx-order .hx-cf-item--wilaya,
body.single-product .hx-order .hx-cf-item--commune {
	display: grid;
	gap: 6px;
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-cf-label,
body.single-product .hx-order .hx-cf-item--commune .hx-cf-label {
	margin: 0 2px;
	font-size: 12.5px;
	font-weight: 800;
	color: var(--hx-ink);
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field,
body.single-product .hx-order .hx-cf-item--commune .hx-field {
	position: relative;
	height: 50px;
	overflow: hidden;
	border-radius: 12px;
	border: 1.5px solid #e4e4e7;
	background: #fff;
	box-shadow: 0 1px 2px rgba(23, 25, 29, 0.04);
	transition: border-color .15s, box-shadow .15s;
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field__icon,
body.single-product .hx-order .hx-cf-item--commune .hx-field__icon {
	flex-basis: 42px;
	border: 0;
	border-inline-end: 1px solid #eceef1;
	border-radius: 0;
	background: #f7f8f9;
	color: var(--hx-ink);
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field__input,
body.single-product .hx-order .hx-cf-item--commune .hx-field__input {
	appearance: none;
	-webkit-appearance: none;
	height: 100%;
	border: 0;
	border-radius: 0;
	background: #fff;
	padding-inline-end: 34px;
	font-size: 14px;
	font-weight: 700;
	color: var(--hx-ink);
	cursor: pointer;
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field::after,
body.single-product .hx-order .hx-cf-item--commune .hx-field::after {
	content: "";
	position: absolute;
	inset-inline-end: 12px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-inline-end: 2px solid #6b7280;
	border-bottom: 2px solid #6b7280;
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field:focus-within,
body.single-product .hx-order .hx-cf-item--commune .hx-field:focus-within {
	border-color: var(--hx-primary);
	box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), 0.14);
}
body.single-product .hx-order .hx-cf-item--wilaya .hx-field:focus-within .hx-field__icon,
body.single-product .hx-order .hx-cf-item--commune .hx-field:focus-within .hx-field__icon {
	background: var(--hx-primary);
	border-color: var(--hx-primary);
	color: #fff;
}
body.single-product .hx-order .hx-cf-item--commune .hx-field__input.is-locked {
	opacity: 0.65;
	cursor: not-allowed;
	background: #f3f4f6;
}
@media (max-width: 380px) {
	body.single-product .hx-order .hx-field__icon { flex-basis: 34px; }
	body.single-product .hx-order .hx-field__input { font-size: 14px; }
	body.single-product .hx-order .hx-cf-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 750px) {
	body.single-product .hx-order.hx-cf { padding: 18px 18px 16px; gap: 12px; }
	body.single-product .hx-order .hx-field { height: 46px; }
	body.single-product .hx-order .hx-cf-item--wilaya .hx-field,
	body.single-product .hx-order .hx-cf-item--commune .hx-field { height: 52px; }
}

/* ---------- Size & colour (order box) ----------
   المقاس: equal segmented row.
   اللون: horizontal pills with swatch + name (compact, clearer). */
body.single-product .hx-order .hx-choose { gap: 10px; }
body.single-product .hx-order .hx-choose__head {
	padding: 10px 12px; border-radius: 12px;
	background: linear-gradient(180deg, #f8f8f9 0%, #f3f4f6 100%);
	border: 1px solid #e8eaed;
}
body.single-product .hx-order .hx-choose__title {
	margin: 0; font-size: 14px; font-weight: 800; color: var(--hx-ink); line-height: 1.35;
}
body.single-product .hx-order .hx-choose__hint {
	margin: 2px 0 0; font-size: 12px; font-weight: 600; color: #6b7280; line-height: 1.4;
}
body.single-product .hx-order .hx-pieces,
body.single-product .hx-order .hx-pieces [data-hx-pieces-list] { gap: 10px; }
body.single-product .hx-order .hx-piece {
	display: grid; gap: 12px; align-items: stretch;
	padding: 12px; border: 1px solid #e8eaed; border-radius: 14px; background: #fff;
	box-shadow: 0 1px 3px rgba(23, 25, 29, 0.04);
}
body.single-product .hx-order .hx-piece.is-invalid {
	border-color: #dc2626; background: #fff8f8;
	box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
body.single-product .hx-order .hx-piece__head {
	display: flex; align-items: center; gap: 8px;
	margin: 0; padding-bottom: 8px; border-bottom: 1px dashed #eceef1;
	font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--hx-ink);
}
body.single-product .hx-order .hx-piece__head [data-hx-piece-label] { display: inline; }
body.single-product .hx-order .hx-piece__num {
	min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px;
	font-size: 12px; line-height: 1;
}
body.single-product .hx-order .hx-choose .hx-vgrid {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; flex: none; min-width: 0;
}
body.single-product .hx-order .hx-choose .hx-vsel {
	display: block; height: auto; min-height: 0; padding-top: 0 !important; position: relative;
}
body.single-product .hx-order .hx-choose .hx-vsel__wrap { display: none !important; }
body.single-product .hx-order .hx-choose .hx-chips {
	display: grid !important; gap: 8px; margin: 0; width: 100%;
}
body.single-product .hx-order .hx-choose .hx-vgrid .hx-vsel__label {
	position: static !important; transform: none !important;
	display: flex; align-items: center; gap: 8px;
	margin: 0 0 8px; font-size: 13px; font-weight: 800; line-height: 1.3; color: var(--hx-ink);
	right: auto; left: auto; top: auto;
}
body.single-product .hx-order .hx-choose .hx-vsel__label::before {
	content: ""; flex: 0 0 auto; width: 3px; height: 14px; border-radius: 99px; background: var(--hx-ink);
}
body.single-product .hx-order .hx-choose .hx-chip {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; min-width: 0; width: 100%; padding: 6px 10px; border: 1.5px solid #e4e4e7;
	border-radius: 12px; background: #fff; color: var(--hx-ink); font-size: 14px; font-weight: 800;
	line-height: 1.2; cursor: pointer; box-shadow: none;
	transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
body.single-product .hx-order .hx-choose .hx-chip:hover { border-color: var(--hx-ink); background: #fafafa; }
body.single-product .hx-order .hx-choose .hx-chip:focus-visible { outline: 2px solid var(--hx-ink); outline-offset: 2px; }
body.single-product .hx-order .hx-choose .hx-chip:active { transform: scale(0.98); }

/* المقاس — text labels, all sizes on one row */
body.single-product .hx-order .hx-choose .hx-vsel--size .hx-chips {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 6px;
	grid-template-columns: none;
}
body.single-product .hx-order .hx-choose .hx-chip--size {
	flex: 1 1 0;
	min-width: 0;
	flex-direction: row;
	justify-content: center;
	gap: 4px;
	min-height: 44px;
	padding: 6px 4px;
	border-radius: 12px;
	letter-spacing: .03em;
}
body.single-product .hx-order .hx-choose .hx-chip--size .hx-chip__txt {
	flex: 0 1 auto;
	font-size: 15px;
	font-weight: 800;
	text-align: center;
}
body.single-product .hx-order .hx-choose .hx-chip--size.is-on {
	border-color: var(--hx-ink);
	background: var(--hx-ink);
	color: #fff;
	box-shadow: 0 2px 8px rgba(23, 25, 29, 0.14);
}
body.single-product .hx-order .hx-choose .hx-chip--size.is-on::after {
	content: "✓";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #fff;
	color: var(--hx-ink);
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
}

/* اللون — color circle + check ONLY (no blanc / .c / name text). */
body.single-product .hx-order .hx-choose .hx-vsel--color .hx-chips {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	grid-template-columns: none;
}
body.single-product .hx-order .hx-choose .hx-chip--color {
	position: relative;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	padding: 0;
	border-radius: 50%;
	justify-content: center;
	align-items: center;
	gap: 0;
	background: #fff;
	border: 2px solid #e4e4e7;
	overflow: visible;
}
body.single-product .hx-order .hx-choose .hx-chip--color .hx-chip__txt {
	display: none !important;
}
body.single-product .hx-order .hx-choose .hx-chip--color .hx-chip__sw {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex: 0 0 auto;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
body.single-product .hx-order .hx-choose .hx-chip--color.is-on {
	border-color: var(--hx-ink);
	background: #fff;
	color: inherit;
	box-shadow: 0 0 0 2px var(--hx-ink);
	padding: 0;
}
body.single-product .hx-order .hx-choose .hx-chip--color.is-on .hx-chip__sw {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
body.single-product .hx-order .hx-choose .hx-chip--color.is-on::after {
	content: "✓";
	position: absolute;
	right: -2px;
	bottom: -2px;
	margin: 0;
	width: 20px;
	height: 20px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--hx-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- COD order box — Algeria trust palette ----------
   White card, charcoal text, green CTA (confirmation), red only for discounts. */
body.single-product .hx-order.hx-cf {
	border: 1.5px solid #e5e7eb; background: #fff;
	box-shadow: 0 8px 24px rgba(23, 25, 29, 0.06);
}
body.single-product .hx-order .hx-order__head {
	padding: 10px 12px; border-radius: 12px; background: var(--hx-save-bg);
}
body.single-product .hx-order .hx-order__title { color: var(--hx-ink); }
body.single-product .hx-order .hx-order__sub { color: #4b5563; font-weight: 700; }
body.single-product .hx-order .hx-offers { grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.single-product .hx-order .hx-offer { flex-direction: row; min-height: 54px; padding: 9px 12px; text-align: start; border-color: var(--hx-primary-border); }
body.single-product .hx-order .hx-offer:hover { border-color: var(--hx-primary); }
body.single-product .hx-order .hx-offer.is-on { border-color: var(--hx-primary); background: var(--hx-primary-soft); box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), .14); }
body.single-product .hx-order .hx-offer__main { text-align: start; justify-items: start; }
body.single-product .hx-order .hx-offer__label { color: var(--hx-ink); font-size: 15px; }
body.single-product .hx-order .hx-offer__price { justify-items: end; }
body.single-product .hx-order .hx-offer__now { color: var(--hx-ink); font-size: 18px; }
body.single-product .hx-order .hx-offer__was { color: var(--hx-badge); opacity: .85; }
body.single-product .hx-order .hx-offer__save { background: var(--hx-save-bg); color: var(--hx-save); }
body.single-product .hx-order .hx-offers > .hx-choose { padding: 10px; border: 1px solid #eee; border-radius: 14px; background: #f7f7f6; }
body.single-product .hx-order .hx-choose.hx-lane-in { animation: hx-lane-in .22s ease-out; }
@keyframes hx-lane-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.single-product .hx-order .hx-choose.hx-lane-in { animation: none; } }
body.single-product .hx-order .hx-choose select.hx-vsel__select { background: #fff; }
body.single-product .hx-order .hx-choose select.hx-vsel__select:focus { border-color: var(--hx-primary); box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), .16); }
/* Fields: white, soft grey border; green only on focus. */
body.single-product .hx-order .hx-field__input { background: #fff; border-color: var(--hx-primary-border); }
body.single-product .hx-order .hx-field__icon { background: var(--hx-card-bg); border-color: var(--hx-primary-border); color: var(--hx-ink); }
body.single-product .hx-order .hx-field:focus-within .hx-field__icon { background: var(--hx-primary); border-color: var(--hx-primary); color: #fff; }
body.single-product .hx-order .hx-field__input:focus { border-color: var(--hx-primary); box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), .16); }
body.single-product .hx-order .hx-field.is-invalid .hx-field__input { border-color: var(--hx-badge); background: var(--hx-badge-bg); }
body.single-product .hx-order .hx-ship__card.is-on { border-color: var(--hx-primary); background: var(--hx-primary-soft); box-shadow: 0 0 0 3px rgba(var(--hx-primary-rgb), .14); }
body.single-product .hx-order .hx-ship__price { color: var(--hx-ink); }
body.single-product .hx-order .hx-ship__summary { border-color: var(--hx-primary-border); background: var(--hx-save-bg); }
body.single-product .hx-order .hx-ship__row--total strong { color: var(--hx-primary); }
/* CTA: dark green = confirm & safe for cash-on-delivery (min 52px, full width). */
body.single-product .hx-order .hx-order__btn {
	min-height: 56px; background: var(--hx-primary); color: #fff;
	box-shadow: 0 8px 20px rgba(var(--hx-primary-rgb), .32);
}
body.single-product .hx-order .hx-order__btn:hover { background: var(--hx-primary-dark); filter: none; }
body.single-product .hx-order .hx-order__btn:focus-visible { outline: 3px solid var(--hx-ink); outline-offset: 2px; }
body.single-product .hx-order .hx-order__trust {
	padding: 8px 10px; border-radius: 10px; background: var(--hx-save-bg); color: var(--hx-primary-dark); font-weight: 700;
}
body.single-product .hx-order .hx-piece__num { background: var(--hx-ink); }
/* Badges: green = free ship / trust · gold = best (limited) · red = hot/sale. */
body.single-product .hx-order .hx-offer__badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1.7; letter-spacing: 0; white-space: nowrap; }
body.single-product .hx-order .hx-offer__badge-ic { display: inline-flex; align-items: center; line-height: 1; }
body.single-product .hx-order .hx-offer__badge-ic svg { display: block; width: 13px; height: 13px; }
body.single-product .hx-order .hx-offer__save .hx-offer__badge-ic svg { width: 14px; height: 14px; }
body.single-product .hx-order .hx-offer__free { display: inline-flex; align-items: center; gap: 5px; }
body.single-product .hx-order .hx-offer__badge--best {
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #ea580c 100%);
	box-shadow: 0 3px 10px rgba(245, 158, 11, .4);
	color: #fff;
	text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}
body.single-product .hx-order .hx-offer__badge--free { background: var(--hx-primary); box-shadow: 0 3px 8px rgba(var(--hx-primary-rgb), .35); }
body.single-product .hx-order .hx-offer__badge--hot { background: var(--hx-badge); box-shadow: 0 3px 8px rgba(180, 35, 24, .32); }
body.single-product .hx-order .hx-offer__badge--sale { background: var(--hx-badge); box-shadow: 0 3px 8px rgba(180, 35, 24, .32); }
body.single-product .hx-order .hx-offer__badge--new { background: var(--hx-ink); box-shadow: 0 3px 8px rgba(23, 25, 29, .25); }
body.single-product .hx-order .hx-offer__badge--default { background: var(--hx-ink); box-shadow: 0 3px 8px rgba(23, 25, 29, .25); }
body.single-product .hx-order .hx-offer__free { background: var(--hx-save-bg); color: var(--hx-save); font-weight: 800; }
body.single-product .hx-order .hx-ship.is-free .hx-ship__price,
body.single-product .hx-order .hx-ship.is-free [data-hx-ship-cost] { color: var(--hx-save); }
