:root {
	--commerceflow-mobile-bottom-offset: 0px;
}

/* Checkout layout: widen the main white content shell by 10% while keeping it centered.
 * Scoped to the active checkout only so cart, account and order-received pages are untouched. */
body.woocommerce-checkout:not(.woocommerce-order-received) {
	overflow-x: hidden;
}

body.woocommerce-checkout:not(.woocommerce-order-received) .main-page-wrapper > .container {
	width: 110% !important;
	max-width: 110% !important;
	margin-left: -5% !important;
	margin-right: -5% !important;
}


/* Compact checkout marketing consent. Keep this readable without allowing
 * theme typography to turn the optional SMS opt-in into a dominant heading. */
.woocommerce-checkout .ayesh-sms-consent {
	margin-top: 10px !important;
	margin-bottom: 14px !important;
}

.woocommerce-checkout .ayesh-sms-consent label,
.woocommerce-checkout .ayesh-sms-consent label span,
.woocommerce-checkout .ayesh-sms-consent .optional {
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

.woocommerce-checkout .ayesh-sms-consent label {
	color: #4b5563 !important;
}

.woocommerce-checkout .ayesh-sms-consent .optional {
	color: #6b7280 !important;
	font-weight: 400 !important;
}

.woocommerce-checkout .ayesh-sms-consent input[type="checkbox"] {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	margin: 2px 8px 0 0 !important;
	vertical-align: top !important;
}

@media (max-width: 768px) {
	/* Keep Woodmart's off-canvas cart above product and navigation toolbars. */
	.cart-widget-side,
	.wd-side-hidden.cart-widget-side,
	.woodmart-cart-side {
		z-index: 2147483000 !important;
		max-height: 100dvh !important;
	}

	.wd-close-side.wd-close-side-opened,
	.wd-close-side.wd-opened {
		z-index: 2147482990 !important;
	}

	.cart-widget-side .widget_shopping_cart_content,
	.cart-widget-side .shopping-cart-widget-body,
	.cart-widget-side .wd-scroll-content {
		max-height: 100dvh !important;
	}

	.cart-widget-side .shopping-cart-widget-footer,
	.cart-widget-side .widget_shopping_cart_content > .woocommerce-mini-cart__total,
	.cart-widget-side .widget_shopping_cart_content > .woocommerce-mini-cart__buttons {
		position: relative;
		z-index: 3;
	}

	.cart-widget-side .shopping-cart-widget-footer {
		padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
		background: #fff;
	}

	.cart-widget-side .woocommerce-mini-cart__buttons,
	.cart-widget-side .shopping-cart-widget-footer .woocommerce-mini-cart__buttons,
	.cart-widget-side .shopping-cart-widget-footer .buttons {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
		gap: 8px !important;
		width: 100% !important;
		margin: 10px 0 0 !important;
		padding: 0 !important;
	}

	.cart-widget-side .woocommerce-mini-cart__buttons > a,
	.cart-widget-side .shopping-cart-widget-footer .buttons > a {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 46px !important;
		margin: 0 !important;
		padding: 10px 8px !important;
		font-size: 12px !important;
		font-weight: 800 !important;
		line-height: 1.2 !important;
		text-align: center !important;
		white-space: normal !important;
	}

	.cart-widget-side .woocommerce-mini-cart__buttons .checkout,
	.cart-widget-side .shopping-cart-widget-footer .buttons .checkout {
		background: #c91524 !important;
		color: #fff !important;
	}

	/* Hide the fixed mobile toolbar only while the cart drawer is open. */
	body.commerceflow-mini-cart-open .commerceflow-mobile-fixed-bar {
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* Prevent the underlying WooCommerce notice action from appearing below the toolbar. */
	body.commerceflow-mini-cart-open .woocommerce-notices-wrapper .button.wc-forward,
	body.commerceflow-mini-cart-open .woocommerce-message .button.wc-forward {
		visibility: hidden !important;
		pointer-events: none !important;
	}
}


/* Professional checkout benefits / trust section.
 * The class is added dynamically only when the checkout page contains the
 * Authentic Products / Bangladesh Delivery / Secure Order block, so other
 * checkout components remain untouched. */
.woocommerce-checkout .commerceflow-checkout-benefits {
	margin: 18px 0 0 !important;
	background: #ffffff !important;
	border: 1px solid #e3ebe9 !important;
	border-radius: 18px !important;
	overflow: hidden !important;
	box-shadow: 0 12px 28px rgba(11, 93, 90, 0.06) !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-item {
	margin: 0 !important;
	padding: 18px 22px !important;
	background: linear-gradient(90deg, #f7fbfa 0%, #ffffff 35%) !important;
	border-bottom: 1px solid #edf2f1 !important;
	border-left: 4px solid #0b5d5a !important;
	text-align: left !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-item[data-benefit="delivery"] {
	border-left-color: #0f766e !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-item[data-benefit="secure"] {
	border-left-color: #e47a20 !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-item:last-child {
	border-bottom: 0 !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-item *,
.woocommerce-checkout .commerceflow-checkout-benefit-item {
	text-align: left !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-title {
	display: block !important;
	margin: 0 0 6px !important;
	color: #0b5d5a !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.28 !important;
	letter-spacing: -0.01em !important;
}

.woocommerce-checkout .commerceflow-checkout-benefit-description {
	display: block !important;
	margin: 0 !important;
	color: #6b7280 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
}

@media (max-width: 768px) {
	.woocommerce-checkout .commerceflow-checkout-benefits {
		margin-top: 14px !important;
		border-radius: 16px !important;
	}

	.woocommerce-checkout .commerceflow-checkout-benefit-item {
		padding: 16px 18px !important;
	}

	.woocommerce-checkout .commerceflow-checkout-benefit-title {
		font-size: 16px !important;
	}

	.woocommerce-checkout .commerceflow-checkout-benefit-description {
		font-size: 13px !important;
	}
}


/* Thank-you page: invoice action is intentionally reduced to one clean button. */
.woocommerce-order-received .commerceflow-invoice-download-only {
	margin: 18px 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.woocommerce-order-received .commerceflow-invoice-download-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	min-height: 46px !important;
	margin: 0 !important;
	text-decoration: none !important;
}

.woocommerce-order-received .commerceflow-invoice-download-icon {
	width: 17px !important;
	height: 17px !important;
	flex: 0 0 17px !important;
	fill: currentColor !important;
}

.woocommerce-order-received .commerceflow-invoice-download-button span {
	display: inline-block !important;
}

@media (max-width: 600px) {
	.woocommerce-order-received .commerceflow-invoice-download-button {
		width: 100% !important;
	}
}


/* Thank-you page: keep the invoice action immediately before Continue Shopping. */
.woocommerce-order-received .commerceflow-invoice-before-continue-shopping {
	margin: 14px 0 10px !important;
}

.woocommerce-order-received .commerceflow-invoice-before-continue-shopping + .return-to-shop,
.woocommerce-order-received .commerceflow-invoice-before-continue-shopping + p,
.woocommerce-order-received .commerceflow-invoice-before-continue-shopping + div {
	margin-top: 0 !important;
}


/* Cart totals cleanup: remove mobile responsive duplicate labels, enlarge the
 * delivery-address area and give the primary checkout action a clearer hierarchy. */
@media (max-width: 768px) {
	/* Woodmart/WooCommerce responsive tables can repeat the row label inside td
	 * via data-title/::before even though the th label is still visible. */
	body.woocommerce-cart .cart_totals table.shop_table_responsive tr td::before,
	body.woocommerce-cart .cart_totals table.shop_table_responsive tr td:before,
	body.woocommerce-cart .cart_totals table.shop_table tr td[data-title]::before,
	body.woocommerce-cart .cart_totals table.shop_table tr td[data-title]:before {
		display: none !important;
		content: none !important;
	}

	body.woocommerce-cart .cart_totals table.shop_table tr > th {
		width: 36% !important;
		padding-right: 10px !important;
		vertical-align: top !important;
	}

	body.woocommerce-cart .cart_totals table.shop_table tr > td {
		width: 64% !important;
		text-align: right !important;
	}

	/* Let the shipping destination breathe: fee stays aligned above, while the
	 * address card uses the full available content width beneath it. */
	body.woocommerce-cart .cart_totals .woocommerce-shipping-totals.shipping td,
	body.woocommerce-cart .cart_totals tr.shipping td {
		position: relative !important;
	}

	body.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
	body.woocommerce-cart .cart_totals .shipping-calculator-form,
	body.woocommerce-cart .cart_totals .shipping-calculator-button + .shipping-calculator-form {
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
		margin-top: 12px !important;
		padding: 15px 16px !important;
		border: 1px solid #dbe7e4 !important;
		border-radius: 14px !important;
		background: #f7fbfa !important;
		color: #3f4b4a !important;
		font-size: 13px !important;
		line-height: 1.55 !important;
		text-align: left !important;
	}

	body.woocommerce-cart .cart_totals .woocommerce-shipping-destination strong,
	body.woocommerce-cart .cart_totals .woocommerce-shipping-destination address {
		color: #273231 !important;
	}

	body.woocommerce-cart .cart_totals .shipping-calculator-button {
		display: inline-flex !important;
		align-items: center !important;
		gap: 7px !important;
		margin-top: 10px !important;
		color: #0b5d5a !important;
		font-size: 13px !important;
		font-weight: 700 !important;
		text-decoration: none !important;
	}

	/* Premium primary CTA: strong but clean Himalaya.bd hierarchy. */
	body.woocommerce-cart .wc-proceed-to-checkout {
		padding: 18px 0 2px !important;
	}

	body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
	body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
	body.woocommerce-cart a.checkout-button.button.alt {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 14px !important;
		width: 100% !important;
		min-height: 58px !important;
		box-sizing: border-box !important;
		margin: 0 !important;
		padding: 14px 16px 14px 20px !important;
		border: 1px solid #0b5d5a !important;
		border-radius: 14px !important;
		background: linear-gradient(135deg, #0b5d5a 0%, #08756f 100%) !important;
		box-shadow: 0 10px 22px rgba(11, 93, 90, 0.16) !important;
		color: #ffffff !important;
		font-size: 13px !important;
		font-weight: 800 !important;
		line-height: 1.2 !important;
		letter-spacing: 0.055em !important;
		text-align: left !important;
		text-transform: uppercase !important;
		text-decoration: none !important;
	}

	body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after,
	body.woocommerce-cart .wc-proceed-to-checkout .checkout-button::after,
	body.woocommerce-cart a.checkout-button.button.alt::after {
		content: '→' !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex: 0 0 34px !important;
		width: 34px !important;
		height: 34px !important;
		border-radius: 50% !important;
		background: rgba(255, 255, 255, 0.14) !important;
		color: #ffffff !important;
		font-size: 19px !important;
		font-weight: 500 !important;
		line-height: 1 !important;
		letter-spacing: 0 !important;
	}

	body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:active,
	body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:active {
		transform: translateY(1px) !important;
		box-shadow: 0 6px 14px rgba(11, 93, 90, 0.14) !important;
	}
}
