:root {
	--elec-red: #f52d45;
	--elec-green: #12a742;
	--elec-border: #e4e4e4;
	--elec-text: #363636;
}

.elecdevice-checkout-progress {
	direction: rtl;
	margin: 0 0 34px;
	padding: 13px 38px 11px;
	border: 1px solid var(--elec-border);
	border-radius: 16px;
	background: #fff;
}

.elecdevice-checkout-progress ol {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elecdevice-checkout-progress li {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #777;
	font-size: 15px;
}

.elecdevice-checkout-progress li:not(:last-child):before {
	position: absolute;
	top: 14px;
	right: 50%;
	left: -50%;
	height: 2px;
	background: #c8c8c8;
	content: '';
}

.elecdevice-checkout-progress .step-icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	width: 29px;
	height: 29px;
	align-items: center;
	justify-content: center;
	border: 2px solid #bdbdbd;
	border-radius: 6px;
	background: #fff;
	font-weight: 600;
	line-height: 1;
}

.elecdevice-checkout-progress li.is-complete { color: var(--elec-text); }
.elecdevice-checkout-progress li.is-complete .step-icon { border-color: var(--elec-green); color: var(--elec-green); font-size: 20px; }
.elecdevice-checkout-progress li.is-complete:not(:last-child):before { background: var(--elec-green); }
.elecdevice-checkout-progress li.is-current { color: var(--elec-text); }
.elecdevice-checkout-progress li.is-current .step-icon { border-color: #ff6372; color: #ff5263; }
.elecdevice-checkout-progress li.is-current:not(:last-child):before { background: linear-gradient(to left, var(--elec-green) 50%, #ff6372 50%); }

.woocommerce-cart .cross-sells {
	padding: 26px;
	border: 1px solid var(--elec-border);
	border-radius: 18px;
	background: #fff;
}

.woocommerce-cart .cross-sells > .title,
.woocommerce-cart .cross-sells .slider-title {
	margin-bottom: 24px;
	font-size: 22px;
	text-align: right;
}

.woocommerce-cart .cross-sells .wd-product {
	border: 1px solid var(--elec-border);
	border-radius: 12px;
	overflow: hidden;
}

.elecdevice-section-title {
	margin: 26px 0 18px;
	color: var(--elec-text);
	font-size: 22px;
}

/* Four-step classic checkout wizard. */
#elecdevice-shipping-stage {
	display: none;
	flex: 1 1 58%;
	min-width: 0;
	padding: 30px;
	border: 1px solid var(--elec-border);
	border-radius: 16px;
	background: #fff;
}

#elecdevice-shipping-stage h2 {
	margin: 0 0 8px;
	font-size: 24px;
}

.elecdevice-stage-help {
	margin-bottom: 24px;
	color: #777;
}

.elecdevice-shipping-options {
	display: grid;
	gap: 14px;
}

.elecdevice-shipping-card {
	display: flex;
	min-height: 82px;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 18px 20px;
	border: 1px solid var(--elec-border);
	border-radius: 13px;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}

.elecdevice-shipping-card:hover {
	border-color: #aaa;
	transform: translateY(-1px);
}

.elecdevice-shipping-card.is-selected {
	border-color: var(--elec-red);
	box-shadow: 0 0 0 2px rgba(245,45,69,.08);
}

.elecdevice-shipping-card input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--elec-red);
}

.elecdevice-shipping-name {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--elec-text);
	font-weight: 700;
}

.elecdevice-shipping-options.has-error {
	padding: 8px;
	border: 1px solid #e24040;
	border-radius: 14px;
}

.elecdevice-no-shipping {
	padding: 20px;
	border-radius: 10px;
	background: #f5f8f6;
}

.elecdevice-wizard-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin-top: 26px;
}

.elecdevice-wizard-actions .button {
	min-width: 145px;
	border-radius: 9px;
}

.elecdevice-payment-back {
	min-height: 48px;
	margin: 0 !important;
	border: 1px solid #9ca3aa !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #3f4850 !important;
	cursor: pointer;
}

