/*
 * Search4U cart and checkout. Loaded on those pages only, after s4u-round2.css.
 * Same tokens as the shop: Inter for UI, Barlow for headings and prices,
 * Search4U green for actions, light grey page with white cards.
 */

body.woocommerce-cart,
body.woocommerce-checkout {
	--flow-line: #e4e7ee;
	--flow-ink: #111418;
	--flow-soft: #5d636d;
	--flow-bg: #f3f4f8;
	--flow-green: var(--s4u-green, #1d4c2e);
	--flow-green-dark: var(--s4u-green-dark, #143821);
	--flow-radius: 16px;
	background: var(--flow-bg);
}

body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
	color: var(--flow-ink);
	font-family: var(--s4u-font-ui);
}

/* Old page wrappers and the theme's page title (replaced by our head) */
body.s4u-flow .site-main > .page-header,
body.woocommerce-cart .site-main > .page-header {
	display: none;
}

body.woocommerce-cart .page-content > .product,
body.woocommerce-checkout .page-content > .product,
body.woocommerce-cart .page-content .product > .product,
body.woocommerce-checkout .page-content .product > .product {
	margin: 0;
	padding: 0;
}

/* ---------- Head: title, then a full-width progress bar ---------- */

.s4u-flow-head {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 18px;
	margin: 0 0 24px;
}

body .s4u-flow-head h1.s4u-flow-title {
	margin: 0;
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: clamp(30px, 3vw, 42px);
	font-style: normal;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-transform: none;
}

.s4u-flow-title__meta {
	color: var(--flow-soft);
	font-size: 0.55em;
	font-weight: 500;
	letter-spacing: 0;
}

.s4u-steps {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 16px 24px;
	border: 1px solid var(--flow-line);
	border-radius: var(--flow-radius);
	background: #fff;
	list-style: none;
}

.s4u-steps__item {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #8a909a;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
}

.s4u-steps__item + .s4u-steps__item {
	flex: 1 1 0;
}

/* Connecting line fills the space between steps */
.s4u-steps__item + .s4u-steps__item::before {
	content: "";
	flex: 1 1 auto;
	height: 3px;
	margin: 0 16px;
	border-radius: 3px;
	background: #e1e4ea;
}

.s4u-steps__item.is-done + .s4u-steps__item::before,
.s4u-steps__item.is-current::before {
	background: var(--flow-green);
}

.s4u-steps__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border: 2px solid #d5d9e0;
	border-radius: 50%;
	background: #fff;
	color: #8a909a;
	font-size: 14px;
	font-weight: 700;
}

.s4u-steps__num svg {
	width: 15px;
	height: 15px;
}

.s4u-steps__item.is-done .s4u-steps__num,
.s4u-steps__item.is-current .s4u-steps__num {
	border-color: var(--flow-green);
	background: var(--flow-green);
	color: #fff;
}

.s4u-steps__item.is-current .s4u-steps__num {
	box-shadow: 0 0 0 4px rgba(29, 76, 46, 0.15);
}

.s4u-steps__item.is-current,
.s4u-steps__item.is-done {
	color: var(--flow-ink);
}

.s4u-steps__item.is-current {
	font-weight: 600;
}

/* ---------- Notices ---------- */

body.s4u-flow .woocommerce .woocommerce-message,
body.s4u-flow .woocommerce .woocommerce-info,
body.s4u-flow .woocommerce .woocommerce-error,
body.woocommerce-cart .woocommerce .woocommerce-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0 0 16px;
	padding: 14px 18px 14px 48px;
	border: 1px solid var(--flow-line);
	border-left: 4px solid var(--flow-green);
	border-radius: 12px;
	background: #fff;
	color: var(--flow-ink);
	font-size: 14px;
	line-height: 1.5;
}

