/* Bambu cart page — Cart Block presentation only. */
body.woocommerce-cart {
	--bambu-cart-green: #00ae42;
	--bambu-cart-surface: #fff;
	--bambu-cart-page: #f5f5f5;
	--bambu-cart-border: #e4e4e4;
	--bambu-cart-muted: #8a8a8a;
	--bambu-summary-height: 150px;
	background: var(--bambu-cart-page);
}

body.woocommerce-cart .page-wrapper,
body.woocommerce-cart .template-container,
body.woocommerce-cart .template-content {
	background: var(--bambu-cart-page);
}

body.woocommerce-cart .page-sidebar,
body.woocommerce-cart #sidebar,
body.woocommerce-cart .content-page > .row > .sidebar,
body.woocommerce-cart .content-page .sidebar-position-right > .row > .sidebar,
body.woocommerce-cart .wc-block-cart__sidebar {
	display: none;
}

/* Reuse XStore's checkout progress component; only the active cart step is green. */
body.woocommerce-cart .cart-checkout-nav .active {
	color: #202020;
}

body.woocommerce-cart .cart-checkout-nav .active::before,
body.woocommerce-cart.cart-checkout-light-header .cart-checkout-nav .active::before {
	color: #fff;
	background: var(--bambu-cart-green);
	border-color: var(--bambu-cart-green);
}

body.woocommerce-cart .cart-checkout-nav a:not(:last-of-type)::after {
	border-bottom-color: #d7d7d7;
}

body.woocommerce-cart .container.content-page {
	width: min(1200px, calc(100% - 40px));
	max-width: 1200px;
	padding-top: 54px;
	padding-bottom: var(--bambu-summary-height);
}

body.woocommerce-cart.bambu-cart-page--empty .container.content-page {
	padding-bottom: 0;
}

body.woocommerce-cart .content-page > .row {
	margin-right: 0;
	margin-left: 0;
}

body.woocommerce-cart .content-page .content.col-md-9,
body.woocommerce-cart .content-page .content {
	width: 100%;
	max-width: 100%;
	flex: 0 0 100%;
	padding-right: 0;
	padding-left: 0;
}

body.woocommerce-cart .wp-block-woocommerce-cart {
	max-width: none;
	margin: 0;
}

body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-components-sidebar-layout,
body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-cart__main {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
}

.bambu-cart-login {
	margin: 0 0 48px;
	text-align: center;
	font-size: 13px;
}

.bambu-cart-login a {
	margin-left: 8px;
	color: var(--bambu-cart-green);
	font-weight: 500;
}

.bambu-cart-select-all {
	margin-bottom: 16px;
	padding: 0 16px;
}

.bambu-cart-select-all label,
.bambu-cart-row-select label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	cursor: pointer;
}

.bambu-cart-checkbox {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--bambu-cart-green);
	cursor: pointer;
}

body.woocommerce-cart table.wc-block-cart-items,
body.woocommerce-cart table.wc-block-cart-items tbody {
	display: block;
	width: 100%;
	margin: 0;
}

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

body.woocommerce-cart table.wc-block-cart-items tbody {
	display: grid;
	gap: 16px;
}

body.woocommerce-cart table.wc-block-cart-items tr.wc-block-cart-items__row {
	position: relative;
	display: grid;
	grid-template-columns: 30px 100px minmax(240px, 1fr) 150px;
	align-items: center;
	min-height: 124px;
	padding: 12px 220px 12px 16px;
	background: var(--bambu-cart-surface);
	border: 0;
}

body.woocommerce-cart table.wc-block-cart-items td {
	position: static;
	padding: 0;
	border: 0;
}

.bambu-cart-row-select {
	display: flex;
	align-items: center;
}

body.woocommerce-cart .wc-block-cart-item__image {
	width: 100px;
}

body.woocommerce-cart .wc-block-cart-item__image img {
	display: block;
	width: 100px;
	height: 100px;
	object-fit: contain;
	background: #f8f8f8;
}