.elecdevice-payment-back:before {
	content: '‹';
	margin-left: 6px;
}

#payment .place-order {
	display: flex;
	align-items: stretch;
	gap: 12px;
	flex-wrap: wrap;
}

#payment .place-order > :not(.elecdevice-payment-back):not(#place_order) {
	flex-basis: 100%;
}

#payment #place_order {
	flex: 1 1 260px;
	margin: 0 !important;
}

.elecdevice-field-error {
	display: block;
	width: 100%;
	margin-top: 7px;
	color: #d72638;
	font-size: 13px;
	font-weight: 600;
}

.elecdevice-postcode-invalid :is(input, select) {
	border-color: #d72638 !important;
	box-shadow: 0 0 0 1px rgba(215,38,56,.08);
}

form.checkout.elecdevice-stage-2 > #elecdevice-shipping-stage {
	display: block !important;
}

form.checkout.elecdevice-stage-0 #payment,
form.checkout.elecdevice-stage-1 #payment,
form.checkout.elecdevice-stage-2 #payment,
form.checkout.elecdevice-stage-0 .elecdevice-section-title,
form.checkout.elecdevice-stage-1 .elecdevice-section-title,
form.checkout.elecdevice-stage-2 .elecdevice-section-title {
	display: none !important;
}

form.checkout.elecdevice-stage-2 > .checkout-order-review,
form.checkout.elecdevice-stage-3 > .checkout-order-review {
	flex: 1 1 38%;
}

form.checkout.elecdevice-stage-3 > .checkout-order-review {
	max-width: 100%;
}

/* WooCommerce recalculates totals after address changes; keep that AJAX update
   visually contained so it cannot anchor or jump the whole viewport. */
form.checkout > .checkout-order-review,
form.checkout .woocommerce-checkout-review-order {
	overflow-anchor: none;
}

form.checkout.processing > .blockOverlay {
	position: absolute !important;
}

.checkout-order-review .blockOverlay {
	border-radius: inherit;
	background: rgba(255,255,255,.45) !important;
	opacity: 1 !important;
}

form.checkout .woocommerce-invalid :is(input, select, textarea) {
	border-color: #e24040;
}

#payment .wc_payment_methods > li {
	margin-bottom: 12px;
	padding: 16px 18px;
	border: 1px solid var(--elec-border);
	border-radius: 12px;
	background: #fff;
}

#payment .wc_payment_methods > li:has(input:checked) {
	border-color: #ff9ba6;
	box-shadow: 0 0 0 1px rgba(245,45,69,.06);
}

#payment .payment_method_elecdevice_proforma .payment_box {
	margin: 12px 0 0;
	padding: 14px 17px;
	border-radius: 9px;
	background: #fff5f6;
	color: #4a4a4a;
}

.elecdevice-proforma-success {
	margin: 18px 0;
	padding: 18px 20px;
	border-right: 4px solid var(--elec-green);
	border-radius: 10px;
	background: #f2fbf5;
	line-height: 2;
}

@media (max-width: 767px) {
	.elecdevice-checkout-progress { padding: 12px 4px 10px; }
	.elecdevice-checkout-progress li { font-size: 11px; text-align: center; }
	.elecdevice-checkout-progress .step-icon { width: 25px; height: 25px; }
	.elecdevice-checkout-progress li:not(:last-child):before { top: 12px; }
	.woocommerce-cart .cross-sells { padding: 16px 12px; }
	#elecdevice-shipping-stage { flex-basis: 100%; padding: 20px 14px; }
	.elecdevice-wizard-actions { align-items: stretch; flex-direction: column-reverse; }
	.elecdevice-wizard-actions .button { width: 100%; }
	.elecdevice-shipping-card { min-height: 70px; padding: 14px; }
	#payment .place-order { flex-direction: column; }
	#payment .elecdevice-payment-back,
	#payment #place_order { width: 100%; flex-basis: auto; }
}