body.s4u-flow .woocommerce .woocommerce-message::before,
body.s4u-flow .woocommerce .woocommerce-info::before,
body.s4u-flow .woocommerce .woocommerce-error::before {
	top: 50%;
	left: 18px;
	color: var(--flow-green);
	transform: translateY(-50%);
}

body.s4u-flow .woocommerce .woocommerce-error {
	border-left-color: var(--s4u-pink, #ef3659);
	list-style: none;
}

body.s4u-flow .woocommerce .woocommerce-error::before {
	color: var(--s4u-pink, #ef3659);
}

body.s4u-flow .woocommerce .woocommerce-message .button,
body.s4u-flow .woocommerce .woocommerce-info .button {
	order: 2;
	margin-left: auto;
	padding: 8px 14px;
	border: 1px solid var(--flow-ink);
	border-radius: 999px;
	background: #fff;
	color: var(--flow-ink);
	font-size: 13px;
	font-weight: 600;
}

body.s4u-flow .woocommerce .woocommerce-info a:not(.button) {
	color: var(--flow-green);
	font-weight: 600;
}

/* ---------- Shared: fields and buttons ---------- */

body.s4u-flow .woocommerce input.input-text,
body.s4u-flow .woocommerce textarea,
body.s4u-flow .woocommerce select,
body.s4u-flow .woocommerce .select2-container .select2-selection--single {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid #d5d9e0;
	border-radius: 10px;
	background: #fff;
	color: var(--flow-ink);
	font-family: var(--s4u-font-ui);
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.s4u-flow .woocommerce textarea {
	min-height: 96px;
}

body.s4u-flow .woocommerce input.input-text:focus,
body.s4u-flow .woocommerce textarea:focus,
body.s4u-flow .woocommerce select:focus,
body.s4u-flow .woocommerce .select2-container--focus .select2-selection--single,
body.s4u-flow .woocommerce .select2-container--open .select2-selection--single {
	border-color: var(--flow-green);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(29, 76, 46, 0.15);
}

body.s4u-flow .woocommerce .select2-container .select2-selection--single {
	display: flex;
	align-items: center;
	padding: 0 14px;
}

body.s4u-flow .woocommerce .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0;
	color: var(--flow-ink);
	line-height: 1.4;
}

body.s4u-flow .woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
}

body.s4u-flow .woocommerce form .form-row label:not(.checkbox):not(.woocommerce-form__label-for-checkbox) {
	display: block;
	margin: 0 0 6px;
	color: var(--flow-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

body.s4u-flow .woocommerce form .form-row .required {
	color: var(--s4u-pink, #ef3659);
	text-decoration: none;
}

body.s4u-flow .woocommerce form .form-row.woocommerce-invalid input.input-text,
body.s4u-flow .woocommerce form .form-row.woocommerce-invalid .select2-selection {
	border-color: var(--s4u-pink, #ef3659);
}

body.s4u-flow .woocommerce .button,
body.s4u-flow .woocommerce button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 1px solid var(--flow-ink);
	border-radius: 10px;
	background: #fff;
	color: var(--flow-ink);
	font-family: var(--s4u-font-ui);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.s4u-flow .woocommerce .button:hover,
body.s4u-flow .woocommerce button.button:hover {
	background: var(--flow-ink);
	color: #fff;
}

body.s4u-flow .woocommerce .button:disabled,
body.s4u-flow .woocommerce .button[disabled] {
	opacity: 0.45;
	pointer-events: none;
}

/* Main action: Proceed to checkout / Place order */
body.s4u-flow .woocommerce a.checkout-button.button,
body.s4u-flow .woocommerce #place_order {
	display: flex;
	width: 100%;
	min-height: 54px;
	margin: 0;
	border: 0;
	border-radius: 12px;
	background: var(--flow-green);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: none;
}

body.s4u-flow .woocommerce a.checkout-button.button:hover,
body.s4u-flow .woocommerce #place_order:hover {
	background: var(--flow-green-dark);
	color: #fff;
}

/* Summary card (cart and checkout) */
.s4u-summary-card,
body.woocommerce-cart .cart-collaterals .cart_totals,
body.s4u-flow #order_review {
	padding: 24px;
	border: 1px solid var(--flow-line);
	border-radius: var(--flow-radius);
	background: #fff;
}

body.woocommerce-cart .cart-collaterals .cart_totals h2,
body.s4u-flow #order_review_heading {
	margin: 0 0 16px;
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 24px;
	font-weight: 600;
}

/* Totals tables */
body.s4u-flow .woocommerce .cart_totals table.shop_table,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table {
	width: 100%;
	margin: 0 0 18px;
	border: 0;
	border-radius: 0;
	border-collapse: collapse;
	background: transparent;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table th,
body.s4u-flow .woocommerce .cart_totals table.shop_table td,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table th,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table td {
	padding: 10px 0;
	border: 0;
	border-top: 1px solid #eef0f4;
	background: transparent;
	color: var(--flow-soft);
	font-size: 14px;
	font-weight: 500;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	vertical-align: top;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table td,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table td.product-total,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table tfoot td {
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 16px;
	font-weight: 600;
	text-align: right;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table tr:first-child th,
body.s4u-flow .woocommerce .cart_totals table.shop_table tr:first-child td {
	border-top: 0;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table .order-total th,
body.s4u-flow .woocommerce .cart_totals table.shop_table .order-total td,
body.s4u-flow .woocommerce .woocommerce-checkout-review-order-table .order-total th,
body.s4u-flow .woocommerce .woocommerce-checkout-review-order-table .order-total td {
	padding-top: 16px;
	border-top: 1px solid var(--flow-line);
	color: var(--flow-ink);
	font-size: 16px;
	font-weight: 700;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table .order-total td,
body.s4u-flow .woocommerce .woocommerce-checkout-review-order-table .order-total td {
	font-size: 26px;
	line-height: 1;
}

body.s4u-flow .woocommerce .cart_totals table.shop_table .order-total .s4u-price-suffix,
body.s4u-flow .woocommerce .woocommerce-checkout-review-order-table .order-total .s4u-price-suffix {
	font-size: 15px;
	color: var(--flow-soft);
}

body.s4u-flow .woocommerce .cart_totals td::before,
body.s4u-flow .woocommerce .woocommerce-checkout-review-order-table td::before {
	content: none !important;
}

/* Shipping options inside totals */
body.s4u-flow .woocommerce ul#shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: right;
}

body.s4u-flow .woocommerce .woocommerce-shipping-destination,
body.s4u-flow .woocommerce .shipping-calculator-button {
	color: var(--flow-soft);
	font-family: var(--s4u-font-ui);
	font-size: 12px;
	font-weight: 400;
}

/* Trust points + continue link */
.s4u-trust {
	display: grid;
	gap: 10px;
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px dashed #dde1e8;
	list-style: none;
}

.s4u-trust li {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--flow-ink);
	font-size: 13px;
	font-weight: 500;
}

.s4u-trust svg {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	color: var(--flow-green);
}

.s4u-continue {
	display: block;
	margin-top: 14px;
	color: var(--flow-ink);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.s4u-continue:hover {
	color: var(--flow-green);
	text-decoration: underline;
}

/* =========================================================
   CART
   ========================================================= */

body.woocommerce-cart .site-main .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	grid-template-areas:
		"head head"
		"notice notice"
		"items summary"
		"cross summary";
	align-items: start;
	gap: 0 28px;
}

body.woocommerce-cart .woocommerce > .s4u-flow-head { grid-area: head; }
body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper { grid-area: notice; }
body.woocommerce-cart .woocommerce > .woocommerce-cart-form { grid-area: items; }

body.woocommerce-cart .woocommerce > .cart-collaterals {
	grid-area: summary;
	position: sticky;
	top: 20px;
	width: auto;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
}

body.woocommerce-cart .cart-collaterals .cross-sells {
	display: none;
}

body.woocommerce-cart .wc-proceed-to-checkout {
	padding: 0;
}

/* Cart rows as cards */
body.woocommerce-cart .woocommerce table.cart {
	display: block;
	margin: 0;
	border: 0;
	background: transparent;
}

body.woocommerce-cart .woocommerce table.cart thead {
	display: none;
}

body.woocommerce-cart .woocommerce table.cart tbody {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
}

body.woocommerce-cart .woocommerce table.cart tbody > tr {
	min-width: 0;
}

body.woocommerce-cart .woocommerce table.cart tr.cart_item {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr) auto auto 36px;
	grid-template-areas: "thumb name qty sub remove";
	align-items: center;
	gap: 0 22px;
	padding: 16px 18px 16px 16px;
	border: 1px solid var(--flow-line);
	border-radius: var(--flow-radius);
	background: #fff;
}

body.woocommerce-cart .woocommerce table.cart tr.cart_item td {
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}

body.woocommerce-cart .woocommerce table.cart tr td::before {
	content: none !important;
	display: none !important;
}

body.woocommerce-cart table.cart td.product-thumbnail {
	grid-area: thumb;
	width: auto;
}

body.woocommerce-cart table.cart td.product-thumbnail a {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 8px;
	border-radius: 12px;
	background: linear-gradient(180deg, #f5f6fa 0%, #eceff5 100%);
}

body.woocommerce-cart table.cart td.product-thumbnail img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	mix-blend-mode: multiply;
}

body.woocommerce-cart table.cart td.product-name {
	grid-area: name;
	min-width: 0;
}

body.woocommerce-cart table.cart td.product-name > a {
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

body.woocommerce-cart table.cart td.product-name > a:hover {
	color: var(--flow-green);
}

body.s4u-flow .woocommerce dl.variation {
	display: block;
	margin: 6px 0 0;
	padding: 0;
	color: var(--flow-soft);
	font-family: var(--s4u-font-ui);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.6;
}

body.s4u-flow .woocommerce dl.variation dt,
body.s4u-flow .woocommerce dl.variation dd {
	display: inline;
	float: none;
	margin: 0;
	padding: 0;
	background: none;
}

body.s4u-flow .woocommerce dl.variation dt {
	margin-right: 4px;
	color: var(--flow-soft);
	font-weight: 400;
}

body.s4u-flow .woocommerce dl.variation dd {
	color: var(--flow-ink);
	font-weight: 600;
}

body.s4u-flow .woocommerce dl.variation dd:not(:last-child)::after {
	content: "\00a0\00b7  ";
	white-space: pre-wrap;
	color: #b4bac4;
	font-weight: 400;
}

body.s4u-flow .woocommerce dl.variation dd p {
	display: inline;
	margin: 0;
}

/* Unit price under the name */
body.woocommerce-cart table.cart td.product-price {
	display: none !important;
}

body.woocommerce-cart table.cart td.product-quantity {
	grid-area: qty;
}

body.woocommerce-cart table.cart td.product-subtotal {
	grid-area: sub;
	min-width: 110px;
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 22px;
	font-weight: 700;
	text-align: right;
}

body.woocommerce-cart table.cart td.product-subtotal .s4u-price-suffix {
	color: var(--flow-soft);
	font-size: 14px;
	font-weight: 500;
}

body.woocommerce-cart table.cart td.product-remove {
	grid-area: remove;
	justify-self: end;
}

body.woocommerce-cart .woocommerce table.cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--flow-bg);
	color: var(--flow-soft) !important;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.woocommerce-cart .woocommerce table.cart a.remove:hover {
	background: #fde8ec;
	color: var(--s4u-pink, #ef3659) !important;
}

/* Quantity stepper */
body.woocommerce-cart .woocommerce .quantity {
	display: inline-flex;
	align-items: center;
	height: 44px;
	border: 1px solid #d5d9e0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

body.woocommerce-cart .woocommerce .quantity input.qty {
	width: 52px;
	min-height: 0;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-family: var(--s4u-font-din);
	font-size: 17px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	box-shadow: none;
}

body.woocommerce-cart .woocommerce .quantity input.qty::-webkit-outer-spin-button,
body.woocommerce-cart .woocommerce .quantity input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

body.woocommerce-cart .woocommerce .quantity input.qty:focus {
	box-shadow: none;
}

.s4u-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--flow-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.s4u-qty__btn:hover,
.s4u-qty__btn:focus {
	background: var(--flow-bg);
	color: var(--flow-ink);
}

.s4u-qty__btn:focus-visible {
	outline: 2px solid var(--flow-green);
	outline-offset: -2px;
}

/* Coupon + update row */
body.woocommerce-cart .woocommerce table.cart tr:not(.cart_item) {
	display: block;
}

body.woocommerce-cart .woocommerce table.cart td.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border: 1px dashed #d5d9e0;
	border-radius: var(--flow-radius);
	background: transparent;
}

body.woocommerce-cart .woocommerce table.cart td.actions .coupon {
	display: flex;
	flex: 1 1 320px;
	gap: 10px;
	float: none;
	max-width: 460px;
	padding: 0;
}

body.woocommerce-cart .woocommerce table.cart td.actions .coupon .input-text {
	flex: 1 1 auto;
	width: auto;
	min-height: 46px;
	margin: 0;
}

body.woocommerce-cart .woocommerce table.cart td.actions > .button,
body.woocommerce-cart .woocommerce table.cart td.actions .coupon .button {
	float: none;
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

/* With JavaScript the cart updates itself, so the button is not needed */
body.s4u-cart-js.woocommerce-cart .woocommerce table.cart td.actions > button[name="update_cart"] {
	display: none;
}

/* Updating overlay */
body.woocommerce-cart .woocommerce .blockUI.blockOverlay {
	border-radius: var(--flow-radius);
}

/* Empty cart */
body.woocommerce-cart .woocommerce > .wc-empty-cart-message,
body.woocommerce-cart .woocommerce > .return-to-shop {
	grid-column: 1 / -1;
}

body.woocommerce-cart .woocommerce .wc-empty-cart-message .cart-empty.woocommerce-info {
	flex-direction: column;
	justify-content: center;
	margin: 0;
	padding: 64px 24px 24px;
	border: 1px solid var(--flow-line);
	border-bottom: 0;
	border-left: 1px solid var(--flow-line);
	border-radius: var(--flow-radius) var(--flow-radius) 0 0;
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 22px;
	font-weight: 500;
	text-align: center;
}

body.woocommerce-cart .woocommerce .wc-empty-cart-message .cart-empty.woocommerce-info::before {
	content: "";
	position: static;
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--flow-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2l2.4 11h11L21 8H6.2' fill='none' stroke='%231d4c2e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.4' fill='%231d4c2e'/%3E%3Ccircle cx='17' cy='19.5' r='1.4' fill='%231d4c2e'/%3E%3C/svg%3E") center / 30px no-repeat;
	transform: none;
}

body.woocommerce-cart .woocommerce .return-to-shop {
	margin: 0;
	padding: 0 24px 56px;
	border: 1px solid var(--flow-line);
	border-top: 0;
	border-radius: 0 0 var(--flow-radius) var(--flow-radius);
	background: #fff;
	text-align: center;
}

body.woocommerce-cart .woocommerce .return-to-shop .button {
	min-height: 50px;
	padding: 0 28px;
	border: 0;
	background: var(--flow-green);
	color: #fff;
}

body.woocommerce-cart .woocommerce .return-to-shop .button:hover {
	background: var(--flow-green-dark);
}

/* =========================================================
   CHECKOUT
   ========================================================= */

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	grid-template-areas:
		"details heading"
		"details review";
	grid-template-rows: auto 1fr;
	align-items: start;
	gap: 0 28px;
}

body.s4u-flow.woocommerce-checkout form.checkout > #customer_details {
	grid-area: details;
	display: grid;
	gap: 18px;
	width: auto;
}

body.s4u-flow.woocommerce-checkout form.checkout > #order_review_heading {
	grid-area: heading;
	margin: 0;
	padding: 24px 24px 0;
	border: 1px solid var(--flow-line);
	border-bottom: 0;
	border-radius: var(--flow-radius) var(--flow-radius) 0 0;
	background: #fff;
}

body.s4u-flow.woocommerce-checkout form.checkout > #order_review {
	grid-area: review;
	position: sticky;
	top: 20px;
	padding-top: 16px;
	border-top: 0;
	border-radius: 0 0 var(--flow-radius) var(--flow-radius);
}

/* Each block of fields is a card */
body.s4u-flow.woocommerce-checkout #customer_details::before,
body.s4u-flow.woocommerce-checkout #customer_details::after {
	display: none;
}

