/* Classic cart only. WooCommerce owns all form actions and monetary values. */
body.woocommerce-cart {
	background: #f2f4f5;
	color: #171717;
}

.woocommerce-cart .site-content {
	box-sizing: border-box;
	max-width: 68rem;
	margin: 0 auto;
	padding: 1.25rem max(1rem, env(safe-area-inset-right)) 3.5rem max(1rem, env(safe-area-inset-left));
}

.woocommerce-cart .entry-header {
	display: none;
}

/* Page Intro / Heading */
.ek-cart-page__intro {
	margin-bottom: 1.25rem;
}

.ek-cart-page__back-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	gap: 0.35rem;
	color: var(--ek-color-red, #b21f2d);
	font-size: 0.95rem;
	font-weight: 750;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.ek-cart-page__back-link::before {
	content: '\2190';
	font-size: 1.1em;
	line-height: 1;
}

.ek-cart-page__back-link:hover,
.ek-cart-page__back-link:focus-visible {
	opacity: 0.85;
	text-decoration: underline;
}

.ek-cart-page__intro h1 {
	margin: 0.2rem 0 0;
	font-family: var(--ek-font-display, "Arial Black", sans-serif);
	font-size: clamp(1.75rem, 6.8vw, 2.35rem);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -0.04em;
	color: #171717;
}

/* Notices */
.woocommerce-cart .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
	margin-bottom: 1rem;
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
	display: none;
}

/* Main Cart Grid Container */
.woocommerce-cart .entry-content > .woocommerce {
	display: grid;
	gap: 1.25rem;
	align-items: start;
}

@media (min-width: 58rem) {
	.woocommerce-cart .entry-content > .woocommerce {
		grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 1fr);
		gap: 2rem;
	}
	.woocommerce-cart .cart-collaterals {
		position: sticky;
		top: 5rem;
	}
}

/* Form and Cart Table Reset */
.woocommerce-cart .woocommerce-cart-form {
	min-width: 0;
}

.woocommerce-cart table.ek-cart-table {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.woocommerce-cart table.ek-cart-table thead {
	display: none;
}

.woocommerce-cart table.ek-cart-table tbody {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	width: 100%;
}

.woocommerce-cart table.ek-cart-table tr.ek-cart-row {
	display: block;
	width: 100%;
	margin: 0;
}

.woocommerce-cart table.ek-cart-table td.ek-cart-card {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0;
	background: #ffffff;
	border: 1px solid #dbe0e3;
	border-radius: 0.95rem;
	box-shadow: 0 4px 14px rgb(34 42 48 / 6%);
	overflow: hidden;
}

.woocommerce-cart table.ek-cart-table td.ek-cart-card::before {
	display: none !important;
}

/* Card Inner Layout */
.ek-cart-card__inner {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 0.9rem;
}

/* Thumbnail */
.woocommerce-cart .ek-cart-card__image {
	display: block !important;
	flex: 0 0 84px !important;
	width: 84px !important;
	height: 84px !important;
	border-radius: 0.65rem;
	overflow: hidden;
	background: #f4f5f6;
}

.ek-cart-card__image a,
.ek-cart-card__image .ek-cart-card__edit-trigger {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.woocommerce-cart table.ek-cart-table .ek-cart-card__image img,
.woocommerce-cart .ek-cart-card__image img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	border-radius: 0.65rem !important;
}

/* Card Body */
.ek-cart-card__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* Header Row: Name + Line Total */
.ek-cart-card__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.65rem;
}

.ek-cart-card__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 1.05rem;
	font-weight: 850;
	line-height: 1.25;
	color: #171717;
	overflow-wrap: break-word;
	word-break: break-word;
}

.ek-cart-card__title a,
.ek-cart-card__title .ek-cart-card__edit-trigger {
	color: inherit;
	text-decoration: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: color 0.15s ease;
}

