/*
 * Modelbauer Add-to-Cart Drawer
 * All selectors are deliberately prefixed to avoid changing WooCommerce pages.
 */

body.mm-atc-cart-direct .ct-header-cart .ct-cart-content,
body.mm-atc-cart-direct #header .ct-cart-content,
body.mm-atc-cart-direct header .ct-cart-content {
	display: none !important;
}

body.mm-atc-drawer-open {
	overflow: hidden;
}

.mm-atc-drawer[hidden] {
	display: none !important;
}

.mm-atc-drawer {
	--mm-atc-text: var(--theme-text-color, #202020);
	--mm-atc-muted: var(--wp--preset--color--cyan-bluish-gray, #7d8791);
	--mm-atc-line: rgba(32, 32, 32, 0.14);
	--mm-atc-soft: #f5f4f2;
	--mm-atc-button: #202020;
	--mm-atc-button-text: #ffffff;
	position: fixed;
	inset: 0;
	z-index: 999999;
	color: var(--mm-atc-text);
	font-family: inherit;
}

.mm-atc-drawer__backdrop {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(20, 20, 20, 0.42);
	opacity: 0;
	cursor: default;
	transition: opacity 220ms ease;
}

.mm-atc-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(440px, 100%);
	height: 100%;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	background: #ffffff;
	box-shadow: -12px 0 35px rgba(0, 0, 0, 0.12);
	outline: none;
	transform: translateX(100%);
	transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mm-atc-drawer.is-open .mm-atc-drawer__backdrop {
	opacity: 1;
}

.mm-atc-drawer.is-open .mm-atc-drawer__panel {
	transform: translateX(0);
}

.mm-atc-drawer__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	min-height: 70px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--mm-atc-line);
	background: #ffffff;
}

.mm-atc-drawer__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.mm-atc-drawer__heading h2 {
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.mm-atc-drawer__success {
	display: inline-flex;
	flex: 0 0 28px;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid currentColor;
	border-radius: 50%;
}

.mm-atc-drawer__close {
	display: inline-flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0 -8px 0 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: inherit;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.mm-atc-drawer__close:hover {
	background: var(--mm-atc-soft);
}

.mm-atc-drawer__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.mm-atc-added-product {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	gap: 16px;
	padding: 22px 20px;
}

.mm-atc-added-product__image {
	display: block;
	align-self: start;
	overflow: hidden;
	background: var(--mm-atc-soft);
	aspect-ratio: 4 / 5;
}

.mm-atc-added-product__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.mm-atc-added-product__details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.mm-atc-added-product__name {
	margin: 0;
	color: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}

.mm-atc-added-product__name:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mm-atc-added-product__meta {
	margin-bottom: 7px;
	color: var(--mm-atc-muted);
	font-size: 15px;
	line-height: 1.45;
}

.mm-atc-added-product__meta dl,
.mm-atc-added-product__meta dt,
.mm-atc-added-product__meta dd,
.mm-atc-added-product__meta p {
	margin: 0;
}

.mm-atc-added-product__meta dl {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: 5px;
}

.mm-atc-added-product__meta dt {
	font-weight: 500;
}

.mm-atc-added-product__dispatch {
	margin-top: 1px;
	color: var(--mm-atc-muted);
	font-size: 15px;
	line-height: 1.45;
}

.mm-atc-added-product__dispatch strong {
	color: inherit;
	font-weight: 600;
}

.mm-atc-added-product__price {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 15px;
	width: 100%;
	margin-top: auto;
	padding-top: 9px;
	font-size: 13px;
	line-height: 1.4;
}

.mm-atc-added-product__quantity,
.mm-atc-added-product__unit-price {
	white-space: nowrap;
}

.mm-atc-recommendations {
	padding: 4px 20px 24px;
}

.mm-atc-recommendations h3 {
	margin: 0 0 14px;
	color: inherit;
	font-family: inherit;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}

.mm-atc-recommendations__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.mm-atc-product-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.mm-atc-product-card__image {
	display: block;
	overflow: hidden;
	margin-bottom: 8px;
	background: var(--mm-atc-soft);
	aspect-ratio: 4 / 5;
}

.mm-atc-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 220ms ease;
}

.mm-atc-product-card:hover .mm-atc-product-card__image img {
	transform: scale(1.025);
}

.mm-atc-product-card__name {
	display: -webkit-box;
	overflow: hidden;
	margin-bottom: 3px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mm-atc-product-card__subtitle {
	display: -webkit-box;
	overflow: hidden;
	margin-bottom: 4px;
	font-size: 11px;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mm-atc-product-card__price {
	margin-top: auto;
	font-size: 15px;
	line-height: 1.35;
}

.mm-atc-product-card__price del {
	color: var(--mm-atc-muted);
}

.mm-atc-drawer__footer {
	position: sticky;
	bottom: 0;
	z-index: 2;
	margin-top: auto;
	padding: 18px 20px 20px;
	border-top: 1px solid var(--mm-atc-line);
	background: #ffffff;
}

.mm-atc-drawer__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	font-size: 15px;
	line-height: 1.4;
}

.mm-atc-drawer__subtotal strong {
	font-weight: 600;
}

.mm-atc-drawer__tax-note {
	margin: 3px 0 14px;
	color: var(--mm-atc-muted);
	font-size: 11px;
	line-height: 1.4;
	text-align: right;
}

.mm-atc-drawer__cart-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 12px 18px;
	border: 1px solid var(--mm-atc-button);
	border-radius: 2px;
	color: var(--mm-atc-button-text);
	background: var(--mm-atc-button);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.mm-atc-drawer__cart-button:hover {
	border-color: #000000;
	color: #ffffff;
	background: #000000;
}

.mm-atc-drawer__continue {
	display: block;
	width: auto;
	min-height: 0;
	margin: 13px auto 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: inherit;
	background: transparent;
	box-shadow: none;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.mm-atc-drawer__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 16px 0 0;
	color: var(--mm-atc-muted);
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
}

.mm-atc-drawer__secure span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 9px;
}

.mm-atc-drawer__loading,
.mm-atc-drawer__error {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 260px;
	padding: 32px 20px;
	text-align: center;
}

.mm-atc-drawer__loading {
	flex-direction: row;
	gap: 10px;
	color: var(--mm-atc-muted);
	font-size: 13px;
}

.mm-atc-drawer__spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(32, 32, 32, 0.18);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: mm-atc-spin 700ms linear infinite;
}