body.s4u-flow.woocommerce-checkout #customer_details .col-1,
body.s4u-flow.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
	max-width: none;
	display: grid;
	gap: 18px;
}

body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields,
body.s4u-flow.woocommerce-checkout .woocommerce-account-fields,
body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields,
body.s4u-flow.woocommerce-checkout .woocommerce-additional-fields {
	padding: 24px;
	border: 1px solid var(--flow-line);
	border-radius: var(--flow-radius);
	background: #fff;
}

body.s4u-flow.woocommerce-checkout .woocommerce-account-fields:not(:has(input)) {
	display: none;
}

body.s4u-flow.woocommerce-checkout #customer_details h3 {
	margin: 0 0 18px;
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
}

body.s4u-flow.woocommerce-checkout #customer_details h3#ship-to-different-address {
	margin: 0;
	font-family: var(--s4u-font-ui);
	font-size: 16px;
	font-weight: 600;
}

body.s4u-flow.woocommerce-checkout #ship-to-different-address label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-weight: 600;
	cursor: pointer;
}

body.s4u-flow.woocommerce-checkout .shipping_address {
	margin-top: 18px;
}

/* Two-column field grid */
body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
}

body.s4u-flow.woocommerce-checkout form .form-row {
	float: none;
	width: auto;
	margin: 0 0 16px;
	padding: 0;
}