body.woocommerce-cart .wc-block-cart-item__product {
	padding: 0 24px !important;
}

body.woocommerce-cart .wc-block-components-product-name {
	display: inline-block;
	margin-bottom: 3px;
	color: #111;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

body.woocommerce-cart .wc-block-cart-item__prices {
	display: none;
}

body.woocommerce-cart .wc-block-components-product-details {
	margin: 0;
	color: #555;
	font-size: 12px;
	line-height: 1.45;
}

body.woocommerce-cart .wc-block-components-product-details li {
	margin: 0;
}

body.woocommerce-cart .wc-block-components-product-metadata__description,
body.woocommerce-cart .wc-block-components-product-badge {
	display: none;
}

body.woocommerce-cart .wc-block-cart-item__total {
	text-align: center;
}

body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
	display: block;
}

body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price {
	color: #111;
	font-size: 16px;
	font-weight: 600;
}

body.woocommerce-cart .wc-block-cart-item__quantity {
	position: absolute;
	top: 50%;
	right: 18px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 26px;
	width: 180px;
	margin: 0;
	transform: translateY(-50%);
}

body.woocommerce-cart .wc-block-components-quantity-selector {
	display: grid;
	grid-template-columns: repeat(3, 34px);
	align-items: stretch;
	width: 104px;
	height: 34px;
	margin: 0;
	border-color: #cfcfcf;
	border-radius: 3px;
	box-sizing: border-box;
	overflow: hidden;
}

body.woocommerce-cart .wc-block-components-quantity-selector input,
body.woocommerce-cart .wc-block-components-quantity-selector button {
	width: 34px;
	min-width: 34px;
	max-width: 34px;
	height: 32px;
	min-height: 32px;
	max-height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-sizing: border-box;
	color: #555;
	background: transparent;
	font-size: 14px;
	font-family: inherit;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
}

body.woocommerce-cart .wc-block-components-quantity-selector button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
}

body.woocommerce-cart .wc-block-components-quantity-selector input {
	padding: 0 !important;
	border-right: 1px solid #e1e1e1;
	border-left: 1px solid #e1e1e1;
	text-align: center;
	line-height: 32px;
	appearance: textfield;
	-moz-appearance: textfield;
}

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

body.woocommerce-cart .wc-block-cart-items__row.bambu-cart-row--updating .wc-block-components-quantity-selector {
	border-color: #a9a9a9;
}

body.woocommerce-cart .wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 32px;
	padding: 0;
	color: #999;
	font-size: 0;
	text-decoration: none;
}

body.woocommerce-cart .wc-block-cart-item__remove-link svg {
	width: 18px;
	height: 18px;
}

.bambu-cart-recommendations {
	width: min(1200px, calc(100% - 40px));
	max-width: 1200px;
	margin: 32px auto 70px;
}

.bambu-cart-recommendations[hidden],
.bambu-cart-summary[hidden],
.bambu-cart-empty[hidden] {
	display: none !important;
}

@media (max-width: 1024px) {
	.bambu-cart-recommendations {
		margin-bottom: 52px;
	}
}

.bambu-cart-recommendations h2 {
	margin: 0 0 24px;
	text-align: center;
	font-size: 20px;
	font-weight: 600;
}

.bambu-cart-recommendations__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

.bambu-cart-product-card {
	min-width: 0;
	background: #fff;
}

.bambu-cart-product-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f5;
}

.bambu-cart-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bambu-cart-product-card__body {
	position: relative;
	min-height: 90px;
	padding: 10px 42px 12px 10px;
}

.bambu-cart-product-card__title {
	display: -webkit-box;
	overflow: hidden;
	color: #111;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.bambu-cart-product-card__price {
	margin-top: 5px;
	color: #ff3b00;
	font-size: 14px;
	font-weight: 600;
}

.bambu-cart-product-card__price del {
	color: #999;
	font-size: 12px;
}

