/* Teufelskerle Accessoires – passt sich über die --tkt-Variablen dem Theme an. */

.tkm {
	--tkm-schwarz: var(--tkt-schwarz, #111);
	--tkm-rot: var(--tkt-rot, #E3001B);
	--tkm-dunkelrot: var(--tkt-teufelsrot, #B21622);
	--tkm-papier: var(--tkt-papier, #F4F1EE);
	--tkm-mass: var(--tkt-mass, #FAF046);
	--tkm-text: var(--tkt-text, #3B3431);
	--tkm-leise: var(--tkt-leise, #4A4441);
	--tkm-linie: var(--tkt-linie, #D9D2CC);
	--tkm-radius: var(--tkt-radius, 18px);
	box-sizing: border-box;
	max-width: min(1200px, calc(100% - 2 * var(--tkt-rand, 20px))) !important;
	margin-inline: auto !important;
	color: var(--tkm-text);
	font-size: 16px;
	line-height: 1.5;
}

.tkm *, .tkm *::before, .tkm *::after { box-sizing: border-box; }
.tkm [hidden] { display: none !important; }
.tkm h2 { margin: 0 0 .6em; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.tkm h3 { margin: 0 0 .4em; font-size: 1.25rem; }
.tkm-leise { color: var(--tkm-leise); font-size: .92em; }

/* Felder */
.tkm input[type="text"],
.tkm input[type="number"],
.tkm input[type="date"],
.tkm input[type="search"],
.tkm select,
.tkm textarea {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 10px;
	background: #fff;
	color: var(--tkm-schwarz);
	font: inherit;
}

.tkm textarea { min-height: 88px; }
.tkm input:focus, .tkm select:focus, .tkm textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--tkm-rot); }
.tkm input[type="checkbox"], .tkm input[type="radio"] { width: 20px; height: 20px; accent-color: var(--tkm-rot); }

.tkm-feld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; border: 0; padding: 0; }
.tkm-feld > span, .tkm-feld > legend { font-weight: 700; }
.tkm-haken { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; margin: 4px 0; }

.tkm-raster {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0 16px;
	align-items: end;
}
.tkm-feld--breit { grid-column: 1 / -1; }

/* Knöpfe */
.tkm-knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 18px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	color: var(--tkm-schwarz);
	font: inherit;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}
.tkm-knopf--rot { background: var(--tkm-rot); color: #fff; }
.tkm-knopf:hover, .tkm-knopf:focus-visible { background: var(--tkm-mass); color: var(--tkm-schwarz); }
.tkm-knopf:disabled { opacity: .5; cursor: wait; }
.tkm-knopf--klein { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.tkm-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Karten und Meldungen */
.tkm-karte {
	margin: 0 0 24px;
	padding: 20px;
	border: 3px solid var(--tkm-schwarz);
	border-radius: var(--tkm-radius);
	background: #fff;
	box-shadow: 6px 6px 0 var(--tkm-schwarz);
}

.tkm-meldung {
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 2px solid var(--tkm-schwarz);
	border-left-width: 8px;
	border-radius: 10px;
	background: #e3f4e5;
	font-weight: 600;
}
.tkm-meldung--fehler { border-left-color: var(--tkm-rot); background: #fde2e1; }
.tkm-meldung--warnung { border-left-color: #c98a00; background: #fff4d6; }

.tkm-hinweis { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--tkm-papier); }
.tkm-hinweis p { margin: 4px 0 0; }
.tkm-schluss { font-weight: 800; }

/* Shop */
.tkm-artikel {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 24px;
}

.tkm-artikelkarte {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 3px solid var(--tkm-schwarz);
	border-radius: var(--tkm-radius);
	background: #fff;
	box-shadow: 6px 6px 0 var(--tkm-schwarz);
}
.tkm-bild { aspect-ratio: 1 / 1; background: var(--tkm-papier); border-bottom: 3px solid var(--tkm-schwarz); }
.tkm-bild img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tkm-artikelinhalt { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.tkm-preis { margin: 0 0 8px; color: var(--tkm-rot); font-size: 1.3rem; font-weight: 900; }
.tkm-beschreibung { font-size: .95rem; }
.tkm-beschreibung p { margin: 0 0 .6em; }

.tkm-varianten { width: 100%; margin-top: auto; border-collapse: collapse; }
.tkm-varianten th, .tkm-varianten td { padding: 6px 4px; border-top: 1px solid var(--tkm-linie); text-align: left; vertical-align: middle; }
.tkm-varianten th { font-weight: 700; }
.tkm-zpreis, .tkm-zbestand { color: var(--tkm-leise); font-size: .88rem; white-space: nowrap; }
.tkm-zmenge { width: 84px; }
.tkm-zmenge input { text-align: center; }
.tkm-varianten tr.ist-aus th { color: var(--tkm-leise); text-decoration: line-through; }

.tkm-artikelkarte.ist-aus .tkm-bild img { opacity: .45; filter: grayscale(1); }
.tkm-bild { position: relative; }
.tkm-stempel {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 4px 12px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	font-weight: 800;
	transform: rotate(-4deg);
}

/* Größen als runde Knöpfe */
.tkm-auswahl { margin-top: auto; padding-top: 8px; }
.tkm-groessen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tkm-groesse {
	min-width: 48px;
	height: 42px;
	padding: 0 12px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	color: var(--tkm-schwarz);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	transition: transform .1s, box-shadow .1s;
}
.tkm-groesse:hover { background: var(--tkm-mass); }
.tkm-groesse[aria-checked="true"] { background: var(--tkm-schwarz); color: #fff; box-shadow: 3px 3px 0 var(--tkm-rot); transform: translate(-1px, -1px); }
.tkm-groesse.ist-aus { border-style: dashed; border-color: var(--tkm-linie); color: var(--tkm-leise); text-decoration: line-through; cursor: not-allowed; background: var(--tkm-papier); }
.tkm-groesse:focus-visible, .tkm-stepper button:focus-visible, .tkm-korbknopf:focus-visible, .tkm-rund:focus-visible { outline: 3px solid var(--tkm-rot); outline-offset: 2px; }
.tkm-groessenwahl { display: block; margin: 0 0 8px; }
.tkm-frei { min-height: 1.4em; margin: 0 0 8px; color: var(--tkm-leise); font-size: .88rem; font-weight: 600; }

/* Menge und „In den Warenkorb“ */
.tkm-kaufen { display: flex; gap: 10px; align-items: center; }
.tkm-stepper {
	display: inline-flex;
	flex: none;
	align-items: center;
	height: 44px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}
.tkm-stepper button {
	width: 38px;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--tkm-schwarz);
	font: inherit;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}
.tkm-stepper button:hover { background: var(--tkm-mass); }
.tkm-stepper output { min-width: 26px; text-align: center; font-weight: 800; }
.tkm-stepper--klein { height: 34px; }
.tkm-stepper--klein button { width: 30px; font-size: 1.05rem; }
.tkm-dazu { flex: 1; white-space: nowrap; }
.tkm-dazu.ist-drin { background: var(--tkm-schwarz); color: #fff; }
.tkm-kartenfehler, .tkm-korbfehler { min-height: 0; margin: 6px 0 0; color: var(--tkm-dunkelrot); font-size: .9rem; font-weight: 700; }
.tkm-kartenfehler:empty, .tkm-korbfehler:empty { display: none; }

/* Warenkorb: Leiste unten, Liste klappt darüber auf */
.tkm-korb { position: sticky; bottom: 12px; z-index: 20; }
.tkm-korbleiste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px 10px 10px;
	border: 3px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: var(--tkm-mass);
	box-shadow: 4px 4px 0 var(--tkm-schwarz);
}
.tkm-korbknopf {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 4px 14px 4px 6px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tkm-schwarz);
	font: inherit;
	cursor: pointer;
}
.tkm-korbknopf:hover { background: rgba(255, 255, 255, .55); }
.tkm-tasche {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 50%;
	background: #fff;
}
.tkm-anzahl {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	font-size: .8rem;
	font-weight: 900;
	line-height: 20px;
	text-align: center;
}
.tkm-anzahl.ist-voll { background: var(--tkm-rot); color: #fff; }
.tkm-korbsumme { font-weight: 800; }
.tkm-hupf .tkm-tasche { animation: tkm-hupf .45s ease; }
@keyframes tkm-hupf { 30% { transform: translateY(-6px) rotate(-8deg); } 60% { transform: translateY(0) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .tkm-hupf .tkm-tasche { animation: none; } .tkm-groesse { transition: none; } }

.tkm-korbpanel {
	max-height: min(60vh, 520px);
	overflow-y: auto;
	margin: 0 0 12px;
	padding: 16px 18px;
	border: 3px solid var(--tkm-schwarz);
	border-radius: var(--tkm-radius);
	background: #fff;
	box-shadow: 6px 6px 0 var(--tkm-schwarz);
}
.tkm-korbpanel > * { margin-block: 0; }
.tkm-korbkopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px !important; }
.tkm-korbkopf h2 { margin: 0 !important; font-size: 1.4rem; line-height: 1.2; }
.tkm-korbgesamt { margin-top: 12px !important; }

/* Der „Nach oben“-Knopf des Themes läge sonst über „Weiter zur Übersicht“. */
body:has(.tkm-korb) .tkt-nach-oben { display: none; }
.tkm-rund {
	width: 38px;
	height: 38px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 50%;
	background: #fff;
	color: var(--tkm-schwarz);
	font: inherit;
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}
.tkm-rund:hover { background: var(--tkm-mass); }
.tkm-rund--klein { width: 30px; height: 30px; font-size: 1.05rem; }
.tkm-korbliste { margin: 0; padding: 0; list-style: none; }
.tkm-korbliste li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto auto;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--tkm-linie);
}
.tkm-korbliste li.tkm-korbleer { display: block; color: var(--tkm-leise); }
.tkm-korbname { font-weight: 700; }
.tkm-korbgroesse {
	display: inline-block;
	margin-left: 6px;
	padding: 0 8px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 800;
}
.tkm-korbpreis { min-width: 76px; text-align: right; font-weight: 700; white-space: nowrap; }
.tkm-korbgesamt { display: flex; justify-content: space-between; margin: 12px 0 0; font-size: 1.1rem; }
.tkm-korbgesamt strong { color: var(--tkm-rot); font-weight: 900; }

/* Tabellen */
.tkm-tabellenrahmen { overflow-x: auto; margin: 0 0 16px; }
.tkm-tabelle { width: 100%; border-collapse: collapse; background: #fff; }
.tkm-tabelle th, .tkm-tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--tkm-linie); text-align: left; vertical-align: top; }
.tkm-tabelle thead th { border-bottom: 3px solid var(--tkm-schwarz); font-size: .9rem; }
.tkm-tabelle tfoot th, .tkm-tabelle tfoot td { border-top: 2px solid var(--tkm-schwarz); border-bottom: 0; }
.tkm-tabelle .tkm-zahl { text-align: right; white-space: nowrap; }
.tkm-liste tbody tr:hover { background: var(--tkm-papier); }
.tkm-liste tr.ist-inaktiv { opacity: .6; }
.tkm-mini img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.tkm-variantenpflege input { min-width: 80px; }

/* Status */
.tkm-status {
	display: inline-block;
	padding: 2px 10px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	font-size: .82rem;
	font-weight: 800;
	white-space: nowrap;
}
.tkm-status--offen { background: var(--tkm-mass); }
.tkm-status--bestellt { background: #dbe9ff; }
.tkm-status--ausgegeben, .tkm-status--bezahlt { background: #d6f0d9; }
.tkm-status--storniert { background: var(--tkm-papier); color: var(--tkm-leise); text-decoration: line-through; }
.tkm-status--unbezahlt { background: #fde2e1; }

.tkm-bestellkopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.tkm-bestellkopf h2, .tkm-bestellkopf h3 { margin: 0 8px 0 0; }

.tkm-storno { margin-top: 12px; }
.tkm-storno summary { cursor: pointer; color: var(--tkm-dunkelrot); font-weight: 700; }
.tkm-storno form { margin-top: 8px; }

/* Verwaltung */
.tkm-reiter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tkm-reiter a {
	padding: 8px 16px;
	border: 2px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	color: var(--tkm-schwarz);
	font-weight: 800;
	text-decoration: none;
}
.tkm-reiter a[aria-current="page"] { background: var(--tkm-schwarz); color: #fff; }
.tkm-reiter a:hover { background: var(--tkm-mass); color: var(--tkm-schwarz); }

.tkm-modus { margin: 0 0 16px; font-weight: 700; }
.tkm-modus--offen::before { content: "● "; color: #2e7d32; }
.tkm-modus--test::before { content: "● "; color: #c98a00; }
.tkm-modus--geschlossen::before { content: "● "; color: var(--tkm-rot); }

.tkm-filter, .tkm-sammel {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px 12px;
	margin: 0 0 16px;
}
.tkm-filter label, .tkm-sammel label { display: flex; flex-direction: column; gap: 2px; min-width: 150px; font-size: .9rem; font-weight: 700; }
.tkm-seiten { display: flex; align-items: center; gap: 12px; }

.tkm-verlauf { margin: 0; padding-left: 1.2em; font-size: .92rem; }

/* Abrechnung */
.tkm-kacheln { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 20px; }
.tkm-kachel {
	display: flex;
	flex-direction: column;
	min-width: 220px;
	padding: 14px 18px;
	border: 3px solid var(--tkm-schwarz);
	border-radius: var(--tkm-radius);
	background: var(--tkm-mass);
	box-shadow: 4px 4px 0 var(--tkm-schwarz);
}
.tkm-kachel span { font-weight: 700; }
.tkm-kachel strong { font-size: 1.8rem; font-weight: 900; }
.tkm-kachel small { color: var(--tkm-leise); }
.tkm-abrechnungsliste td { vertical-align: top; }
.tkm-zweck { font-size: .9rem; }
.tkm-bank > div { margin: 0 0 4px; }
.tkm-bank code { padding: 2px 6px; border-radius: 6px; background: var(--tkm-papier); font-size: .9rem; white-space: nowrap; }
.tkm-kopieren {
	margin-left: 4px;
	padding: 1px 8px;
	border: 1px solid var(--tkm-schwarz);
	border-radius: 999px;
	background: #fff;
	color: var(--tkm-schwarz);
	font: inherit;
	font-size: .78rem;
	font-weight: 700;
	cursor: pointer;
}
.tkm-kopieren:hover { background: var(--tkm-mass); }
.tkm-kopieren.ist-kopiert { background: #d6f0d9; }
.tkm-warnung { display: block; margin-top: 4px; color: var(--tkm-dunkelrot); }
.tkm-status--bestaetigt { background: #ffe2b8; }
.tkm-schnell .tkm-knoepfe { align-items: center; margin-top: 8px; }
.tkm-schnell form { margin: 0; }

@media (max-width: 640px) {
	.tkm-karte { padding: 16px; box-shadow: 4px 4px 0 var(--tkm-schwarz); }
	.tkm-korbleiste { border-radius: var(--tkm-radius); }
	.tkm-korbleiste .tkm-knopf { width: 100%; }
	.tkm-korbknopf { width: 100%; }
	.tkm-korbliste li { grid-template-columns: minmax(0, 1fr) auto auto; }
	.tkm-korbliste li .tkm-stepper { grid-column: 1; justify-self: start; }
	.tkm-korbpanel { max-height: 55vh; }
	.tkm-filter label, .tkm-sammel label { flex: 1 1 100%; }
}