body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-wide {
	grid-column: 1 / -1;
}

/* Address line 2 sits right under line 1 */
body.s4u-flow.woocommerce-checkout #billing_address_2_field,
body.s4u-flow.woocommerce-checkout #shipping_address_2_field {
	margin-top: -6px;
}

/* City, State, PIN in one row on wide screens */
@media (min-width: 1200px) {
	body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
	body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
	body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last,
	body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-first,
	body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row-last,
	body.s4u-flow.woocommerce-checkout #billing_phone_field,
	body.s4u-flow.woocommerce-checkout #billing_email_field {
		grid-column: span 3;
	}

	body.s4u-flow.woocommerce-checkout #billing_city_field,
	body.s4u-flow.woocommerce-checkout #billing_state_field,
	body.s4u-flow.woocommerce-checkout #billing_postcode_field,
	body.s4u-flow.woocommerce-checkout #shipping_city_field,
	body.s4u-flow.woocommerce-checkout #shipping_state_field,
	body.s4u-flow.woocommerce-checkout #shipping_postcode_field {
		grid-column: span 2;
	}
}

body.s4u-flow.woocommerce-checkout .woocommerce-additional-fields .form-row,
body.s4u-flow.woocommerce-checkout .woocommerce-account-fields .form-row:last-child {
	margin-bottom: 0;
}

