/* ästhetika Motiv-Konfigurator – Frontend
 * Farben über CSS-Variablen anpassbar, z. B. im Customizer:
 * .aesth-mk { --mk-ink: #000; --mk-paper: #eee; }
 */

.aesth-mk {
	--mk-ink: #151515;
	--mk-ink-soft: rgba(21, 21, 21, 0.62);
	--mk-line: rgba(21, 21, 21, 0.16);
	--mk-paper: #f2f0eb;
	--mk-surface: #ffffff;
	--mk-accent: #151515;
	--mk-accent-ink: #ffffff;
	--mk-success: #1f6b3a;
	--mk-error: #b3261e;
	--mk-radius: 2px;
	--mk-sticky-top: 16px; /* Abstand unter der Kopfzeile des Themes (--mk-header misst das Skript) */
	--mk-gap: clamp(20px, 4vw, 56px);
	--mk-flash: rgba(110, 88, 56, 0.16); /* kurzes Aufleuchten des nächsten Schritts */

	color: var(--mk-ink);
	font: inherit;
	margin: 0 auto;
	max-width: 1280px;
	width: 100%;
}

.aesth-mk *,
.aesth-mk *::before,
.aesth-mk *::after {
	box-sizing: border-box;
}

/* Theme-Button-Stile neutralisieren. :is(#aesth-mk, …) hebt die Spezifität auf ID-Niveau,
   ohne dass es ein Element mit dieser ID geben muss – so setzen sich die Konfigurator-Stile
   auch gegen sehr spezifische Theme-Regeln durch. */
:is(#aesth-mk, .aesth-mk) button {
	font-family: inherit;
	line-height: 1.2;
	color: inherit;
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	min-height: 0;
	width: auto;
	height: auto;
	text-decoration: none;
	box-shadow: none;
	text-shadow: none;
	letter-spacing: inherit;
	text-transform: none;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	cursor: pointer;
}

:is(#aesth-mk, .aesth-mk) button:disabled {
	cursor: not-allowed;
}

:is(#aesth-mk, .aesth-mk) button:focus:not(:focus-visible) {
	outline: none;
}

