/*
 * K5 compact cart — child theme compatibility copy.
 * Applies only to the WooCommerce cart page.
 */

body.woocommerce-cart {
	--k5-cart-red: #bb1820;
	--k5-cart-red-dark: #8d0010;
	--k5-cart-gold: #e6a21a;
	--k5-cart-text: #26221f;
	--k5-cart-muted: #81776f;
	--k5-cart-line: #ead9c9;
	--k5-cart-soft: #fffaf3;
}

/* The template supplies its own compact checkout steps. */
body.woocommerce-cart .checkout-page-title {
	display: none !important;
}

body.woocommerce-cart .cart-container,
body.woocommerce-cart .page-checkout {
	padding-top: 0 !important;
}

body.woocommerce-cart .cart-container > .woocommerce {
	padding-top: 0;
}

body.woocommerce-cart .k5-checkout-steps {
	align-items: center;
	border-bottom: 1px solid var(--k5-cart-line);
	display: flex;
	justify-content: center;
	margin: 0 0 38px;
	padding: 30px 15px;
}

body.woocommerce-cart .k5-checkout-step {
	align-items: center;
	color: #b7aca3;
	display: inline-flex;
	font-size: 16px;
	font-weight: 500;
	gap: 10px;
	line-height: 1.2;
	margin: 0;
	text-decoration: none;
}

body.woocommerce-cart a.k5-checkout-step:hover {
	color: var(--k5-cart-red);
}

body.woocommerce-cart .k5-checkout-step.is-current {
	color: var(--k5-cart-red-dark);
}

body.woocommerce-cart .k5-checkout-step__number {
	align-items: center;
	background: #e9dfd4;
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	height: 27px;
	justify-content: center;
	min-width: 27px;
}

body.woocommerce-cart .k5-checkout-step.is-current .k5-checkout-step__number {
	background: var(--k5-cart-red-dark);
}

body.woocommerce-cart .k5-checkout-step__divider {
	color: var(--k5-cart-gold);
	font-size: 25px;
	line-height: 1;
	margin: 0 25px;
}

body.woocommerce-cart .k5-cart-layout {
	align-items: flex-start;
	margin-bottom: 50px;
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 1200px;
	padding-left: 15px;
	padding-right: 15px;
	width: 100%;
}

body.woocommerce-cart .k5-cart-main {
	flex-basis: 66%;
	max-width: 66%;
	padding: 0 42px 0 0;
}

body.woocommerce-cart .k5-cart-layout > .cart-collaterals {
	flex-basis: 34%;
	max-width: 34%;
	padding: 0 0 0 18px;
	width: auto;
}

body.woocommerce-cart .k5-cart-main .cart-wrapper {
	overflow: visible;
}

/* Free-shipping progress. */
body.woocommerce-cart .k5-free-shipping {
	background: #fff;
	border: 1px solid var(--k5-cart-line);
	border-radius: 13px;
	margin: 0 0 18px;
	padding: 16px;
}

body.woocommerce-cart .k5-free-shipping__message {
	color: var(--k5-cart-text);
	font-size: 14px;
	margin: 0 0 12px;
}

body.woocommerce-cart .k5-free-shipping__message strong {
	color: var(--k5-cart-red);
	font-weight: 700;
}