/* Checkboxes */
body.s4u-flow .woocommerce input[type="checkbox"],
body.s4u-flow .woocommerce input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--flow-green);
	cursor: pointer;
}

body.s4u-flow .woocommerce label.checkbox,
body.s4u-flow .woocommerce .woocommerce-form__label-for-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 500;
}

/* Login and coupon panels */
body.s4u-flow.woocommerce-checkout .woocommerce form.login,
body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon {
	margin: 0 0 16px;
	padding: 20px 24px;
	border: 1px solid var(--flow-line);
	border-radius: var(--flow-radius);
	background: #fff;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon {
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: -6px;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon[style*="block"],
body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon:not([style*="none"]) {
	display: flex !important;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon p:not(.form-row) {
	flex: 1 1 100%;
	margin: 0;
	color: var(--flow-soft);
	font-size: 13px;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon .form-row {
	margin: 0;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon .form-row-first {
	flex: 0 1 420px;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.checkout_coupon .clear {
	display: none;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.login .form-row-first,
body.s4u-flow.woocommerce-checkout .woocommerce form.login .form-row-last {
	display: inline-block;
	width: calc(50% - 8px);
	vertical-align: top;
}

body.s4u-flow.woocommerce-checkout .woocommerce form.login .form-row-first {
	margin-right: 12px;
}

/* Review table: product lines */
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table thead {
	display: none;
}

body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table tbody td {
	border-top: 0;
	padding: 0 0 14px;
}

body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table td.product-name {
	color: var(--flow-ink);
	font-family: var(--s4u-font-din);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table .product-quantity {
	color: var(--flow-soft);
	font-family: var(--s4u-font-ui);
	font-size: 13px;
	font-weight: 600;
}

body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table tfoot tr:first-child th,
body.s4u-flow .woocommerce table.woocommerce-checkout-review-order-table tfoot tr:first-child td {
	border-top: 1px solid var(--flow-line);
}

/* Payment */
body.s4u-flow #payment {
	border-radius: 0;
	background: transparent;
}

body.s4u-flow #payment ul.payment_methods {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	list-style: none;
}

body.s4u-flow #payment ul.payment_methods li {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--flow-line);
	border-radius: 12px;
	background: #fff;
	line-height: 1.4;
}

body.s4u-flow #payment ul.payment_methods li:has(input:checked) {
	border-color: var(--flow-green);
	box-shadow: 0 0 0 1px var(--flow-green);
}

body.s4u-flow #payment ul.payment_methods li > input {
	margin-right: 10px;
	vertical-align: middle;
}

body.s4u-flow #payment ul.payment_methods li > label {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--flow-ink);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

body.s4u-flow #payment ul.payment_methods li img {
	max-height: 22px;
	margin: 0;
	vertical-align: middle;
}

body.s4u-flow #payment div.payment_box {
	margin: 12px 0 0;
	padding: 14px;
	border-radius: 10px;
	background: var(--flow-bg);
	color: var(--flow-ink);
	font-size: 13px;
}

