/**
 * Checkout / cart order-review layout fixes (WoodMart RTL + mobile).
 */

/* Readable product title + price */
.woocommerce-checkout-review-order-table .wd-checkout-prod,
.woocommerce-checkout-review-order-table .wd-checkout-prod-cont,
.woocommerce-cart-form .wd-checkout-prod {
	color: #242424;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-title > :is(.cart-product-label, .cart-product-label-link),
.woocommerce-checkout-review-order-table .wd-checkout-prod-title a {
	color: #1a1a1a !important;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.45;
	text-decoration: none !important;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-total,
.woocommerce-checkout-review-order-table .wd-checkout-prod-total .amount {
	color: #1a1a1a !important;
	font-weight: 700;
	font-size: 13px;
	white-space: nowrap;
}

/* Stable product row: image | content (never overlap) */
.woocommerce-checkout-review-order-table .cart_item td.wd-checkout-prod,
.woocommerce-checkout-review-order-table td.wd-checkout-prod {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 10px;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	padding-top: 14px !important;
	padding-bottom: 14px !important;
	overflow: hidden;
}

.woocommerce-checkout-review-order-table .wd-checkout-remove-btn-wrapp {
	flex: 0 0 24px !important;
	width: 24px !important;
	margin: 4px 0 0 !important;
	order: 0;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-img {
	flex: 0 0 64px !important;
	width: 64px !important;
	min-width: 64px !important;
	max-width: 64px !important;
	margin: 0 !important;
	order: 1;
	overflow: hidden;
	border-radius: 10px;
	background: #fff;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-img img {
	display: block !important;
	width: 64px !important;
	min-width: 64px !important;
	max-width: 64px !important;
	height: 64px !important;
	object-fit: contain !important;
	border-radius: 10px !important;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-cont {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	width: auto !important;
	gap: 8px;
	order: 2;
	text-align: start !important;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-title {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	overflow: hidden;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-title > :is(.cart-product-label, .cart-product-label-link) {
	display: -webkit-box !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden !important;
	margin: 0 0 8px !important;
	max-width: 100% !important;
	word-break: break-word;
	overflow-wrap: anywhere;
}

/* Quantity under title, clean controls */
.woocommerce-checkout-review-order-table .wd-checkout-prod-title .quantity,
.woocommerce-checkout-review-order-table .wd-checkout-prod-cont .quantity {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	width: auto !important;
	max-width: 100% !important;
	margin: 0 !important;
	order: 0 !important;
	position: relative !important;
	overflow: visible !important;
	white-space: nowrap !important;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fff;
}

.woocommerce-checkout-review-order-table .quantity .minus,
.woocommerce-checkout-review-order-table .quantity .plus {
	flex: 0 0 32px !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #242424 !important;
	font-size: 16px !important;
	line-height: 1 !important;
}

.woocommerce-checkout-review-order-table .quantity .qty {
	flex: 0 0 40px !important;
	width: 40px !important;
	min-width: 40px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-inline: 1px solid #e5e5e5 !important;
	background: #fff !important;
	color: #242424 !important;
	text-align: center !important;
	font-size: 13px !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}

.woocommerce-checkout-review-order-table .quantity .qty::-webkit-outer-spin-button,
.woocommerce-checkout-review-order-table .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Kill stuck/half spinner artifacts next to qty */
.woocommerce-checkout-review-order-table .quantity::before,
.woocommerce-checkout-review-order-table .quantity::after,
.woocommerce-checkout-review-order-table .quantity .blockUI,
.woocommerce-checkout-review-order-table .quantity .loader,
.woocommerce-checkout-review-order-table .quantity .wd-loader,
.woocommerce-checkout-review-order-table .wd-checkout-prod .blockOverlay,
.woocommerce-checkout-review-order-table .wd-checkout-prod .blockMsg {
	display: none !important;
	content: none !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.woocommerce-checkout-review-order-table .wd-checkout-prod-total {
	text-align: start !important;
	margin: 0 !important;
	width: 100% !important;
}

/* Header row */
.woocommerce-checkout-review-order-table thead th {
	color: #242424 !important;
	font-weight: 700;
}

@media (max-width: 576px) {
	.woocommerce-checkout-review-order-table .wd-checkout-prod-cont {
		display: flex !important;
		flex-direction: column !important;
	}

	.woocommerce-checkout-review-order-table .wd-checkout-prod-title {
		margin-bottom: 0 !important;
	}
}