body.woocommerce-cart .k5-free-shipping__track {
	background: repeating-linear-gradient(
		135deg,
		#f4ede4,
		#f4ede4 9px,
		#fbf7f1 9px,
		#fbf7f1 18px
	);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

body.woocommerce-cart .k5-free-shipping__progress {
	background: var(--k5-cart-red);
	border-radius: inherit;
	display: block;
	height: 100%;
	min-width: 4px;
	transition: width 0.25s ease;
}

/* Product table. */
body.woocommerce-cart .k5-cart-main table.shop_table {
	border: 0;
	border-collapse: collapse;
	margin: 0;
	table-layout: fixed;
	width: 100%;
}

body.woocommerce-cart .k5-cart-main table.shop_table thead {
	border-bottom: 1px solid var(--k5-cart-line);
}

body.woocommerce-cart .k5-cart-main table.shop_table thead th {
	border: 0;
	color: #9a8c81;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 0 7px 11px;
	text-transform: uppercase;
}

body.woocommerce-cart .k5-cart-main table.shop_table thead th.product-name {
	text-align: left;
}

body.woocommerce-cart .k5-cart-main table.shop_table th.product-price,
body.woocommerce-cart .k5-cart-main table.shop_table th.product-quantity,
body.woocommerce-cart .k5-cart-main table.shop_table th.product-subtotal {
	text-align: center;
	width: 16%;
}

body.woocommerce-cart .k5-cart-main table.shop_table th.product-quantity {
	width: 18%;
}

body.woocommerce-cart .k5-cart-main tr.cart_item {
	border-bottom: 1px solid var(--k5-cart-line);
}

body.woocommerce-cart .k5-cart-main tr.cart_item td {
	border: 0;
	color: var(--k5-cart-text);
	padding: 18px 7px;
	vertical-align: middle;
}

body.woocommerce-cart .k5-cart-main td.product-remove {
	padding-left: 0;
	padding-right: 4px;
	width: 28px;
}

body.woocommerce-cart .k5-cart-main td.product-remove a.remove {
	align-items: center;
	border: 1px solid #d6d3cf;
	color: #9d9690;
	display: inline-flex;
	font-size: 17px;
	height: 23px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	width: 23px;
}

body.woocommerce-cart .k5-cart-main td.product-remove a.remove:hover {
	background: var(--k5-cart-red);
	border-color: var(--k5-cart-red);
	color: #fff;
}

body.woocommerce-cart .k5-cart-main td.product-thumbnail {
	padding-left: 3px;
	padding-right: 10px;
	width: 88px;
}

body.woocommerce-cart .k5-cart-main td.product-thumbnail img {
	aspect-ratio: 1 / 1;
	border-radius: 7px;
	height: 72px;
	object-fit: cover;
	width: 72px;
}

body.woocommerce-cart .k5-cart-main td.product-name {
	font-size: 14px;
	line-height: 1.4;
	overflow-wrap: anywhere;
	padding-left: 0;
	text-align: left;
}

body.woocommerce-cart .k5-cart-main td.product-name > a {
	color: var(--k5-cart-text);
	font-weight: 600;
}

body.woocommerce-cart .k5-cart-main td.product-name > a:hover {
	color: var(--k5-cart-red);
}

body.woocommerce-cart .k5-cart-main td.product-price,
body.woocommerce-cart .k5-cart-main td.product-quantity,
body.woocommerce-cart .k5-cart-main td.product-subtotal {
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
}

body.woocommerce-cart .k5-cart-main td.product-subtotal {
	color: var(--k5-cart-red-dark);
}

body.woocommerce-cart .k5-cart-main .quantity {
	border: 1px solid var(--k5-cart-line);
	border-radius: 9px;
	display: inline-flex;
	float: none;
	margin: 0;
	overflow: hidden;
}

body.woocommerce-cart .k5-cart-main .quantity input {
	border: 0 !important;
	box-shadow: none !important;
	height: 38px;
	margin: 0 !important;
	min-height: 38px;
}

body.woocommerce-cart .k5-cart-main .quantity .button {
	background: #fff;
	color: #625a54;
	padding: 0 10px;
}

body.woocommerce-cart .k5-cart-main .quantity .qty {
	border-left: 1px solid var(--k5-cart-line) !important;
	border-right: 1px solid var(--k5-cart-line) !important;
	max-width: 40px;
	padding: 0;
	text-align: center;
}

/* Coupon and secondary actions stay in the left column. */
body.woocommerce-cart .k5-cart-actions-row,
body.woocommerce-cart .k5-cart-actions-row td.actions {
	border: 0 !important;
}

body.woocommerce-cart .k5-cart-actions-row td.actions {
	padding: 20px 0 0 !important;
	text-align: left;
}

body.woocommerce-cart .k5-cart-coupon {
	clear: both;
	display: block;
	float: none !important;
	margin: 0;
	padding: 0;
	position: static !important;
	width: 100% !important;
}

body.woocommerce-cart .k5-cart-coupon__title {
	color: var(--k5-cart-red-dark);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

body.woocommerce-cart .k5-cart-coupon__title::before {
	content: "◆";
	color: #e8aaa8;
	font-size: 11px;
	margin-right: 8px;
}

body.woocommerce-cart .k5-cart-coupon__fields {
	align-items: stretch;
	display: flex;
	gap: 12px;
}

body.woocommerce-cart .k5-cart-coupon__fields input.input-text {
	background: #fff;
	border: 1px solid var(--k5-cart-line);
	border-radius: 999px;
	box-shadow: none;
	flex: 1 1 auto;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	width: auto;
}

body.woocommerce-cart .k5-cart-coupon__fields button.button {
	background: #fff !important;
	border: 1px solid var(--k5-cart-red) !important;
	border-radius: 999px;
	color: var(--k5-cart-red) !important;
	flex: 0 0 120px;
	height: 46px;
	line-height: 44px;
	margin: 0;
	padding: 0 18px;
	text-transform: none;
}

body.woocommerce-cart .k5-cart-coupon__fields button.button:hover {
	background: var(--k5-cart-red) !important;
	color: #fff !important;
}

body.woocommerce-cart .k5-cart-secondary-actions {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: 20px;
}

body.woocommerce-cart .continue-shopping {
	float: none !important;
	margin: 0;
}

body.woocommerce-cart .continue-shopping .button {
	background: transparent !important;
	border: 1px solid var(--k5-cart-line) !important;
	border-radius: 999px;
	color: #5f5751 !important;
	font-size: 12px;
	line-height: 40px;
	margin: 0;
	min-height: 42px;
	padding: 0 20px;
}

body.woocommerce-cart .k5-update-cart {
	border-radius: 999px;
	font-size: 12px;
	margin: 0;
}

/* Flatsome handles quantity refresh, so the manual button can stay hidden. */
body.woocommerce-cart .cart-auto-refresh .k5-update-cart {
	display: none !important;
}

/* Order summary card. */
body.woocommerce-cart .k5-cart-summary-card {
	background: #fff !important;
	border: 1px solid var(--k5-cart-line);
	border-radius: 14px;
	padding: 22px 24px 24px;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals {
	background: #fff !important;
	display: flex;
	flex-direction: column;
	float: none;
	width: 100%;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals > h2 {
	background: #fff !important;
	order: 1;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals > table {
	background: #fff !important;
	order: 2;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals > :not(h2):not(table):not(.wc-proceed-to-checkout) {
	background: #fff !important;
	order: 3;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals > .wc-proceed-to-checkout {
	order: 4;
}

body.woocommerce-cart .k5-cart-summary-card .cart_totals h2 {
	color: var(--k5-cart-red-dark);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin: 0 0 13px;
	text-transform: uppercase;
}

body.woocommerce-cart .k5-cart-summary-card table.shop_table {
	background: #fff !important;
	border: 0;
	border-collapse: collapse;
	margin: 0;
}

body.woocommerce-cart .k5-cart-summary-card table.shop_table tbody,
body.woocommerce-cart .k5-cart-summary-card table.shop_table tr,
body.woocommerce-cart .k5-cart-summary-card table.shop_table th,
body.woocommerce-cart .k5-cart-summary-card table.shop_table td {
	background: #fff !important;
}

body.woocommerce-cart .k5-cart-summary-card table.shop_table th,
body.woocommerce-cart .k5-cart-summary-card table.shop_table td {
	border-bottom: 1px solid var(--k5-cart-line);
	font-size: 14px;
	padding: 14px 0;
	vertical-align: top;
}

body.woocommerce-cart .k5-cart-summary-card table.shop_table th {
	color: #5f5751;
	font-weight: 500;
	text-align: left;
	width: 36%;
}

body.woocommerce-cart .k5-cart-summary-card table.shop_table td {
	color: var(--k5-cart-text);
	text-align: right;
}

body.woocommerce-cart .k5-cart-summary-card tr.order-total th,
body.woocommerce-cart .k5-cart-summary-card tr.order-total td {
	border-bottom: 0;
	color: var(--k5-cart-red-dark);
	font-size: 16px;
	font-weight: 700;
}

body.woocommerce-cart .k5-cart-summary-card .shipping__inner {
	padding: 0 !important;
}

body.woocommerce-cart .k5-cart-summary-card .shipping__table,
body.woocommerce-cart .k5-cart-summary-card .shipping__table th,
body.woocommerce-cart .k5-cart-summary-card .shipping__table td {
	border: 0;
	margin: 0;
	padding-bottom: 0;
	padding-top: 0;
}

body.woocommerce-cart .k5-cart-summary-card .shipping__table th {
	padding-right: 10px;
}

body.woocommerce-cart .k5-cart-summary-card .shipping__list {
	margin: 0;
}

body.woocommerce-cart .k5-cart-summary-card .woocommerce-shipping-destination {
	color: var(--k5-cart-muted);
	font-size: 12px;
	line-height: 1.45;
	margin: 8px 0 0;
}

body.woocommerce-cart .k5-cart-summary-card .shipping-calculator-button {
	color: var(--k5-cart-red);
	display: inline-block;
	font-size: 12px;
	margin-top: 6px;
}

body.woocommerce-cart .k5-cart-summary-card .wc-proceed-to-checkout {
	margin: 18px 0 0;
	padding: 0;
}

body.woocommerce-cart .k5-cart-summary-card .checkout-button {
	background: var(--k5-cart-red) !important;
	border: 0 !important;
	border-radius: 999px;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 50px;
	margin: 0;
	min-height: 50px;
	padding: 0 20px;
	text-transform: uppercase;
	width: 100%;
}

body.woocommerce-cart .k5-cart-summary-card .checkout-button:hover {
	background: var(--k5-cart-red-dark) !important;
}

@media (min-width: 850px) {
	body.woocommerce-cart .k5-cart-layout > .cart-collaterals .cart-sidebar {
		position: sticky;
		top: 115px;
	}
}

@media (max-width: 849px) {
	body.woocommerce-cart .k5-checkout-steps {
		justify-content: space-between;
		margin-bottom: 22px;
		padding: 19px 4px;
	}

	body.woocommerce-cart .k5-checkout-step {
		font-size: 12px;
		gap: 6px;
		text-align: center;
	}

	body.woocommerce-cart .k5-checkout-step__number {
		font-size: 11px;
		height: 23px;
		min-width: 23px;
	}

	body.woocommerce-cart .k5-checkout-step__divider {
		font-size: 19px;
		margin: 0 5px;
	}

	body.woocommerce-cart .k5-cart-main,
	body.woocommerce-cart .k5-cart-layout > .cart-collaterals {
		flex-basis: 100%;
		max-width: 100%;
		padding: 0;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-layout > .cart-collaterals {
		margin-top: 24px;
	}

	body.woocommerce-cart .k5-cart-layout {
		padding-left: 15px;
		padding-right: 15px;
	}

	body.woocommerce-cart .k5-free-shipping {
		padding: 14px;
	}

	body.woocommerce-cart .k5-cart-main table.shop_table,
	body.woocommerce-cart .k5-cart-main table.shop_table tbody {
		display: block;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-main table.shop_table thead {
		display: none;
	}

	body.woocommerce-cart .k5-cart-main tr.cart_item {
		display: grid !important;
		gap: 5px 12px;
		grid-template-areas:
			"thumb name name"
			"thumb price subtotal"
			"thumb qty qty";
		grid-template-columns: 76px minmax(0, 1fr) auto;
		padding: 16px 28px 16px 0;
		position: relative;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-main tr.cart_item td {
		border: 0 !important;
		display: block !important;
		padding: 0 !important;
		text-align: left !important;
		width: auto !important;
	}

	body.woocommerce-cart .k5-cart-main tr.cart_item td::before {
		display: none !important;
	}

	body.woocommerce-cart .k5-cart-main td.product-remove {
		position: absolute;
		right: 0;
		top: 14px;
	}

	body.woocommerce-cart .k5-cart-main td.product-thumbnail {
		grid-area: thumb;
	}

	body.woocommerce-cart .k5-cart-main td.product-thumbnail img {
		height: 72px;
		width: 72px;
	}

	body.woocommerce-cart .k5-cart-main td.product-name {
		grid-area: name;
		padding-right: 4px !important;
	}

	body.woocommerce-cart .k5-cart-main td.product-price {
		color: #5f5751;
		font-size: 13px;
		grid-area: price;
	}

	body.woocommerce-cart .k5-cart-main td.product-subtotal {
		font-size: 13px;
		grid-area: subtotal;
		text-align: right !important;
	}

	body.woocommerce-cart .k5-cart-main td.product-quantity {
		grid-area: qty;
		margin-top: 4px;
	}

	body.woocommerce-cart .k5-cart-main .quantity input {
		height: 34px;
		min-height: 34px;
	}

	body.woocommerce-cart .k5-cart-actions-row {
		display: block !important;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-actions-row td.actions {
		display: block !important;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-coupon__fields {
		gap: 8px;
	}

	body.woocommerce-cart .k5-cart-coupon__fields button.button {
		flex-basis: 105px;
		padding-left: 10px;
		padding-right: 10px;
	}

	body.woocommerce-cart .k5-cart-secondary-actions {
		align-items: stretch;
		flex-direction: column;
	}

	body.woocommerce-cart .continue-shopping,
	body.woocommerce-cart .continue-shopping .button {
		text-align: center;
		width: 100%;
	}

	body.woocommerce-cart .k5-cart-summary-card {
		padding: 19px 18px 21px;
	}
}

@media (max-width: 420px) {
	body.woocommerce-cart .k5-checkout-step__label {
		max-width: 78px;
	}

	body.woocommerce-cart .k5-checkout-step.is-disabled .k5-checkout-step__label {
		display: none;
	}

	body.woocommerce-cart .k5-cart-coupon__fields {
		flex-direction: column;
	}

	body.woocommerce-cart .k5-cart-coupon__fields button.button {
		flex-basis: 46px;
		width: 100%;
	}
}