body.s4u-flow #payment div.payment_box::before {
	display: none;
}

body.s4u-flow #payment div.payment_box .wc-stripe-gateway-container .payment-type,
body.s4u-flow #payment div.payment_box #wc-stripe-card-element {
	padding: 13px 12px;
	border: 1px solid #d5d9e0;
	border-radius: 10px;
	background: #fff;
}

body.s4u-flow #payment .form-row.place-order {
	margin: 0;
	padding: 0;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper {
	margin: 0 0 16px;
	color: var(--flow-soft);
	font-size: 12px;
	line-height: 1.5;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text p {
	margin: 0 0 12px;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper a {
	color: var(--flow-green);
	font-weight: 600;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row {
	margin: 0;
	color: var(--flow-ink);
	font-size: 13px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
	body.woocommerce-cart .site-main .woocommerce {
		grid-template-columns: minmax(0, 1fr) 340px;
	}

	body.s4u-flow.woocommerce-checkout .woocommerce form.checkout {
		grid-template-columns: minmax(0, 1fr) 380px;
	}
}

@media (max-width: 900px) {
	body.woocommerce-cart .site-main .woocommerce {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"notice"
			"items"
			"summary";
		gap: 20px;
	}

	body.woocommerce-cart .woocommerce > .cart-collaterals {
		position: static;
	}

	body.s4u-flow.woocommerce-checkout .woocommerce form.checkout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"details"
			"heading"
			"review";
		grid-template-rows: auto;
		gap: 0;
	}

	body.s4u-flow.woocommerce-checkout form.checkout > #order_review_heading {
		margin-top: 20px;
	}

	body.s4u-flow.woocommerce-checkout form.checkout > #order_review {
		position: static;
	}
}

