.etc-mc {
	--etc-mc-pad-top: 42px;
	--etc-mc-pad-right: 48px;
	--etc-mc-pad-bottom: 42px;
	--etc-mc-pad-left: 48px;
	display: inline-flex;
}

.etc-mc__trigger,
.etc-mc__close,
.etc-mc__remove,
.etc-mc__quantity-button {
	font: inherit;
}

.etc-mc__trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	color: #111;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.etc-mc__trigger-icon,
.etc-mc__close-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	font-size: 28px;
}

.etc-mc__trigger-icon svg,
.etc-mc__close-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.etc-mc__count {
	position: absolute;
	top: -0.55em;
	right: -0.65em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.7em;
	height: 1.7em;
	padding: 0 0.35em;
	color: #111;
	background: #d7d5cf;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.etc-mc__overlay {
	position: fixed;
	z-index: 999998;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 260ms ease,
		visibility 260ms ease;
}

.etc-mc__panel {
	position: fixed;
	z-index: 999999;
	top: 0;
	bottom: 0;
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr) auto auto;
	width: min(520px, 100vw);
	max-width: 100vw;
	padding:
		var(--etc-mc-pad-top)
		var(--etc-mc-pad-right)
		var(--etc-mc-pad-bottom)
		var(--etc-mc-pad-left);
	overflow: hidden;
	color: #111;
	background: #fff;
	box-shadow: -12px 0 30px rgba(0, 0, 0, 0.08);
	visibility: hidden;
	transition:
		transform 320ms ease,
		visibility 320ms ease;
}

.etc-mc--right .etc-mc__panel {
	right: 0;
	transform: translateX(100%);
}

.etc-mc--left .etc-mc__panel {
	left: 0;
	transform: translateX(-100%);
}

.etc-mc--open .etc-mc__overlay {
	opacity: 1;
	visibility: visible;
}

.etc-mc--open .etc-mc__panel {
	transform: translateX(0);
	visibility: visible;
}

body.etc-menu-cart-open {
	overflow: hidden;
}

.etc-mc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 34px;
}

.etc-mc__title {
	margin: 0;
	padding: 0;
	color: #080808;
	font-size: clamp(38px, 6vw, 54px);
	font-weight: 800;
	line-height: 1;
}

.etc-mc__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	color: #111;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.etc-mc__progress {
	margin-bottom: 34px;
}

.etc-mc__progress-track {
	position: relative;
	overflow: hidden;
	width: 100%;
	height: 18px;
	background: #fff;
	border: 2px solid #383838;
	border-radius: 999px;
}

.etc-mc__progress-fill {
	position: absolute;
	inset: 3px auto 3px 3px;
	display: block;
	max-width: calc(100% - 6px);
	background: #222;
	border-radius: inherit;
	transition: width 280ms ease;
}

.etc-mc__progress-text {
	margin-top: 9px;
	font-size: 15px;
	line-height: 1.35;
}

.etc-mc__items {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-height: 0;
	padding-right: 4px;
	overflow-x: hidden;
	overflow-y: auto;
}

.etc-mc__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"copy media"
		"actions remove";
	gap: 12px 24px;
	align-items: center;
}

.etc-mc__item-copy {
	grid-area: copy;
	min-width: 0;
}

.etc-mc__item-brand {
	margin-bottom: 4px;
	color: #8a8a86;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.etc-mc__item-title {
	color: #111;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.etc-mc__item-title a {
	color: inherit;
	text-decoration: none;
}

.etc-mc__item-variation {
	margin-top: 5px;
	font-size: 15px;
	line-height: 1.35;
}

.etc-mc__item-variation dl,
.etc-mc__item-variation p {
	margin: 0;
}

.etc-mc__item-variation dt,
.etc-mc__item-variation dd {
	display: inline;
	float: none;
	margin: 0;
}

.etc-mc__item-media {
	grid-area: media;
	width: 88px;
	overflow: hidden;
	border-radius: 8px;
}

.etc-mc__item-image {
	display: block;
	width: 100%;
	height: auto;
}

.etc-mc__item-actions {
	grid-area: actions;
	display: flex;
	align-items: center;
	gap: 18px;
}

.etc-mc__quantity {
	display: inline-grid;
	grid-template-columns: 42px 42px 42px;
	align-items: center;
	background: #ebeae5;
	border: 2px solid #222;
	box-shadow: -9px 9px 0 #ebeae5;
}

.etc-mc__quantity-button,
.etc-mc__quantity-value {
	width: 42px;
	height: 40px;
	margin: 0;
	padding: 0;
	color: #111;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-align: center;
}

.etc-mc__quantity-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.etc-mc__quantity-button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.etc-mc__quantity-value {
	appearance: textfield;
	-moz-appearance: textfield;
}

.etc-mc__quantity-value::-webkit-inner-spin-button,
.etc-mc__quantity-value::-webkit-outer-spin-button {
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

.etc-mc__icon-trash {
	display: none;
	width: 17px;
	height: 17px;
}

.etc-mc__quantity--at-min .etc-mc__icon-minus {
	display: none;
}

.etc-mc__quantity--at-min .etc-mc__icon-trash {
	display: block;
}

.etc-mc__item-total {
	font-size: 18px;
	font-weight: 700;
	white-space: nowrap;
}

.etc-mc__remove {
	grid-area: remove;
	justify-self: end;
	margin: 0;
	padding: 0;
	color: #92928d;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.etc-mc__empty {
	padding: 24px 0;
}

.etc-mc__footer {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	margin-top: 34px;
	padding-top: 30px;
	border-top: 2px solid #333;
}

.etc-mc__totals {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.etc-mc__summary-row,
.etc-mc__coupon {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	white-space: nowrap;
}

.etc-mc__subtotal {
	flex: 0 0 auto;
}

.etc-mc__tax {
	font-size: 15px;
	white-space: nowrap;
}

.etc-mc__coupons {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 15px;
}

.etc-mc__coupons[hidden] {
	display: none;
}

.etc-mc__coupon-code {
	min-width: 0;
}

.etc-mc__coupon-amount {
	flex: 0 0 auto;
	font-weight: 600;
}

.etc-mc__shipping {
	font-size: 15px;
}

.etc-mc__grand-total {
	margin-top: 4px;
	padding-top: 14px;
	border-top: 1px solid currentColor;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.15;
}

.etc-mc__cart-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: 18px 28px;
	color: #111;
	background: #ebeae5;
	border: 2px solid #111;
	box-shadow: -9px 9px 0 #ebeae5;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition:
		color 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease;
}

.etc-mc__status {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.etc-mc--hide-brand .etc-mc__item-brand,
.etc-mc--hide-variation .etc-mc__item-variation {
	display: none;
}

.etc-mc--empty .etc-mc__progress,
.etc-mc--empty .etc-mc__footer {
	display: none;
}

.etc-mc--loading .etc-mc__panel {
	cursor: progress;
}

.etc-mc--loading .etc-mc__item-actions,
.etc-mc--loading .etc-mc__remove {
	pointer-events: none;
	opacity: 0.55;
}

@media (max-width: 575px) {
	.etc-mc__panel {
		width: 100vw;
		padding: 28px 22px;
	}

	.etc-mc__header,
	.etc-mc__progress {
		margin-bottom: 26px;
	}

	.etc-mc__item {
		gap: 12px 16px;
	}

	.etc-mc__footer {
		grid-template-columns: 1fr;
	}

	.etc-mc__cart-button {
		width: 100%;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.etc-mc__overlay,
	.etc-mc__panel,
	.etc-mc__progress-fill,
	.etc-mc__cart-button {
		transition: none;
	}
}