.bambu-cart-product-card__action {
	position: absolute;
	right: 9px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #111;
	background: #f4f4f4;
	border-radius: 3px;
}

.bambu-cart-product-card__action svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.bambu-cart-summary {
	position: fixed;
	z-index: 9990;
	right: 0;
	bottom: var(--bambu-summary-offset, 0px);
	left: 0;
	padding: 17px 0;
	background: rgba(255, 255, 255, .98);
	border-top: 1px solid #ddd;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, .025);
}

.bambu-cart-summary::after {
	position: absolute;
	right: 50%;
	bottom: -1px;
	width: min(1200px, calc(100% - 40px));
	border-bottom: 1px solid transparent;
	content: '';
	transform: translateX(50%);
}

.bambu-cart-summary.bambu-cart-summary--at-footer::after {
	border-bottom-color: #d8d8d8;
}

.bambu-cart-summary__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: min(1200px, calc(100% - 40px));
	margin: 0 auto;
}

.bambu-cart-summary__coupon {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 2px;
}

.bambu-cart-summary__coupon strong {
	font-size: 14px;
	font-weight: 600;
}

.bambu-cart-summary__coupon span,
.bambu-cart-summary__totals small {
	color: var(--bambu-cart-muted);
	font-size: 12px;
}

.bambu-cart-summary__totals {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	min-width: 310px;
}

.bambu-cart-summary__totals > strong {
	color: #111;
	font-size: 18px;
	font-weight: 600;
}

.bambu-cart-summary__totals small {
	line-height: 1.45;
}

.bambu-cart-checkout {
	width: 250px;
	height: 40px;
	margin-top: 12px;
	color: #fff;
	background: var(--bambu-cart-green);
	border: 0;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.bambu-cart-checkout:hover,
.bambu-cart-checkout:focus {
	color: #fff;
	background: #009e3c;
}

.bambu-cart-checkout:disabled {
	cursor: not-allowed;
	color: #fff;
	background: #78d59b;
	opacity: 1;
}

.bambu-cart-checkout.is-processing,
.bambu-cart-checkout.is-processing:disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #fff;
	background: var(--bambu-cart-green);
	cursor: wait;
	opacity: 1;
}

.bambu-cart-checkout__spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	box-sizing: border-box;
	animation: bambu-cart-checkout-spin .7s linear infinite;
}

@keyframes bambu-cart-checkout-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bambu-cart-checkout__spinner {
		animation-duration: 1.4s;
	}
}

.bambu-cart-summary__status {
	min-height: 16px;
	margin-top: 3px;
	color: #bf1e2e;
	font-size: 11px;
}

.bambu-cart-summary__status.is-updating {
	color: var(--bambu-cart-muted);
}

[data-bambu-selected-total].is-updating::after {
	margin-left: 6px;
	color: var(--bambu-cart-muted);
	font-size: 11px;
	font-weight: 400;
	content: 'Updating…';
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	margin: 0;
	padding: 0;
	background: transparent;
	text-align: center;
}

.bambu-cart-empty {
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
	min-height: 340px;
	padding: 34px 20px 72px;
	text-align: center;
}

.bambu-cart-empty__icon {
	width: 96px;
	height: 96px;
	margin-bottom: 18px;
	fill: #e8e8e8;
	stroke: #f5f5f5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 5;
}

.bambu-cart-empty__icon .bambu-cart-empty__cart {
	fill: none;
	stroke: #a7a7a7;
	stroke-width: 3;
}

.bambu-cart-empty h1,
.bambu-cart-empty p {
	margin: 0;
	color: #262626;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.bambu-cart-empty__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 186px;
	height: 42px;
	margin-top: 17px;
	padding: 0 24px;
	color: #fff;
	background: #1f1f1f;
	border: 1px solid #1f1f1f;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
}

.bambu-cart-empty__button:hover,
.bambu-cart-empty__button:focus {
	color: #fff;
	background: #000;
	border-color: #000;
}