@media (max-width: 767px) {
	.s4u-flow-head {
		margin-bottom: 20px;
	}

	.s4u-steps__label {
		display: none;
	}

	.s4u-steps__item.is-current .s4u-steps__label {
		display: inline;
	}

	.s4u-steps {
		padding: 12px 14px;
	}

	.s4u-steps__item + .s4u-steps__item::before {
		margin: 0 8px;
	}

	body.woocommerce-cart .woocommerce table.cart tr.cart_item {
		grid-template-columns: 88px minmax(0, 1fr) auto;
		grid-template-areas:
			"thumb name remove"
			"thumb qty sub";
		gap: 10px 14px;
		padding: 12px;
	}

	body.woocommerce-cart table.cart td.product-name > a {
		font-size: 16px;
	}

	body.woocommerce-cart table.cart td.product-subtotal {
		align-self: center;
		min-width: 0;
		font-size: 19px;
	}

	body.woocommerce-cart table.cart td.product-remove {
		align-self: start;
	}

	body.woocommerce-cart .woocommerce .quantity {
		height: 38px;
	}

	body.woocommerce-cart .woocommerce .quantity input.qty {
		width: 40px;
		height: 36px;
	}

	.s4u-qty__btn {
		width: 34px;
		height: 36px;
	}

	body.woocommerce-cart .woocommerce table.cart td.actions .coupon {
		flex: 1 1 100%;
		max-width: none;
	}

	.s4u-summary-card,
	body.woocommerce-cart .cart-collaterals .cart_totals,
	body.s4u-flow #order_review,
	body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields,
	body.s4u-flow.woocommerce-checkout .woocommerce-account-fields,
	body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields,
	body.s4u-flow.woocommerce-checkout .woocommerce-additional-fields {
		padding: 18px 16px;
	}

	body.s4u-flow.woocommerce-checkout form.checkout > #order_review_heading {
		padding: 18px 16px 0;
	}

	body.s4u-flow.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
	body.s4u-flow.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	body.s4u-flow.woocommerce-checkout .woocommerce form.login .form-row-first,
	body.s4u-flow.woocommerce-checkout .woocommerce form.login .form-row-last {
		display: block;
		width: auto;
		margin-right: 0;
	}
}

/* ---------- Place order area: no floats, tidy terms line ---------- */

body.s4u-flow.woocommerce-checkout #payment #place_order {
	float: none;
	clear: both;
}

body.s4u-flow.woocommerce-checkout #payment .s4u-trust {
	clear: both;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
}

body.s4u-flow.woocommerce-checkout #payment .s4u-trust li {
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 6px;
	border-radius: 10px;
	background: var(--flow-bg);
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row,
body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row label {
	line-height: 1.5;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row label.woocommerce-form__label-for-checkbox {
	position: relative;
	display: block;
	padding-left: 30px;
	font-size: 14px;
	font-weight: 500;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row label.woocommerce-form__label-for-checkbox input[type="checkbox"] {
	position: absolute;
	top: 1px;
	left: 0;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .form-row abbr.required {
	float: none;
	margin-left: 2px;
	color: var(--s4u-pink, #ef3659);
	text-decoration: none;
}

body.s4u-flow .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text p {
	font-size: 12px;
	line-height: 1.55;
}