:is(#aesth-mk, .aesth-mk) button:focus-visible,
:is(#aesth-mk, .aesth-mk) input:focus-visible {
	outline: 2px solid var(--mk-ink);
	outline-offset: 2px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
	gap: var(--mk-gap);
	align-items: start;
}

/* ---------- Vorschau ---------- */

:is(#aesth-mk, .aesth-mk) .aesth-mk__stage {
	position: sticky;
	top: calc(var(--mk-header, 0px) + var(--mk-sticky-top));
	z-index: 2;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__stage-inner {
	background: var(--mk-paper);
	border-radius: var(--mk-radius);
	padding: clamp(8px, 2vw, 20px);
}

/* Breite setzt das Skript (--mk-frame-w), so dass die ganze Bühne auf den Bildschirm passt. */
:is(#aesth-mk, .aesth-mk) .aesth-mk__canvas-wrap {
	position: relative;
	display: block;
	width: var(--mk-frame-w, 100%);
	max-width: 100%;
	margin: 0 auto;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__canvas {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__hint {
	position: absolute;
	left: 50%;
	bottom: 6%;
	transform: translateX(-50%);
	background: var(--mk-ink);
	color: var(--mk-accent-ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.5em 0.9em;
	border-radius: var(--mk-radius);
	white-space: nowrap;
	pointer-events: none;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__hint[hidden] {
	display: none;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__spinner {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 18px;
	height: 18px;
	border: 2px solid var(--mk-line);
	border-top-color: var(--mk-ink);
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.2s;
	animation: aesth-mk-spin 0.8s linear infinite;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-loading .aesth-mk__spinner {
	opacity: 1;
	transition-delay: 0.25s;
}

@keyframes aesth-mk-spin {
	to {
		transform: rotate(360deg);
	}
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__sides {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-top: 10px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--mk-radius);
	padding: 0.45em 1em;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mk-ink-soft);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side[aria-pressed="true"] {
	color: var(--mk-ink);
	border-color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side:disabled {
	opacity: 0.35;
	cursor: default;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side .aesth-mk__icon svg {
	width: 13px;
	height: 13px;
}

/* Lupe neben dem Bild gibt es nur in der kompakten Handy-Ansicht. */
:is(#aesth-mk, .aesth-mk) .aesth-mk__side--zoom {
	display: none;
}

/* Klick auf die Bühne öffnet den Zoom. */
:is(#aesth-mk, .aesth-mk) .aesth-mk__canvas {
	cursor: zoom-in;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__zoom-btn {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--mk-ink);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: zoom-in;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__zoom-btn:hover {
	background: #fff;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__zoom-btn svg {
	width: 18px;
	height: 18px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__side.has-print .aesth-mk__side-dot {
	opacity: 1;
}

/* ---------- Schritte ---------- */

:is(#aesth-mk, .aesth-mk) .aesth-mk__panel {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__step {
	padding: 0 0 28px;
	margin: 0 0 28px;
	border-bottom: 1px solid var(--mk-line);
	transition: opacity 0.2s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__step.is-inactive {
	opacity: 0.45;
}

/* Aufleuchten nach dem automatischen Scrollen: Fläche hinter dem Schritt blendet kurz ein und wieder aus.
   (Schatten statt negativer Abstände – ragt nie über den Bildschirmrand.) */
:is(#aesth-mk, .aesth-mk) .aesth-mk__step {
	position: relative;
	isolation: isolate;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__step::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	left: 0;
	right: 0;
	bottom: 16px;
	border-radius: 2px;
	background: var(--mk-flash);
	box-shadow: 0 0 0 12px var(--mk-flash);
	opacity: 0;
	pointer-events: none;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__step.is-flash::before {
	animation: aesth-mk-flash 1.4s ease-out both;
}

/* „In den Warenkorb“: eigener Hintergrund (das Teilen-Menü darin muss frei überlappen können). */
:is(#aesth-mk, .aesth-mk) .aesth-mk__buy.is-flash {
	animation: aesth-mk-flash-bg 1.4s ease-out both;
}

@keyframes aesth-mk-flash {
	0% { opacity: 0; }
	14% { opacity: 1; }
	100% { opacity: 0; }
}

@keyframes aesth-mk-flash-bg {
	0% { background-color: transparent; box-shadow: 0 0 0 12px transparent; }
	14% { background-color: var(--mk-flash); box-shadow: 0 0 0 12px var(--mk-flash); }
	100% { background-color: transparent; box-shadow: 0 0 0 12px transparent; }
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__step-title {
	display: flex;
	align-items: baseline;
	gap: 0.75em;
	margin: 0 0 16px;
	padding: 0;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__num {
	font-variant-numeric: tabular-nums;
	color: var(--mk-ink-soft);
	font-weight: 600;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__field + .aesth-mk__field {
	margin-top: 18px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mk-ink-soft);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__placeholder {
	font-size: 0.9rem;
	color: var(--mk-ink-soft);
}

/* Basics */

:is(#aesth-mk, .aesth-mk) .aesth-mk__basics {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
	gap: 10px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	padding: 8px 8px 10px;
	background: var(--mk-surface);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	text-align: left;
	transition: border-color 0.15s, box-shadow 0.15s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic:hover {
	border-color: var(--mk-ink-soft);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic[aria-pressed="true"] {
	border-color: var(--mk-ink);
	box-shadow: inset 0 0 0 1px var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic-img {
	display: block;
	aspect-ratio: 2 / 3; /* wird pro Basic durch das Format des Beitragsbilds ersetzt */
	background: var(--mk-paper);
	margin-bottom: 4px;
	overflow: hidden;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic-name {
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.25;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__basic-price {
	margin-top: auto; /* immer unten in der Kachel, auch bei unterschiedlich langen Namen */
	padding-top: 4px;
	text-align: right;
	font-size: 0.78rem;
	color: var(--mk-ink-soft);
}

/* Pills (Größen, Motivgröße, Platzierung) */

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill-extra {
	margin-left: 0.15em;
	font-weight: 500;
	opacity: 0.7;
	white-space: nowrap;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill[aria-pressed="true"] .aesth-mk__pill-extra {
	opacity: 0.85;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__price-breakdown {
	flex-basis: 100%;
	font-size: 0.78rem;
	color: var(--mk-ink-soft);
	font-variant-numeric: tabular-nums;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill {
	min-width: 3em;
	padding: 0.6em 1em;
	background: var(--mk-surface);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill:hover:not(:disabled) {
	border-color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill[aria-pressed="true"] {
	background: var(--mk-accent);
	border-color: var(--mk-accent);
	color: var(--mk-accent-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill:disabled {
	opacity: 0.4;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__pill.is-soldout {
	text-decoration: line-through;
}

/* Motive */

:is(#aesth-mk, .aesth-mk) .aesth-mk__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__filters:empty {
	display: none;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__chip {
	padding: 0.35em 0.8em;
	background: transparent;
	border: 1px solid var(--mk-line);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__chip[aria-pressed="true"] {
	background: var(--mk-ink);
	border-color: var(--mk-ink);
	color: var(--mk-accent-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__search {
	flex: 1 1 160px;
	min-width: 0;
	padding: 0.5em 0.75em;
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	font: inherit;
	font-size: 0.85rem;
	color: inherit;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motifs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 8px;
	max-height: 460px;
	overflow-y: auto;
	padding: 2px;
	margin: -2px;
	scrollbar-width: thin;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 6px 8px;
	background: var(--mk-surface);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	text-align: left;
	transition: border-color 0.15s, box-shadow 0.15s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif[hidden] {
	display: none;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif:hover {
	border-color: var(--mk-ink-soft);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif[aria-pressed="true"] {
	border-color: var(--mk-ink);
	box-shadow: inset 0 0 0 1px var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif-img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	background: var(--mk-paper);
	padding: 14%;
	margin-bottom: 4px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif-img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif-name {
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__motif-sizes {
	font-size: 0.68rem;
	color: var(--mk-ink-soft);
	letter-spacing: 0.04em;
}

/* Druckfarben */

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 0;
	background: none;
	border: 0;
	min-width: 52px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch-chip {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: var(--mk-radius);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
	outline: 2px solid transparent;
	outline-offset: 3px;
	transition: outline-color 0.15s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch:hover .aesth-mk__swatch-chip {
	outline-color: var(--mk-line);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch[aria-pressed="true"] .aesth-mk__swatch-chip {
	outline-color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch-name {
	font-size: 0.72rem;
	font-weight: 600;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch[aria-pressed="true"] .aesth-mk__swatch-name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Mehrfarbige Motive */

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch.is-static {
	cursor: default;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__layer-colors {
	display: grid;
	grid-template-columns: minmax(70px, auto) 1fr;
	align-items: center;
	gap: 6px 14px;
	width: 100%;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__layer-name {
	font-size: 0.78rem;
	font-weight: 600;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__layer-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__layer-current {
	grid-column: 2;
	margin-top: -2px;
	font-size: 0.72rem;
	opacity: 0.75;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch.is-compact {
	min-width: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch.is-compact .aesth-mk__swatch-chip {
	width: 30px;
	height: 30px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__swatch.is-used .aesth-mk__swatch-chip {
	opacity: 0.45;
}

/* ---------- Kaufen ---------- */

:is(#aesth-mk, .aesth-mk) .aesth-mk__buy {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	min-height: 2em;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__price-amount {
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__price-note {
	font-size: 0.75rem;
	color: var(--mk-ink-soft);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__actions {
	display: flex;
	gap: 8px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__qty {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	flex: 0 0 auto;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-btn {
	width: 40px;
	background: none;
	border: 0;
	font-size: 1.1rem;
	line-height: 1;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-input {
	width: 44px;
	border: 0;
	background: none;
	text-align: center;
	font: inherit;
	font-weight: 700;
	color: inherit;
	-moz-appearance: textfield;
	appearance: textfield;
	padding: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-input::-webkit-outer-spin-button,
:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__buy-btn {
	flex: 1 1 auto;
	min-height: 54px;
	padding: 0.8em 1.4em;
	background: var(--mk-accent);
	color: var(--mk-accent-ink) !important;
	border: 0;
	border-radius: var(--mk-radius);
	font-size: 0.85rem !important;
	font-weight: 800;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	transition: opacity 0.15s, transform 0.1s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__buy-btn:hover:not(:disabled) {
	opacity: 0.88;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__buy-btn:active:not(:disabled) {
	transform: translateY(1px);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__buy-btn:disabled {
	background: var(--mk-line);
	color: var(--mk-ink-soft) !important;
	letter-spacing: 0.06em !important;
	text-transform: none !important;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__message {
	font-size: 0.9rem;
	min-height: 1.4em;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__message.is-success {
	color: var(--mk-success);
	font-weight: 600;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__message.is-error {
	color: var(--mk-error);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__cart-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-left: 0.25em;
}

/* ---------- Bearbeiten (aus dem Warenkorb) ---------- */

:is(#aesth-mk, .aesth-mk) .aesth-mk__edit-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	background: var(--mk-paper);
	border-left: 3px solid var(--mk-ink);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.35;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__add-new {
	align-self: flex-start;
	margin-top: -4px;
	padding: 2px 0;
	background: none;
	border: 0;
	font-size: 0.85rem;
	color: var(--mk-ink-soft);
	text-decoration: underline;
	text-underline-offset: 3px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__add-new:hover:not(:disabled) {
	color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__add-new:disabled {
	opacity: 0.5;
	cursor: default;
}

/* ---------- Teilen ---------- */

:is(#aesth-mk, .aesth-mk) .aesth-mk__share--below {
	padding-top: 14px;
	border-top: 1px solid var(--mk-line);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0.45em 0.95em;
	background: var(--mk-surface);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	color: var(--mk-ink);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-toggle:hover,
:is(#aesth-mk, .aesth-mk) .aesth-mk__share.is-open .aesth-mk__share-toggle {
	border-color: var(--mk-ink);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-toggle .aesth-mk__icon--down svg {
	width: 11px;
	height: 11px;
	transition: transform 0.2s;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share.is-open .aesth-mk__icon--down svg {
	transform: rotate(180deg);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share--below .aesth-mk__share-menu {
	margin-top: 8px;
	max-width: 340px;
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
}

/* Runder Button auf dem Bild (wie die Lupe), Menü klappt darunter auf. */
:is(#aesth-mk, .aesth-mk) .aesth-mk__share--image {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 6;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-fab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--mk-ink);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	cursor: pointer;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-fab:hover,
:is(#aesth-mk, .aesth-mk) .aesth-mk__share--image.is-open .aesth-mk__share-fab {
	background: #fff;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-fab svg {
	width: 16px;
	height: 16px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share--image .aesth-mk__share-menu {
	position: absolute;
	top: 46px;
	right: 0;
	width: 240px;
	max-width: calc(100vw - 40px);
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-list {
	display: flex;
	flex-direction: column;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 0.55em 0.95em;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--mk-line);
	border-radius: 0;
	color: var(--mk-ink) !important;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn:first-child {
	border-top: 0;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn:hover,
:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn:focus-visible {
	background: rgba(21, 21, 21, 0.05);
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn svg {
	width: 17px;
	height: 17px;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-btn.is-done {
	color: var(--mk-success) !important;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share.is-busy .aesth-mk__share-menu {
	cursor: progress;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-note {
	margin: 0;
	padding: 0.6em 0.95em;
	border-top: 1px solid var(--mk-line);
	color: var(--mk-ink-soft);
	font-size: 0.78rem;
	line-height: 1.4;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__share-field {
	display: block;
	width: calc(100% - 1.6em);
	margin: 0 0.8em 0.8em;
	padding: 0.5em 0.6em;
	border: 1px solid var(--mk-line);
	border-radius: var(--mk-radius);
	background: var(--mk-surface);
	color: inherit;
	font: inherit;
	font-size: 0.8rem;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__icon {
	display: inline-flex;
	flex: 0 0 auto;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__icon svg {
	display: block;
}

:is(#aesth-mk, .aesth-mk) :is(.aesth-mk__edit-note, .aesth-mk__add-new, .aesth-mk__share, .aesth-mk__share-menu, .aesth-mk__share-note, .aesth-mk__share-field)[hidden] {
	display: none !important;
}

:is(#aesth-mk, .aesth-mk) .aesth-mk__empty {
	font-size: 0.9rem;
	color: var(--mk-ink-soft);
}

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
	:is(#aesth-mk, .aesth-mk) .aesth-mk__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	/* Klebt direkt unter der Kopfzeile. */
	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage {
		top: calc(var(--mk-header, 0px) + var(--mk-sticky-top-mobile, 0px));
		margin: 0 -4px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage-inner {
		padding: 6px 6px 4px;
		box-shadow: 0 8px 16px -14px rgba(0, 0, 0, 0.4);
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__canvas-wrap {
		transition: width 0.25s ease;
	}

	/* Kompakt (beim Scrollen durch die Schritte): kleines Bild, Knöpfe rechts daneben.
	   Die Bühne behält ihre Höhe im Seitenfluss, damit nichts springt; der leere Rest
	   lässt Klicks durch. */
	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact {
		pointer-events: none;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__stage-inner {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		pointer-events: auto;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__canvas-wrap {
		flex: 0 0 auto;
		margin: 0;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__sides {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		margin: 0;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__side {
		justify-content: flex-start;
		padding: 0.55em 0.8em;
		font-size: 0.68rem;
		letter-spacing: 0.08em;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__side--zoom {
		display: inline-flex;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__zoom-btn {
		display: none;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__hint {
		bottom: 4%;
		max-width: 94%;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: 0.58rem;
		letter-spacing: 0.04em;
		padding: 0.35em 0.55em;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__spinner {
		top: 6px;
		left: 6px;
		width: 14px;
		height: 14px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__share--image {
		top: 6px;
		right: 6px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__share-fab {
		width: 30px;
		height: 30px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__share-fab svg {
		width: 13px;
		height: 13px;
	}

	/* Menü unter dem kleinen Knopf mittig aufklappen, damit es nicht aus dem Bildschirm ragt. */
	:is(#aesth-mk, .aesth-mk) .aesth-mk__stage.is-compact .aesth-mk__share--image .aesth-mk__share-menu {
		top: 38px;
		right: auto;
		left: 50%;
		transform: translateX(-50%);
		max-width: calc(100vw - 24px);
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__buy-btn {
		letter-spacing: 0.06em !important;
		font-size: 0.8rem !important;
		white-space: nowrap;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-btn {
		width: 34px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__qty-input {
		width: 36px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__sides {
		margin-top: 2px;
	}

	:is(#aesth-mk, .aesth-mk) .aesth-mk__motifs {
		max-height: 340px;
		grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.aesth-mk *,
	.aesth-mk *::before,
	.aesth-mk *::after {
		transition: none !important;
		animation: none !important;
	}

	/* Aufleuchten ist nur ein Farbwechsel ohne Bewegung – bleibt. */
	.aesth-mk .aesth-mk__step.is-flash::before {
		animation: aesth-mk-flash 1.4s ease-out both !important;
	}

	.aesth-mk .aesth-mk__buy.is-flash {
		animation: aesth-mk-flash-bg 1.4s ease-out both !important;
	}
}

/* Button auf Basic-Produktseiten */
.aesth-mk-product-link {
	margin-top: 1em;
}

/* Vorschau im Warenkorb */
img.aesth-mk-cart-preview {
	object-fit: cover;
	background: #fff;
}


/* ---------- Zoom ----------
 * Aufbau und Klassen wie die Zoombox des Themes (product-image.php); dessen CSS bestimmt das Aussehen.
 * Die Regeln hier sind die Grundlage, damit der Zoom auch mit anderen Themes funktioniert. */

.aesth-mk-zoom {
	display: none;
}

.activeZoomBox .aesth-mk-zoom {
	display: block;
	z-index: 1200;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow-y: scroll;
	background: var(--bs-body-bg, #fff);
}

.aesth-mk-zoom .carousel-item img {
	display: block;
	width: 100%;
	height: auto;
	cursor: zoom-out;
}

.aesth-mk-zoom__spinner {
	position: fixed;
	top: 2.4rem;
	left: 50%;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: rgba(0, 0, 0, 0.7);
	border-radius: 50%;
	opacity: 0;
	animation: aesth-mk-spin 0.8s linear infinite;
	pointer-events: none;
	z-index: 10000;
}

.aesth-mk-zoom.is-loading .aesth-mk-zoom__spinner {
	opacity: 1;
}

/* Ohne Bootstrap im Theme: Umschalten, Pfeile und Schließen selbst darstellen. */
.aesth-mk-zoom--plain .carousel-item {
	display: none;
}

.aesth-mk-zoom--plain .carousel-item.active {
	display: block;
}

.aesth-mk-zoom--plain .carousel-control-prev,
.aesth-mk-zoom--plain .carousel-control-next {
	position: fixed;
	top: 0;
	height: 100vh;
	width: 10%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 2.4rem;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
	cursor: pointer;
	z-index: 1201;
}

.aesth-mk-zoom--plain .carousel-control-prev {
	left: 0;
}

.aesth-mk-zoom--plain .carousel-control-next {
	right: 0;
}

.aesth-mk-zoom--plain :is(.carousel-control-prev-icon, .carousel-control-next-icon) svg {
	display: block;
	width: 34px;
	height: 34px;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

.aesth-mk-zoom--plain .visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.aesth-mk-zoom--plain .closeZoomBox {
	position: fixed;
	top: 2rem;
	right: 2rem;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	z-index: 9999;
}

.aesth-mk-zoom--plain .closeZoomBox {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #151515;
}

.aesth-mk-zoom--plain .closeZoomBox svg {
	display: block;
	width: 18px;
	height: 18px;
}