@media (max-width: 767px) {
	body.woocommerce-cart {
		--bambu-summary-height: 196px;
	}

	body.woocommerce-cart .container.content-page {
		width: calc(100% - 24px);
		padding-top: 28px;
	}

	body.woocommerce-cart.bambu-cart-page--empty .container.content-page {
		padding-bottom: 0;
	}

	.bambu-cart-login {
		margin-bottom: 28px;
		line-height: 1.6;
	}

	.bambu-cart-empty {
		min-height: 300px;
		padding: 24px 12px 58px;
	}

	body.woocommerce-cart table.wc-block-cart-items tr.wc-block-cart-items__row {
		grid-template-columns: 24px 76px minmax(0, 1fr);
		align-items: start;
		min-height: 150px;
		padding: 14px 12px 54px;
	}

	body.woocommerce-cart .wc-block-cart-item__image,
	body.woocommerce-cart .wc-block-cart-item__image img {
		width: 76px;
		height: 76px;
	}

	body.woocommerce-cart .wc-block-cart-item__product {
		padding: 0 0 0 12px !important;
	}

	body.woocommerce-cart .wc-block-components-product-name {
		font-size: 13px;
	}

	body.woocommerce-cart .wc-block-cart-item__total {
		position: absolute;
		right: 12px;
		bottom: 18px;
	}

	body.woocommerce-cart .wc-block-cart-item__quantity {
		top: auto;
		right: auto;
		bottom: 12px;
		left: 112px;
		justify-content: flex-start;
		width: auto;
		transform: none;
	}

	.bambu-cart-recommendations {
		width: calc(100% - 24px);
		margin-bottom: 36px;
	}

	.bambu-cart-recommendations__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bambu-cart-recommendations h2 {
		font-size: 18px;
	}

	body.woocommerce-cart .bambu-cart-summary {
		box-sizing: border-box;
		padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	}

	body.woocommerce-cart .bambu-cart-summary::after {
		width: calc(100% - 32px);
	}

	body.woocommerce-cart .bambu-cart-summary__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		width: 100%;
		min-width: 0;
		margin: 0;
	}

	body.woocommerce-cart .bambu-cart-summary__coupon {
		min-width: 0;
		margin: 0;
		padding: 0;
		text-align: left;
		overflow-wrap: anywhere;
	}

	body.woocommerce-cart .bambu-cart-summary__totals {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
		align-items: stretch;
		min-width: 0;
	}

	body.woocommerce-cart .bambu-cart-summary__totals > strong {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 4px 12px;
		min-width: 0;
		text-align: left;
	}

	body.woocommerce-cart .bambu-cart-summary [data-bambu-total-label] {
		flex: 1 1 145px;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	body.woocommerce-cart .bambu-cart-summary [data-bambu-selected-total] {
		flex: 0 1 auto;
		min-width: 0;
		max-width: 100%;
		margin-left: auto;
		text-align: right;
		overflow-wrap: anywhere;
	}

	body.woocommerce-cart .bambu-cart-summary [data-bambu-selected-total],
	body.woocommerce-cart .bambu-cart-summary [data-bambu-selected-total] :is(.amount, bdi, .woocommerce-Price-currencySymbol) {
		white-space: normal;
		overflow-wrap: anywhere;
	}

	body.woocommerce-cart .bambu-cart-summary__totals small {
		min-width: 0;
		text-align: left;
		overflow-wrap: anywhere;
	}

	body.woocommerce-cart .bambu-cart-summary .bambu-cart-checkout {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		max-width: none;
		height: auto;
		min-height: 40px;
		margin-top: 4px;
		padding: 10px 12px;
		text-align: center;
		white-space: normal;
	}

	body.woocommerce-cart .bambu-cart-summary__status {
		margin-top: 0;
	}

	body.woocommerce-cart .bambu-cart-summary__status:empty {
		display: none;
	}
}
