/**
 * My Custom Woo Features - cart page.
 *
 * Loaded on the cart page (and on the checkout for the steps) while the
 * "custom cart page" feature is on. Every colour, font and radius is a CSS
 * variable from the Design settings; see frontend.css for the defaults.
 *
 * Contents
 *  1. Checkout steps
 *  2. Layout
 *  3. Notices
 *  4. Free shipping bar
 *  5. Cart table
 *  6. Coupon and actions row
 *  7. Cart totals
 *  8. Cross-sells
 *  9. Empty cart
 * 10. Small screens
 */

/* -------------------------------------------------------------------------
 * 1. Checkout steps
 * ---------------------------------------------------------------------- */

.mcwf-steps {
	margin: 0 0 36px;
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
}

.mcwf-steps .mcwf-steps__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-steps .mcwf-steps__item {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	color: var(--mcwf-muted);
	font-size: 22px;
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

/* Arrow between two steps. */
.mcwf-steps .mcwf-steps__item + .mcwf-steps__item::before {
	content: "";
	flex: none;
	width: 22px;
	height: 14px;
	margin: 0 18px;
	background-color: var(--mcwf-muted);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 7h20M15 1l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 7h20M15 1l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

[dir="rtl"] .mcwf-steps .mcwf-steps__item + .mcwf-steps__item::before {
	transform: scaleX(-1);
}

.mcwf-steps .mcwf-steps__item > a,
.mcwf-steps .mcwf-steps__item > span {
	padding: 2px 0;
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	box-shadow: none;
	transition: color 0.2s, border-color 0.2s;
}

.mcwf-steps .mcwf-steps__item.is-done {
	color: var(--mcwf-title);
}

.mcwf-steps .mcwf-steps__item.is-current > span {
	color: var(--mcwf-title);
	border-bottom-color: var(--mcwf-primary);
}

.mcwf-steps .mcwf-steps__item > a:hover,
.mcwf-steps .mcwf-steps__item > a:focus {
	color: var(--mcwf-primary);
}

/* -------------------------------------------------------------------------
 * 2. Layout
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .mcwf-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 35%);
	align-items: start;
	gap: 30px 40px;
	margin: 0 0 50px;
	color: var(--mcwf-text);
	font-family: var(--mcwf-font, inherit);
	font-size: var(--mcwf-fs);
	line-height: 1.5;
}

/* Anything another plugin prints inside the wrapper takes a full row. */
.mcwf-cart-page .mcwf-cart > * {
	grid-column: 1 / -1;
	min-width: 0;
}

.mcwf-cart-page .mcwf-cart > form.woocommerce-cart-form {
	grid-column: 1;
	margin: 0;
}

.mcwf-cart-page .mcwf-cart > .cart-collaterals {
	grid-column: 2;
	float: none;
	width: auto;
	margin: 0;
}

.mcwf-cart-page .mcwf-cart > .cart-collaterals::before,
.mcwf-cart-page .mcwf-cart > .cart-collaterals::after {
	display: none;
}

@media (min-width: 1025px) {
	.mcwf-cart-page--sticky-totals .mcwf-cart > .cart-collaterals {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 20px);
	}
}

@media (max-width: 1024px) {
	.mcwf-cart-page .mcwf-cart {
		grid-template-columns: minmax(0, 1fr);
	}

	.mcwf-cart-page .mcwf-cart > .cart-collaterals {
		grid-column: 1;
	}
}

/* -------------------------------------------------------------------------
 * 3. Notices
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error {
	--_accent: var(--mcwf-primary);

	position: relative;
	margin: 0 0 24px;
	padding: 14px 18px 14px 50px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: var(--mcwf-fs);
	line-height: 1.5;
	list-style: none;
	background: var(--mcwf-light);
	border: 0;
	border-inline-start: 3px solid var(--_accent);
	border-radius: var(--mcwf-panel-radius);
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info {
	--_accent: var(--mcwf-title);
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error {
	--_accent: var(--mcwf-danger);
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message::before,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info::before,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error::before {
	top: 14px;
	left: 18px;
	color: var(--_accent);
	line-height: 1.5;
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message a:not(.button),
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info a:not(.button),
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error a:not(.button) {
	color: var(--mcwf-title);
	font-weight: 600;
	text-decoration: underline;
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message a:not(.button):hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info a:not(.button):hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error a:not(.button):hover {
	color: var(--mcwf-primary);
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message:focus-visible,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info:focus-visible,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error:focus-visible {
	outline: 2px solid var(--_accent);
	outline-offset: 2px;
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message .button,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info .button,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error .button,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message .button:hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info .button:hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error .button:hover {
	float: right;
	float: inline-end;
	margin: -3px 0 -3px 14px;
	padding: 5px 14px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: calc(var(--mcwf-btn-fs) - 1px);
	font-weight: var(--mcwf-btn-fw);
	line-height: 18px;
	text-decoration: none;
	text-transform: var(--mcwf-btn-tt);
	background: var(--mcwf-surface);
	border: 1px solid var(--mcwf-border);
	border-radius: var(--mcwf-btn-radius);
	box-shadow: none;
}

.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-message .button:hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-info .button:hover,
.mcwf-cart-page .woocommerce-notices-wrapper .woocommerce-error .button:hover {
	border-color: var(--mcwf-title);
}

/* -------------------------------------------------------------------------
 * 4. Free shipping bar
 * ---------------------------------------------------------------------- */

.mcwf-shipping-bar {
	margin: 0 0 26px;
	padding: 16px 20px 18px;
	border: 2px dashed var(--mcwf-border);
	border-radius: var(--mcwf-panel-radius);
}

.mcwf-shipping-bar .mcwf-shipping-bar__text {
	margin: 0 0 12px;
	padding: 0;
	color: var(--mcwf-title);
	font-size: var(--mcwf-fs);
	line-height: 1.5;
}

.mcwf-shipping-bar .mcwf-shipping-bar__text strong,
.mcwf-shipping-bar .mcwf-shipping-bar__text .amount {
	color: var(--mcwf-primary);
	font-weight: 600;
}

.mcwf-shipping-bar.is-complete .mcwf-shipping-bar__text {
	color: var(--mcwf-primary);
	font-weight: 600;
}

.mcwf-shipping-bar__track {
	height: 8px;
	overflow: hidden;
	background: var(--mcwf-light);
	border-radius: 99px;
}

.mcwf-shipping-bar__fill {
	display: block;
	min-width: 8px;
	height: 100%;
	background-color: var(--mcwf-primary);
	background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.22) 75%, transparent 75%);
	background-size: 16px 16px;
	border-radius: inherit;
	transition: width 0.4s;
}

