/* Preserve the cart's native layout and keep the item image in its original proportion. */
body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail img {
	display: block;
	width: 110px;
	height: auto;
	min-width: 0;
	max-width: 100%;
	object-fit: contain;
	border-radius: 4px;
}

body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail {
	width: 128px;
	max-width: none;
}

body.woocommerce-cart .woocommerce-cart-form :is(.product-price, .product-subtotal) .amount {
	white-space: nowrap;
}

/* One card background. Hide only the previous copy in the same Elementor layout. */
body.woocommerce-cart .elementor-element-637f73d5:has(.ks-cart-guidance) {
	padding: 18px;
	border: 0;
	box-shadow: none;
	background: #f4f4f3;
}

body.woocommerce-cart .wd-cart-totals:has(.ks-cart-guidance) ~ .elementor-element-f024ef0 {
	display: none;
}

body.woocommerce-cart :is(.cart_totals, .cart-totals-inner):has(.ks-cart-guidance) {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	text-align: left;
}

body.woocommerce-cart .cart-totals-inner:has(.ks-cart-guidance) h2 {
	margin-bottom: 12px;
	font-size: 20px;
	letter-spacing: normal;
	text-transform: none;
}

body.woocommerce-cart .wc-proceed-to-checkout:has(.ks-cart-guidance) .checkout-button {
	letter-spacing: normal;
	text-transform: none;
}

.ks-cart-simple-total .cart-subtotal {
	display: none;
}

.ks-cart-guidance {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.42;
	text-align: left;
}

.ks-cart-next {
	margin: 0 0 12px;
}

.ks-cart-answers {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ks-cart-answers li,
.ks-cart-disclosure {
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid #dedee0;
}

.ks-cart-answers strong {
	display: block;
	color: #24262c;
}

.ks-cart-disclosure {
	margin-top: 8px;
	text-align: left;
}

.ks-cart-disclosure summary {
	cursor: pointer;
	color: #203865;
	font-weight: 600;
}

.ks-cart-disclosure[open] summary {
	margin-bottom: 8px;
}

.ks-cart-disclosure label[for="pwgc-redeem-gift-card-number"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.ks-cart-disclosure #pwgc-redeem-gift-card-number {
	width: 100%;
	max-width: 100%;
}

.ks-cart-disclosure #pwgc-redeem-button {
	margin-top: 8px;
}

/* Keep the existing checkout components in a single visual surface. */
body.woocommerce-checkout form.checkout .e-con:has(> .wd-order-table) {
	padding: clamp(14px, 2vw, 22px);
}

body.woocommerce-checkout form.checkout .wd-order-table > .elementor-widget-container,
body.woocommerce-checkout form.checkout #payment.woocommerce-checkout-payment {
	background-color: transparent;
	box-shadow: none;
}

body.woocommerce-checkout form.checkout .wd-order-table > .elementor-widget-container {
	padding: 0;
}

body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table .product-total .amount {
	white-space: nowrap;
}

body.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper > .form-row {
	margin-bottom: 12px;
}

body.woocommerce-checkout form.checkout textarea#order_comments {
	height: 112px;
	min-height: 112px;
}

/* Keep all three native steps visible in WoodMart's mobile page title. */
@media (max-width: 768.98px) {
	body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail {
		width: 96px;
		max-height: none;
		overflow: visible;
	}

	body.woocommerce-cart .woocommerce-cart-form tr.cart_item {
		box-sizing: border-box;
		display: flow-root;
		padding-inline-start: 112px;
	}

	body.woocommerce-cart .woocommerce-cart-form tr.cart_item td.product-thumbnail {
		float: left;
		position: static;
		margin-inline-start: -112px;
	}

	body:is(.woocommerce-cart, .woocommerce-checkout) .wd-checkout-steps {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 4px 8px;
		padding: 0;
	}

	body:is(.woocommerce-cart, .woocommerce-checkout) .wd-checkout-steps li {
		display: inline-flex;
		align-items: center;
		margin: 0;
		font-size: clamp(11px, 3.25vw, 14px);
	}

	body:is(.woocommerce-cart, .woocommerce-checkout) .wd-checkout-steps li:not(:last-child)::after {
		display: inline;
		margin-inline: 8px 0;
		content: "→";
	}
}