.mm-atc-drawer__error p {
	max-width: 320px;
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.55;
}

.mm-atc-drawer :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@keyframes mm-atc-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 689.98px) {
	.mm-atc-drawer__panel {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		height: min(88dvh, 760px);
		box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.14);
		transform: translateY(100%);
	}

	.mm-atc-drawer.is-open .mm-atc-drawer__panel {
		transform: translateY(0);
	}

	.mm-atc-drawer__header {
		min-height: 64px;
		padding: 15px 16px;
	}

	.mm-atc-added-product {
		grid-template-columns: calc((100% - 20px) / 3) minmax(0, 1fr);
		gap: 14px;
		padding: 20px 16px;
	}

	.mm-atc-recommendations {
		padding: 2px 16px 22px;
	}

	.mm-atc-recommendations__grid {
		gap: 8px;
	}

	.mm-atc-drawer__footer {
		padding: 16px max(16px, env(safe-area-inset-left))
			calc(18px + env(safe-area-inset-bottom))
			max(16px, env(safe-area-inset-right));
	}
}

@media (max-width: 359.98px) {
	.mm-atc-recommendations__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mm-atc-product-card:nth-child(3) {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mm-atc-drawer__backdrop,
	.mm-atc-drawer__panel,
	.mm-atc-product-card__image img {
		transition-duration: 0.01ms;
	}

	.mm-atc-drawer__spinner {
		animation-duration: 1.4s;
	}
}

.mm-atc-added-product__subtitle {
	margin: 0 0 7px;
	font-size: 15px;
	line-height: 1.45;
}

.mm-atc-added-product__subtitle p {
	margin: 0;
}
.mm-atc-free-shipping {
	margin-bottom: 18px;
}

.mm-atc-free-shipping__text {
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.mm-atc-free-shipping__text strong {
	font-weight: 600;
}

.mm-atc-free-shipping__track {
	width: 100%;
	height: 4px;
	overflow: hidden;
	background: var(--mm-atc-soft);
}

.mm-atc-free-shipping__bar {
	display: block;
	height: 100%;
	background: var(--mm-atc-button);
	transition: width 300ms ease;
}