/* -------------------------------------------------------------------------
 * 5. Cart table
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .mcwf-cart table.shop_table {
	width: 100%;
	margin: 0;
	color: inherit;
	font-size: inherit;
	text-align: start;
	background: none;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	border-radius: 0;
}

.mcwf-cart-page .mcwf-cart table.shop_table tr th,
.mcwf-cart-page .mcwf-cart table.shop_table tr td {
	padding: 16px 12px;
	color: inherit;
	font-size: inherit;
	font-weight: 400;
	line-height: 1.5;
	text-align: start;
	vertical-align: middle;
	background: none !important;
	border: 0;
	border-bottom: 1px solid var(--mcwf-border);
}

.mcwf-cart-page .mcwf-cart table.cart thead tr th {
	padding-top: 0;
	padding-bottom: 14px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: calc(var(--mcwf-fs) + 1px);
	font-weight: var(--mcwf-heading-fw);
	letter-spacing: 0.3px;
	text-transform: uppercase;
	white-space: nowrap;
	border-bottom-width: 2px;
}

/* Remove link */

.mcwf-cart-page .mcwf-cart table.cart tr .product-remove {
	width: 30px;
	padding-inline: 0;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-remove a.remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: var(--mcwf-muted) !important;
	font-size: 24px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	background: none !important;
	border: 0;
	border-radius: 50%;
	transition: color 0.2s;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-remove a.remove:hover,
.mcwf-cart-page .mcwf-cart table.cart td.product-remove a.remove:focus {
	color: var(--mcwf-danger) !important;
}

/* Thumbnail */

.mcwf-cart-page .mcwf-cart table.cart tr .product-thumbnail {
	width: 104px;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-thumbnail a {
	display: block;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-thumbnail img {
	display: block;
	width: 80px;
	max-width: none;
	height: auto;
	margin: 0;
	border-radius: var(--mcwf-input-radius);
	box-shadow: none;
}

/* Name and options */

.mcwf-cart-page .mcwf-cart table.cart td.product-name {
	color: var(--mcwf-title);
	font-size: var(--mcwf-title-fs);
	font-weight: 600;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name a {
	color: var(--mcwf-title);
	font-weight: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name a:hover,
.mcwf-cart-page .mcwf-cart table.cart td.product-name a:focus {
	color: var(--mcwf-primary);
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name dl.variation {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 2px 6px;
	margin: 6px 0 0;
	color: var(--mcwf-text);
	font-size: calc(var(--mcwf-fs) - 1px);
	font-weight: 400;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name dl.variation dt,
.mcwf-cart-page .mcwf-cart table.cart td.product-name dl.variation dd {
	float: none;
	margin: 0;
	padding: 0;
	font-weight: 400;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name dl.variation dd {
	color: var(--mcwf-title);
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name dl.variation p {
	margin: 0;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-name .backorder_notification {
	margin: 6px 0 0;
	color: var(--mcwf-text);
	font-size: calc(var(--mcwf-fs) - 1px);
	font-weight: 400;
}

/* Price and subtotal */

.mcwf-cart-page .mcwf-cart table.cart td.product-price {
	color: var(--mcwf-text);
	white-space: nowrap;
}

.mcwf-cart-page .mcwf-cart table.cart tr .product-subtotal {
	text-align: end;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-subtotal {
	color: var(--mcwf-price, var(--mcwf-primary));
	font-size: calc(var(--mcwf-fs) + 1px);
	font-weight: 600;
	white-space: nowrap;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-price .amount,
.mcwf-cart-page .mcwf-cart table.cart td.product-subtotal .amount {
	color: inherit;
	font-weight: inherit;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-subtotal small {
	display: block;
	color: var(--mcwf-text);
	font-size: 12px;
	font-weight: 400;
}

/* Quantity */

.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity {
	display: inline-flex;
	align-items: stretch;
	float: none;
	height: 40px;
	margin: 0;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity input.qty {
	width: 46px !important;
	min-width: 0;
	height: 100% !important;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	background: var(--mcwf-surface) !important;
	border: 1px solid var(--mcwf-border) !important;
	border-radius: var(--mcwf-input-radius) !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity input.qty::-webkit-outer-spin-button,
.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* With plus / minus buttons the input sits between them. */
.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity .mcwf-qty__btn ~ input.qty {
	border-width: 1px 0 !important;
	border-radius: 0 !important;
}

/* -------------------------------------------------------------------------
 * 6. Coupon and actions row
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .mcwf-cart table.cart tr td.actions {
	padding: 24px 0 0;
	text-align: end;
	border-bottom: 0;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions::after {
	content: "";
	display: block;
	clear: both;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	float: left;
	float: inline-start;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon::before,
.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon::after {
	display: none !important;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .input-text {
	float: none !important;
	width: 200px !important;
	height: 42px;
	margin: 0;
	padding: 0 15px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: var(--mcwf-fs);
	line-height: 1.2;
	background: var(--mcwf-surface);
	border: 1px solid var(--mcwf-border);
	border-radius: var(--mcwf-input-radius);
	box-shadow: none;
	outline: 0;
	transition: border-color 0.2s;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .input-text:focus {
	border-color: var(--mcwf-title);
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .input-text::placeholder {
	color: var(--mcwf-muted);
	opacity: 1;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .coupon-error-notice {
	flex: 0 0 100%;
	float: none !important;
	width: auto !important;
	margin: 0;
	color: var(--mcwf-danger);
	font-size: 12px;
	text-align: start;
}

/* Secondary buttons: Apply coupon, Update cart, shipping calculator. */
.mcwf-cart-page .mcwf-cart table.cart td.actions .button,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:hover,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:focus,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:disabled,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:disabled[disabled],
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .button,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .button:hover,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .button:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: none !important;
	width: auto !important;
	min-height: 42px;
	margin: 0;
	padding: 5px 20px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: var(--mcwf-btn-fs);
	font-weight: var(--mcwf-btn-fw);
	line-height: 18px;
	letter-spacing: 0.3px;
	text-decoration: none;
	text-transform: var(--mcwf-btn-tt);
	white-space: nowrap;
	background-color: var(--mcwf-light);
	background-image: none;
	border: 0;
	border-radius: var(--mcwf-btn-radius);
	box-shadow: none;
	cursor: pointer;
	transition: box-shadow 0.2s, opacity 0.2s;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .button:hover,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:focus,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .button:hover,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .button:focus {
	box-shadow: inset 0 0 0 200px rgba(0, 0, 0, 0.07);
}

.mcwf-cart-page .mcwf-cart table.cart td.actions .button:disabled,
.mcwf-cart-page .mcwf-cart table.cart td.actions .button:disabled[disabled] {
	padding: 5px 20px;
	box-shadow: none;
	opacity: 0.5;
	cursor: not-allowed;
}

.mcwf-cart-page .mcwf-cart table.cart td.actions > .button[name="update_cart"] {
	float: right !important;
	float: inline-end !important;
	margin-inline-start: 20px;
}

/* The cart updates by itself, so the button is only needed without JavaScript. */
html.mcwf-js .mcwf-cart-page--auto-update .mcwf-cart table.cart td.actions > .button[name="update_cart"] {
	display: none !important;
}

.mcwf-cart-page .mcwf-cart .mcwf-cart__continue {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: var(--mcwf-btn-fs);
	font-weight: var(--mcwf-btn-fw);
	line-height: 18px;
	letter-spacing: 0.3px;
	text-decoration: none;
	text-transform: var(--mcwf-btn-tt);
	transition: color 0.2s;
}

.mcwf-cart-page .mcwf-cart .mcwf-cart__continue:hover,
.mcwf-cart-page .mcwf-cart .mcwf-cart__continue:focus {
	color: var(--mcwf-primary);
}

.mcwf-cart-page .mcwf-cart .mcwf-cart__continue .mcwf-icon {
	width: 16px;
	height: 16px;
	transform: scaleX(-1);
	transition: transform 0.2s;
}

.mcwf-cart-page .mcwf-cart .mcwf-cart__continue:hover .mcwf-icon {
	transform: scaleX(-1) translateX(3px);
}

[dir="rtl"] .mcwf-cart-page .mcwf-cart .mcwf-cart__continue .mcwf-icon {
	transform: none;
}

/* -------------------------------------------------------------------------
 * 7. Cart totals
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .mcwf-cart .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	margin: 0;
	padding: 26px 28px 28px;
	background: var(--mcwf-surface);
	border: 2px solid var(--mcwf-border);
	border-radius: var(--mcwf-panel-radius);
}

.mcwf-cart-page .mcwf-cart .cart_totals > h2 {
	margin: 0 0 10px;
	padding: 0;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: 20px;
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr th,
.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr td {
	padding: 14px 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr th {
	width: 36%;
	padding-inline-end: 14px;
	color: var(--mcwf-title);
	font-weight: 600;
	vertical-align: top;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr td {
	text-align: end !important;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table .amount {
	color: var(--mcwf-title);
	font-weight: 600;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.cart-discount td,
.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.cart-discount td .amount {
	color: var(--mcwf-primary);
}

.mcwf-cart-page .mcwf-cart .cart_totals a {
	color: var(--mcwf-title);
	text-decoration: underline;
	transition: color 0.2s;
}

.mcwf-cart-page .mcwf-cart .cart_totals a:hover,
.mcwf-cart-page .mcwf-cart .cart_totals a:focus {
	color: var(--mcwf-primary);
}

.mcwf-cart-page .mcwf-cart .cart_totals a.woocommerce-remove-coupon {
	margin-inline-start: 4px;
	color: var(--mcwf-muted);
	font-size: calc(var(--mcwf-fs) - 1px);
}

.mcwf-cart-page .mcwf-cart .cart_totals a.woocommerce-remove-coupon:hover {
	color: var(--mcwf-danger);
}

/* Shipping */

.mcwf-cart-page .mcwf-cart .cart_totals ul#shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcwf-cart-page .mcwf-cart .cart_totals ul#shipping_method li {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 8px;
	margin: 0 0 8px;
	padding: 0;
	text-indent: 0;
	line-height: 1.4;
}

.mcwf-cart-page .mcwf-cart .cart_totals ul#shipping_method li input {
	flex: none;
	order: 2;
	margin: 0;
	accent-color: var(--mcwf-primary);
}

.mcwf-cart-page .mcwf-cart .cart_totals ul#shipping_method li label {
	display: inline;
	margin: 0;
	color: var(--mcwf-text);
	font-weight: 400;
	cursor: pointer;
}

.mcwf-cart-page .mcwf-cart .cart_totals ul#shipping_method li input:checked + label {
	color: var(--mcwf-title);
}

.mcwf-cart-page .mcwf-cart .cart_totals .woocommerce-shipping-destination {
	margin: 6px 0 0;
	color: var(--mcwf-text);
	font-size: calc(var(--mcwf-fs) - 1px);
}

.mcwf-cart-page .mcwf-cart .cart_totals .woocommerce-shipping-calculator {
	margin: 6px 0 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-button {
	display: inline-block;
	margin: 0;
	font-size: calc(var(--mcwf-fs) - 1px);
	font-weight: 600;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-button::after {
	display: none;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form {
	margin: 12px 0 0;
	text-align: start;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .form-row {
	float: none;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .input-text,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form select,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .select2-container .select2-selection--single {
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 15px;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font, inherit);
	font-size: var(--mcwf-fs);
	background-color: var(--mcwf-surface);
	border: 1px solid var(--mcwf-border);
	border-radius: var(--mcwf-input-radius);
	box-shadow: none;
	outline: 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .select2-container .select2-selection--single {
	padding: 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .select2-container .select2-selection__rendered {
	padding: 0 34px 0 15px;
	color: var(--mcwf-title);
	line-height: 40px;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .select2-container .select2-selection__arrow {
	top: 0;
	right: 8px;
	height: 40px;
}

.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form .input-text:focus,
.mcwf-cart-page .mcwf-cart .cart_totals .shipping-calculator-form select:focus {
	border-color: var(--mcwf-title);
}

/* Total */

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total th,
.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total td {
	padding-bottom: 4px;
	vertical-align: middle;
	border-bottom: 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total th {
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: calc(var(--mcwf-fs) + 2px);
	font-weight: var(--mcwf-heading-fw);
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total td strong .amount {
	color: var(--mcwf-price, var(--mcwf-primary));
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total td small {
	display: block;
	color: var(--mcwf-text);
	font-size: 12px;
}

.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr.order-total td small .amount {
	color: inherit;
	font-weight: 400;
}

/* Proceed to checkout */

.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout {
	margin: 0;
	padding: 20px 0 0;
}

.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button,
.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:hover,
.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:focus,
.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:visited {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 20px;
	color: var(--mcwf-primary-text);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: calc(var(--mcwf-btn-fs) + 1px);
	font-weight: var(--mcwf-btn-fw);
	line-height: 20px;
	letter-spacing: 0.3px;
	text-align: center;
	text-decoration: none;
	text-transform: var(--mcwf-btn-tt);
	background-color: var(--mcwf-primary);
	background-image: none;
	border: 0;
	border-radius: var(--mcwf-btn-radius);
	box-shadow: none;
	transition: box-shadow 0.2s;
}

.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:hover,
.mcwf-cart-page .mcwf-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:focus {
	box-shadow: inset 0 0 0 200px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------------------------------
 * 8. Cross-sells
 * ---------------------------------------------------------------------- */

.mcwf-cart-page .woocommerce > .cross-sells {
	float: none;
	width: auto;
	margin: 0 0 40px;
	padding-top: 36px;
	border-top: 1px solid var(--mcwf-border);
	clear: both;
}

.mcwf-cart-page .woocommerce > .cross-sells > h2 {
	margin: 0 0 24px;
	padding: 0;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: 22px;
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

/* -------------------------------------------------------------------------
 * 9. Empty cart
 * ---------------------------------------------------------------------- */

/*
 * WooCommerce prints the message inside .wc-empty-cart-message, and moves it
 * to the notices when the last product is removed without a page load.
 */
.mcwf-cart-page .wc-empty-cart-message .cart-empty,
.mcwf-cart-page .woocommerce-notices-wrapper .cart-empty.woocommerce-info {
	position: static;
	margin: 30px 0 14px;
	padding: 0;
	color: var(--mcwf-title);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: 28px;
	font-weight: var(--mcwf-heading-fw);
	line-height: 1.3;
	text-align: center;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	outline: 0;
}

.mcwf-cart-page .wc-empty-cart-message .cart-empty::before,
.mcwf-cart-page .woocommerce-notices-wrapper .cart-empty.woocommerce-info::before {
	content: "";
	position: static;
	display: block;
	width: 130px;
	height: 130px;
	margin: 0 auto 22px;
	background-color: var(--mcwf-border);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9h8l7 32h29l6-22H17'/%3E%3Ccircle cx='24' cy='51' r='4'/%3E%3Ccircle cx='46' cy='51' r='4'/%3E%3Cpath d='M30 25l10 10M40 25L30 35'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9h8l7 32h29l6-22H17'/%3E%3Ccircle cx='24' cy='51' r='4'/%3E%3Ccircle cx='46' cy='51' r='4'/%3E%3Cpath d='M30 25l10 10M40 25L30 35'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mcwf-cart-page .wc-empty-cart-message:empty {
	display: none;
}

.mcwf-cart-page .woocommerce > .return-to-shop {
	margin: 0 0 60px;
	text-align: center;
}

.mcwf-cart-page .woocommerce > .return-to-shop a.button,
.mcwf-cart-page .woocommerce > .return-to-shop a.button:hover,
.mcwf-cart-page .woocommerce > .return-to-shop a.button:focus,
.mcwf-cart-page .woocommerce > .return-to-shop a.button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 8px 28px;
	color: var(--mcwf-primary-text);
	font-family: var(--mcwf-font-heading, var(--mcwf-font, inherit));
	font-size: var(--mcwf-btn-fs);
	font-weight: var(--mcwf-btn-fw);
	line-height: 18px;
	letter-spacing: 0.3px;
	text-decoration: none;
	text-transform: var(--mcwf-btn-tt);
	background-color: var(--mcwf-primary);
	background-image: none;
	border: 0;
	border-radius: var(--mcwf-btn-radius);
	box-shadow: none;
	transition: box-shadow 0.2s;
}

.mcwf-cart-page .woocommerce > .return-to-shop a.button:hover,
.mcwf-cart-page .woocommerce > .return-to-shop a.button:focus {
	box-shadow: inset 0 0 0 200px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------------------------------
 * 10. Small screens
 *
 * WooCommerce turns the cart table into stacked label / value lines at 768px
 * and hides the product image. Here each product becomes a small card with
 * its image instead, and the totals stay a two-column table.
 * ---------------------------------------------------------------------- */

@media (max-width: 768px) {
	.mcwf-steps {
		margin-bottom: 24px;
	}

	.mcwf-steps .mcwf-steps__item {
		font-size: 12px;
		letter-spacing: 0;
	}

	.mcwf-steps .mcwf-steps__item + .mcwf-steps__item::before {
		width: 12px;
		height: 9px;
		margin: 0 7px;
	}

	.mcwf-cart-page .mcwf-cart {
		margin-bottom: 36px;
	}

	.mcwf-cart-page .mcwf-cart table.cart,
	.mcwf-cart-page .mcwf-cart table.cart tbody {
		display: block;
	}

	.mcwf-cart-page .mcwf-cart table.cart thead {
		display: none;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item {
		position: relative;
		display: grid;
		grid-template-columns: 80px minmax(0, 1fr) auto;
		align-items: center;
		gap: 6px 14px;
		padding: 16px 0;
		border-bottom: 1px solid var(--mcwf-border);
	}

	.mcwf-cart-page .mcwf-cart table.cart tbody tr.cart_item:first-child {
		padding-top: 0;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td {
		display: block;
		width: auto;
		padding: 0;
		text-align: start !important;
		border: 0;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr td::before {
		display: none;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-thumbnail {
		display: block !important;
		grid-row: 1 / span 3;
		grid-column: 1;
		align-self: start;
		width: 80px;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-name {
		grid-row: 1;
		grid-column: 2 / -1;
		padding-inline-end: 34px;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-price {
		grid-row: 2;
		grid-column: 2 / -1;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-quantity {
		grid-row: 3;
		grid-column: 2;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-subtotal {
		grid-row: 3;
		grid-column: 3;
		text-align: end !important;
	}

	.mcwf-cart-page .mcwf-cart table.cart tr.cart_item td.product-remove {
		position: absolute;
		top: 12px;
		inset-inline-end: -4px;
		width: auto;
	}

	.mcwf-cart-page .mcwf-cart table.cart tbody tr.cart_item:first-child td.product-remove {
		top: -4px;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity {
		height: 36px;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.product-quantity div.quantity input.qty {
		width: 40px !important;
	}

	/* Coupon and actions */

	.mcwf-cart-page .mcwf-cart table.cart tr td.actions {
		display: block;
		padding: 20px 0 0;
		text-align: center !important;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon {
		flex-wrap: nowrap;
		float: none !important;
		width: 100%;
		padding: 0 !important;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .input-text {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon .button {
		flex: none;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.actions .coupon:has(.coupon-error-notice) {
		flex-wrap: wrap;
	}

	.mcwf-cart-page .mcwf-cart table.cart td.actions > .button[name="update_cart"] {
		display: flex;
		float: none !important;
		width: 100% !important;
		margin: 10px 0 0;
	}

	.mcwf-cart-page .mcwf-cart .mcwf-cart__continue {
		margin-top: 12px;
	}

	/* Totals */

	.mcwf-cart-page .mcwf-cart .cart-collaterals .cart_totals {
		padding: 20px 18px 22px;
	}

	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table {
		display: table;
	}

	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tbody {
		display: table-row-group;
	}

	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr {
		display: table-row;
	}

	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tbody tr th,
	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tbody tr td {
		display: table-cell;
	}

	.mcwf-cart-page .mcwf-cart .cart_totals table.shop_table tr td::before {
		display: none;
	}

	.mcwf-cart-page .wc-empty-cart-message .cart-empty,
	.mcwf-cart-page .woocommerce-notices-wrapper .cart-empty.woocommerce-info {
		font-size: 22px;
	}

	.mcwf-cart-page .wc-empty-cart-message .cart-empty::before,
	.mcwf-cart-page .woocommerce-notices-wrapper .cart-empty.woocommerce-info::before {
		width: 100px;
		height: 100px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mcwf-shipping-bar__fill,
	.mcwf-cart-page .mcwf-cart .mcwf-cart__continue .mcwf-icon {
		transition: none;
	}
}