.ek-cart-card__title a:hover,
.ek-cart-card__title a:focus-visible,
.ek-cart-card__title .ek-cart-card__edit-trigger:hover,
.ek-cart-card__title .ek-cart-card__edit-trigger:focus-visible {
	color: var(--ek-color-red, #b21f2d);
	text-decoration: underline;
}

.ek-cart-card__price {
	flex: 0 0 auto;
	margin: 0;
	text-align: right;
	font-size: 1.1rem;
	font-weight: 850;
	line-height: 1.25;
	color: var(--ek-color-red, #b21f2d);
	white-space: nowrap;
}

.ek-cart-card__price::before {
	display: none !important;
}

.ek-cart-card__price ins {
	text-decoration: none;
}

/* Modifier Metadata (Variation + APF) */
.ek-cart-card__meta {
	margin-top: 0.35rem;
}

.woocommerce-cart dl.variation {
	display: grid;
	gap: 0.25rem;
	margin: 0.3rem 0 0.45rem;
	padding: 0;
	font-size: 0.88rem;
	line-height: 1.35;
}

.woocommerce-cart dl.variation dt {
	display: block;
	float: none;
	clear: none;
	margin: 0.2rem 0 0;
	padding: 0;
	font-size: 0.82rem;
	font-weight: 750;
	text-transform: none;
	letter-spacing: 0.01em;
	color: #4b5563;
}

.woocommerce-cart dl.variation dt::after,
.woocommerce-cart dl.variation dt::before {
	content: none !important;
}

.woocommerce-cart dl.variation dd {
	display: block;
	float: none;
	clear: none;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 500;
	color: #1f2937;
	overflow-wrap: break-word;
	word-break: break-word;
}

.woocommerce-cart dl.variation dd p {
	margin: 0;
	display: inline;
}

.woocommerce-cart dl.variation dd::after,
.woocommerce-cart dl.variation dd::before {
	content: none !important;
}

/* Utility Row: Quantity (left) + Remove (right) */
.ek-cart-card__utility {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.55rem;
	padding-top: 0.45rem;
}

.ek-cart-card__quantity {
	display: flex;
	align-items: center;
}

.ek-cart-card__quantity::before {
	display: none !important;
}

.ek-cart-qty-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0.25rem 0.7rem;
	background: #f2f4f6;
	border: 1px solid #dce1e5;
	border-radius: 999px;
	color: #374151;
	font-size: 0.86rem;
	font-weight: 750;
	letter-spacing: -0.01em;
}

.woocommerce-cart table.ek-cart-table .quantity .qty {
	box-sizing: border-box;
	width: 3.8rem;
	max-width: 100%;
	min-height: 38px;
	height: 38px;
	padding: 0.3rem;
	border: 1px solid #bac2c7;
	border-radius: 0.5rem;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 750;
	text-align: center;
	color: #171717;
}

.ek-cart-card__remove {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.ek-cart-card__remove::before {
	display: none !important;
}

.woocommerce-cart table.ek-cart-table a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 44px;
	height: auto;
	padding: 0.3rem 0.5rem;
	border-radius: 0.4rem;
	color: var(--ek-color-red, #b21f2d) !important;
	background: transparent !important;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: background 0.15s ease, color 0.15s ease;
}

.woocommerce-cart table.ek-cart-table a.remove:hover,
.woocommerce-cart table.ek-cart-table a.remove:focus-visible {
	color: #7d1520 !important;
	background: #fee2e2 !important;
}

/* Actions Row (Coupon + Update Cart) */
.woocommerce-cart table.ek-cart-table tr.ek-cart-actions-row {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
}

.woocommerce-cart table.ek-cart-table tr.ek-cart-actions-row td.actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0;
	background: transparent;
	border: 0;
}

.woocommerce-cart table.ek-cart-table tr.ek-cart-actions-row td.actions::before {
	display: none !important;
}

/* Coupon Details Element */
.ek-cart-coupon {
	box-sizing: border-box;
	width: 100%;
	background: #ffffff;
	border: 1px solid #dbe0e3;
	border-radius: 0.85rem;
	box-shadow: 0 2px 8px rgb(34 42 48 / 4%);
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.ek-cart-coupon[open] {
	border-color: #cbd5e1;
}

.ek-cart-coupon__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	padding: 0.65rem 1rem;
	cursor: pointer;
	list-style: none;
	color: #4b5563;
	font-size: 0.92rem;
	font-weight: 700;
	user-select: none;
}

.ek-cart-coupon__summary::-webkit-details-marker {
	display: none;
}

.ek-cart-coupon__summary:hover {
	color: var(--ek-color-red, #b21f2d);
}

.ek-cart-coupon__icon {
	width: 1.25rem;
	height: 1.25rem;
	color: #6b7280;
	transition: transform 0.2s ease;
}

.ek-cart-coupon[open] .ek-cart-coupon__icon {
	transform: rotate(180deg);
}

.ek-cart-coupon__content {
	padding: 0 1rem 1rem;
}

.ek-cart-coupon__input-group {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.ek-cart-coupon__input-group input.input-text {
	box-sizing: border-box;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	height: 44px;
	padding: 0.5rem 0.85rem;
	border: 1px solid #d1d5db;
	border-radius: 0.6rem;
	font: inherit;
	font-size: 0.95rem;
	background: #fff;
	color: #171717;
}

.ek-cart-coupon__input-group input.input-text:focus {
	border-color: var(--ek-color-red, #b21f2d);
	outline: 2px solid rgb(178 31 45 / 20%);
}

.ek-cart-coupon__input-group button.button {
	flex: 0 0 auto;
	min-height: 44px;
	height: 44px;
	padding: 0 1.25rem;
	background: #171717;
	color: #ffffff;
	border: 0;
	border-radius: 0.6rem;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 750;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ek-cart-coupon__input-group button.button:hover {
	background: #333333;
}

/* Update Cart Button - visible only when cart is modified/actionable */
.woocommerce-cart button[name="update_cart"].ek-cart-update-btn:disabled {
	display: none !important;
}

.woocommerce-cart button[name="update_cart"].ek-cart-update-btn:not(:disabled),
.woocommerce-cart .no-js button[name="update_cart"].ek-cart-update-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	width: auto !important;
	min-height: 40px;
	margin: 0.25rem 0 0;
	padding: 0.5rem 1.25rem;
	background: #171717;
	color: #ffffff !important;
	border: 0;
	border-radius: 0.55rem;
	font-size: 0.88rem;
	font-weight: 750;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
	transition: background 0.15s ease;
}

.woocommerce-cart button[name="update_cart"].ek-cart-update-btn:hover {
	background: #333333;
}

/* Order Summary Card */
.woocommerce-cart .cart-collaterals {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 1.25rem;
	background: #ffffff;
	border: 1px solid #dbe0e3;
	border-radius: 0.95rem;
	box-shadow: 0 4px 14px rgb(34 42 48 / 6%);
}

.woocommerce-cart .cart-collaterals .cross-sells {
	display: none !important;
}

.woocommerce-cart .cart_totals {
	float: none;
	width: 100%;
}

.woocommerce-cart .cart_totals h2 {
	margin: 0 0 1rem;
	font-family: var(--ek-font-display, "Arial Black", sans-serif);
	font-size: 1.35rem;
	font-weight: 900;
	letter-spacing: -0.03em;
	color: #171717;
}

.woocommerce-cart .cart-totals-table {
	display: table;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.woocommerce-cart .cart-totals-table tr {
	border-top: 1px solid #edf0f2;
}

.woocommerce-cart .cart-totals-table tr.cart-subtotal {
	border-top: 0;
}

.woocommerce-cart .cart-totals-table th {
	padding: 0.75rem 0;
	border: 0;
	background: transparent;
	font-size: 0.98rem;
	font-weight: 600;
	color: #4b5563;
	text-align: left;
	vertical-align: middle;
}

.woocommerce-cart .cart-totals-table td {
	padding: 0.75rem 0;
	border: 0;
	background: transparent;
	font-size: 1.05rem;
	font-weight: 750;
	color: #171717;
	text-align: right !important;
	vertical-align: middle;
}

.woocommerce-cart .cart-totals-table td::before {
	display: none !important;
}

/* Order Total Strong Emphasis */
.woocommerce-cart .cart-totals-table tr.order-total {
	border-top: 2px solid #e5e7eb;
}

.woocommerce-cart .cart-totals-table tr.order-total th {
	padding-top: 1rem;
	font-size: 1.18rem;
	font-weight: 850;
	color: #171717;
}

.woocommerce-cart .cart-totals-table tr.order-total td {
	padding-top: 1rem;
	font-size: 1.4rem;
	font-weight: 900;
	color: var(--ek-color-red, #b21f2d);
}

.woocommerce-cart .cart-totals-table tr.order-total td strong {
	font-weight: 900;
	color: inherit;
}

/* Proceed to Checkout CTA */
.woocommerce-cart .wc-proceed-to-checkout {
	margin-top: 1.25rem;
	padding: 0;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0.9rem 1.25rem;
	background: var(--ek-color-red, #b21f2d);
	color: #ffffff !important;
	border: 0;
	border-radius: 0.75rem;
	font-size: 1.05rem;
	font-weight: 850;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 4px 12px rgb(178 31 45 / 28%);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible {
	background: var(--ek-color-action-hover, #961a26);
	box-shadow: 0 6px 16px rgb(150 26 38 / 32%);
	color: #ffffff !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:active {
	transform: scale(0.99);
}

/* Empty Cart State */
.woocommerce-cart .return-to-shop a.button {
	min-height: 48px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ek-color-red, #b21f2d);
	color: #ffffff !important;
	border-radius: 0.65rem;
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
	font-weight: 800;
	text-decoration: none;
}

/* Mobile Polish: ~390px phone and ~350px protection */
@media (max-width: 25rem) {
	.ek-cart-card__inner {
		gap: 0.75rem;
		padding: 0.8rem;
	}

	.woocommerce-cart .ek-cart-card__image {
		flex: 0 0 76px !important;
		width: 76px !important;
		height: 76px !important;
	}

	.ek-cart-card__title {
		font-size: 0.98rem;
	}

	.ek-cart-card__price {
		font-size: 1.05rem;
	}
}

@media (max-width: 22.5rem) {
	/* ~350px phone */
	.woocommerce-cart .site-content {
		padding-left: 0.65rem;
		padding-right: 0.65rem;
	}

	.ek-cart-card__inner {
		gap: 0.65rem;
		padding: 0.75rem;
	}

	.woocommerce-cart .ek-cart-card__image {
		flex: 0 0 72px !important;
		width: 72px !important;
		height: 72px !important;
	}

	.ek-cart-card__header {
		gap: 0.5rem;
	}

	.ek-cart-card__title {
		font-size: 0.94rem;
	}

	.ek-cart-card__price {
		font-size: 1rem;
	}

	.woocommerce-cart .cart-collaterals {
		padding: 1.1rem 0.9rem;
	}
}
