/**
 * SD Maschinen – Frontend (Übersicht, Detailseite, Teaser)
 *
 * Farben und Abstände als Variablen – im Child-Theme überschreibbar:
 *   .sdm { --sdm-akzent: #C84A26; }
 * Schrift wird vom Theme geerbt (League Spartan).
 */

.sdm {
	--sdm-akzent: #c84a26;
	--sdm-akzent-dunkel: #a63c1e;
	--sdm-dunkel: #141414;
	--sdm-grau: #6b6b6b;
	--sdm-linie: #e2e2e2;
	--sdm-flaeche: #f5f5f5;
	--sdm-gruen: #2e7d32;
	--sdm-rot: #c62828;
	--sdm-radius: 4px;
	--sdm-abstand: 24px;

	color: var(--sdm-dunkel);
	line-height: 1.5;
}

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

.sdm p {
	padding-bottom: 0;
}

/* ==========================================================
   Buttons
   ========================================================== */
.sdm .sdm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px 24px;
	border: 2px solid var(--sdm-dunkel);
	border-radius: var(--sdm-radius);
	background: transparent;
	color: var(--sdm-dunkel);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .02em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .2s, color .2s, border-color .2s;
}

.sdm .sdm-btn--primaer {
	border-color: var(--sdm-akzent);
	background: var(--sdm-akzent);
	color: #fff;
}

.sdm .sdm-btn--primaer:hover,
.sdm .sdm-btn--primaer:focus-visible {
	border-color: var(--sdm-akzent-dunkel);
	background: var(--sdm-akzent-dunkel);
	color: #fff;
}

.sdm .sdm-btn--rahmen:hover,
.sdm .sdm-btn--rahmen:focus-visible {
	background: var(--sdm-dunkel);
	color: #fff;
}

.sdm-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	background: currentColor;
	-webkit-mask: var(--sdm-icon) center / contain no-repeat;
	mask: var(--sdm-icon) center / contain no-repeat;
}

.sdm-icon--wa {
	--sdm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.04 2a9.9 9.9 0 0 0-8.5 14.98L2 22l5.15-1.5A9.9 9.9 0 1 0 12.04 2Zm0 18.1a8.2 8.2 0 0 1-4.18-1.15l-.3-.18-3.06.89.9-2.98-.2-.31a8.2 8.2 0 1 1 6.84 3.73Zm4.5-6.14c-.25-.12-1.46-.72-1.69-.8-.23-.08-.39-.12-.55.12-.16.25-.63.8-.78.97-.14.16-.29.18-.53.06a6.7 6.7 0 0 1-1.98-1.22 7.4 7.4 0 0 1-1.37-1.7c-.14-.25 0-.38.11-.5.11-.11.25-.29.37-.43.12-.15.16-.25.25-.41.08-.17.04-.31-.02-.43-.06-.13-.55-1.33-.76-1.82-.2-.48-.4-.41-.55-.42h-.47a.9.9 0 0 0-.66.31 2.77 2.77 0 0 0-.86 2.06 4.8 4.8 0 0 0 1 2.55 11 11 0 0 0 4.22 3.73c.59.25 1.05.4 1.41.52.59.19 1.13.16 1.56.1.47-.07 1.46-.6 1.66-1.18.21-.58.21-1.07.15-1.18-.06-.1-.22-.16-.47-.29Z'/%3E%3C/svg%3E");
}

.sdm-icon--mail {
	--sdm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 4-8 5-8-5V6l8 5 8-5v2Z'/%3E%3C/svg%3E");
}

.sdm-icon--tel {
	--sdm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2Z'/%3E%3C/svg%3E");
}

/* ==========================================================
   Raster + Kachel (Übersicht und Teaser)
   ========================================================== */
.sdm-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--sdm-abstand);
}

.sdm-kachel {
	position: relative;
	margin: 0;
	border: 1px solid var(--sdm-linie);
	border-radius: var(--sdm-radius);
	background: #fff;
	overflow: hidden;
	transition: box-shadow .25s, transform .25s;
}

.sdm-kachel:hover {
	box-shadow: 0 10px 28px rgba(20, 20, 20, .12);
	transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
	.sdm-kachel,
	.sdm-kachel:hover {
		transition: none;
		transform: none;
	}
}

.sdm-kachel-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.sdm-kachel-link:focus-visible {
	outline: 3px solid var(--sdm-akzent);
	outline-offset: -3px;
}

.sdm-kachel-bild,
.sdm-galerie-haupt {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--sdm-flaeche);
	overflow: hidden;
}

.sdm-kachel-bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sdm-kein-bild {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--sdm-grau);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.sdm-kachel-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 8px;
	padding: 16px 18px 18px;
}

.sdm .sdm-kachel-titel {
	margin: 0;
	padding: 0;
	color: var(--sdm-dunkel);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.sdm-kachel-zustand {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	color: var(--sdm-grau);
	font-size: 14px;
}

.sdm-kachel-zustand strong {
	color: var(--sdm-dunkel);
}

.sdm-kachel-preis {
	margin: auto 0 0;
	padding-top: 6px;
}

/* ==========================================================
   Preis
   ========================================================== */
.sdm-preis {
	color: var(--sdm-dunkel);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.sdm-preis-vb {
	font-size: .7em;
	font-weight: 600;
	color: var(--sdm-grau);
}

.sdm-preis--anfrage {
	font-size: 18px;
	color: var(--sdm-akzent);
}

.sdm-preis--verkauft {
	color: var(--sdm-rot);
	text-transform: uppercase;
}

.sdm-preis-mwst {
	display: block;
	margin-top: 4px;
	color: var(--sdm-grau);
	font-size: 14px;
	font-weight: 400;
}

/* ==========================================================
   Badges und Verkauft-Band
   ========================================================== */
.sdm-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: calc(100% - 24px);
}

.sdm-badge {
	padding: 5px 10px;
	border-radius: var(--sdm-radius);
	background: var(--sdm-dunkel);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sdm-badge--neu {
	background: var(--sdm-akzent);
}

.sdm-badge--reserviert {
	background: #f2a900;
	color: var(--sdm-dunkel);
}

.sdm-badge--mehrfach {
	background: #fff;
	color: var(--sdm-dunkel);
	box-shadow: 0 0 0 1px var(--sdm-dunkel) inset;
}

/* Rotes Band quer über das Bild */
.sdm-band {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	width: 160%;
	padding: 10px 0;
	background: var(--sdm-rot);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .2em;
	text-align: center;
	text-transform: uppercase;
	transform: translate(-50%, -50%) rotate(-20deg);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	pointer-events: none;
}

.sdm-ist-verkauft .sdm-kachel-bild img,
.sdm-ist-verkauft .sdm-galerie-bild {
	filter: grayscale(.7);
	opacity: .75;
}

/* ==========================================================
   Zustand
   ========================================================== */
.sdm-balken {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 3px;
	width: 100%;
	max-width: 220px;
}

.sdm-balken span {
	height: 6px;
	border-radius: 1px;
	background: var(--sdm-linie);
}

.sdm-balken .sdm-voll {
	background: var(--sdm-akzent);
}

/* ==========================================================
   Teaser + Blättern + Leer
   ========================================================== */
.sdm-teaser-mehr,
.sdm-blaettern {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: calc(var(--sdm-abstand) * 1.5);
}

.sdm-blaettern-info {
	color: var(--sdm-grau);
	font-size: 14px;
}

.sdm-leer,
.sdm-hinweis {
	padding: 24px;
	border: 2px dashed var(--sdm-linie);
	border-radius: var(--sdm-radius);
	text-align: center;
}

/* ==========================================================
   Detailseite
   ========================================================== */
.sdm-zurueck {
	margin: 0 0 16px;
	font-size: 15px;
}

.sdm-zurueck a {
	color: var(--sdm-grau);
	text-decoration: none;
}

.sdm-zurueck a:hover {
	color: var(--sdm-akzent);
}

.sdm-detail-oben {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: calc(var(--sdm-abstand) * 1.5);
	align-items: start;
}

@media (max-width: 980px) {
	.sdm-detail-oben {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--sdm-abstand);
	}
}

/* Galerie */
.sdm-galerie-haupt {
	border-radius: var(--sdm-radius);
}

.sdm-galerie-oeffnen {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.sdm-galerie-bild {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sdm-galerie-leiste {
	display: flex;
	gap: 8px;
	margin: 10px 0 0;
	padding: 0 0 4px;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
}

.sdm-galerie-leiste li {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sdm-galerie-mini {
	display: block;
	width: 76px;
	height: 76px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--sdm-radius);
	background: var(--sdm-flaeche);
	overflow: hidden;
	cursor: pointer;
	opacity: .7;
	transition: opacity .2s, border-color .2s;
}

.sdm-galerie-mini img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sdm-galerie-mini:hover,
.sdm-galerie-mini.sdm-aktiv {
	opacity: 1;
}

.sdm-galerie-mini.sdm-aktiv {
	border-color: var(--sdm-akzent);
}

/* Infos */
.sdm-kicker {
	margin: 0 0 6px;
	color: var(--sdm-akzent);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.sdm .sdm-detail-titel {
	margin: 0 0 16px;
	padding: 0;
	color: var(--sdm-dunkel);
	font-size: clamp(26px, 4vw, 38px);
	font-weight: 700;
	line-height: 1.15;
}

.sdm-detail-preis {
	margin-bottom: 20px;
}

.sdm-detail-preis .sdm-preis {
	font-size: 32px;
}

.sdm-detail-preis .sdm-preis--anfrage {
	font-size: 24px;
}

.sdm-zustand {
	margin-bottom: 16px;
	padding: 16px 18px;
	border-radius: var(--sdm-radius);
	background: var(--sdm-flaeche);
}

.sdm-zustand-kopf {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 10px;
}

.sdm-zustand-wert {
	color: var(--sdm-akzent);
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
}

.sdm-zustand-wert small {
	color: var(--sdm-grau);
	font-size: 16px;
}

.sdm-zustand-name {
	font-size: 18px;
	font-weight: 700;
}

.sdm-zustand .sdm-balken {
	max-width: none;
}

.sdm-zustand-text {
	margin: 10px 0 0;
	color: var(--sdm-grau);
	font-size: 15px;
}

.sdm-maengel {
	margin-bottom: 16px;
	padding: 14px 18px;
	border-left: 4px solid var(--sdm-akzent);
	background: #fdf3f0;
}

.sdm-maengel p {
	margin: 0;
}

.sdm-maengel .sdm-maengel-titel {
	margin-bottom: 4px;
	font-weight: 700;
}

.sdm-hinweis-mehrfach {
	margin: 0 0 16px;
	font-weight: 600;
}

.sdm-aktionen {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 20px 0 16px;
}

.sdm-aktionen .sdm-btn {
	width: 100%;
	text-transform: none;
}

.sdm-verkauft-hinweis {
	margin: 20px 0 16px;
	padding: 18px;
	border: 2px solid var(--sdm-rot);
	border-radius: var(--sdm-radius);
}

.sdm-verkauft-hinweis p {
	margin: 0 0 12px;
}

.sdm-verkauft-hinweis p:last-child {
	margin-bottom: 0;
}

.sdm-kleinanzeigen {
	margin: 0;
	font-size: 15px;
}

.sdm-kleinanzeigen a {
	color: var(--sdm-grau);
}

.sdm-kleinanzeigen a:hover {
	color: var(--sdm-akzent);
}

/* Beschreibung + technische Daten */
.sdm-detail-unten {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: calc(var(--sdm-abstand) * 1.5);
	margin-top: calc(var(--sdm-abstand) * 2);
	padding-top: calc(var(--sdm-abstand) * 1.5);
	border-top: 1px solid var(--sdm-linie);
}

@media (max-width: 980px) {
	.sdm-detail-unten {
		grid-template-columns: minmax(0, 1fr);
	}
}

.sdm .sdm-detail-unten h2 {
	margin: 0 0 14px;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.sdm-beschreibung p {
	margin: 0 0 1em;
}

.sdm-technik dl {
	margin: 0;
}

.sdm-technik dl > div {
	display: grid;
	grid-template-columns: minmax(110px, 40%) 1fr;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--sdm-linie);
}

.sdm-technik dt {
	color: var(--sdm-grau);
	font-weight: 600;
}

.sdm-technik dd {
	margin: 0;
}

.sdm-technik .sdm-technik-frei {
	grid-template-columns: 1fr;
}

.sdm-technik .sdm-technik-frei dt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ==========================================================
   Lightbox
   ========================================================== */
.sdm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 20, 20, .95);
	touch-action: pan-y;
}

.sdm-lightbox[hidden] {
	display: none;
}

.sdm-lightbox img {
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 120px);
	object-fit: contain;
	user-select: none;
}

.sdm-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.sdm-lightbox button:hover,
.sdm-lightbox button:focus-visible {
	background: var(--sdm-akzent, #c84a26);
}

.sdm-lb-zu {
	top: 16px;
	right: 16px;
}

.sdm-lb-zurueck {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.sdm-lb-weiter {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.sdm-lb-zaehler {
	position: absolute;
	bottom: 20px;
	left: 50%;
	color: #fff;
	font-size: 15px;
	transform: translateX(-50%);
}

@media (max-width: 600px) {
	.sdm-lb-zurueck,
	.sdm-lb-weiter {
		top: auto;
		bottom: 8px;
		transform: none;
	}
}

body.sdm-lightbox-offen {
	overflow: hidden;
}

/* ==========================================================
   Anfrage-Formular (Detailseite)
   ========================================================== */
.sdm-anfrage {
	margin: 0 0 16px;
	padding: 18px;
	border: 1px solid var(--sdm-linie);
	border-radius: var(--sdm-radius);
	background: var(--sdm-flaeche);
}

.sdm-anfrage[hidden] {
	display: none;
}

.sdm .sdm-anfrage-titel {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
}

.sdm-anfrage-feld {
	margin: 0 0 12px;
}

.sdm-anfrage-feld label {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	font-weight: 600;
}

.sdm-anfrage input[type="text"],
.sdm-anfrage input[type="tel"],
.sdm-anfrage input[type="email"],
.sdm-anfrage textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid #cfcfcf;
	border-radius: var(--sdm-radius);
	background: #fff;
	color: var(--sdm-dunkel);
	font: inherit;
	font-size: 16px;
}

.sdm-anfrage textarea {
	min-height: 110px;
	resize: vertical;
}

.sdm-anfrage input:focus,
.sdm-anfrage textarea:focus {
	border-color: var(--sdm-akzent);
	outline: 2px solid rgba(200, 74, 38, .25);
}

.sdm-anfrage-zwei {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 12px;
}

@media (min-width: 600px) {
	.sdm-anfrage-zwei {
		grid-template-columns: 1fr 1fr;
	}
}

.sdm-anfrage-hinweis {
	margin: -4px 0 12px;
	color: var(--sdm-grau);
	font-size: 14px;
}

.sdm-anfrage-ds label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.45;
	cursor: pointer;
}

.sdm-anfrage-ds input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	accent-color: var(--sdm-akzent);
}

.sdm-anfrage-ds a {
	color: var(--sdm-akzent);
}

.sdm-anfrage-honig {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sdm .sdm-anfrage-senden {
	width: 100%;
	margin-top: 4px;
}

.sdm-anfrage-meldung {
	margin: 0 0 12px;
	padding: 12px 14px;
	border-left: 4px solid var(--sdm-grau);
	border-radius: 4px;
	background: #fff;
	font-size: 15px;
}

.sdm-anfrage-meldung[hidden] {
	display: none;
}

.sdm-anfrage-meldung p {
	margin: 0;
}

.sdm-anfrage-meldung--ok {
	border-color: var(--sdm-gruen);
}

.sdm-anfrage-meldung--fehler {
	border-color: var(--sdm-rot);
	color: var(--sdm-rot);
}

.sdm button.sdm-btn {
	font-family: inherit;
	cursor: pointer;
}

.sdm-anfrage-form [hidden] {
	display: none !important;
}

/* ==========================================================
   Feste Spaltenzahl (Einstellung „Spalten am Desktop“)
   Desktop 3 oder 4 · Tablet 2 · Handy 2 kompakt
   ========================================================== */
@media (min-width: 981px) {
	.sdm-raster--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sdm-raster--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.sdm-raster--4 .sdm-kachel-titel {
		font-size: 16px;
	}
}

@media (min-width: 600px) and (max-width: 980px) {
	.sdm-raster--3,
	.sdm-raster--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.sdm-raster--3,
	.sdm-raster--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.sdm-raster--3 .sdm-kachel-text,
	.sdm-raster--4 .sdm-kachel-text {
		gap: 6px;
		padding: 10px 10px 12px;
	}

	.sdm .sdm-raster--3 .sdm-kachel-titel,
	.sdm .sdm-raster--4 .sdm-kachel-titel {
		font-size: 14px;
		line-height: 1.25;
		/* höchstens 3 Zeilen */
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.sdm-raster--3 .sdm-kachel-zustand span:not(.sdm-balken),
	.sdm-raster--4 .sdm-kachel-zustand span:not(.sdm-balken) {
		font-size: 12px;
	}

	.sdm-raster--3 .sdm-preis,
	.sdm-raster--4 .sdm-preis {
		font-size: 17px;
	}

	.sdm-raster--3 .sdm-preis--anfrage,
	.sdm-raster--4 .sdm-preis--anfrage {
		font-size: 14px;
	}

	.sdm-raster--3 .sdm-badges,
	.sdm-raster--4 .sdm-badges {
		top: 6px;
		left: 6px;
		gap: 4px;
	}

	.sdm-raster--3 .sdm-badge,
	.sdm-raster--4 .sdm-badge {
		padding: 3px 6px;
		font-size: 10px;
	}

	.sdm-raster--3 .sdm-band,
	.sdm-raster--4 .sdm-band {
		padding: 5px 0;
		font-size: 14px;
	}
}

/* Teaser: weitere Kacheln erst nach „Mehr Angebote anzeigen“ */
.sdm-teaser:not(.sdm-offen) .sdm-zusatz {
	display: none;
}

.sdm-mehr-zahl {
	font-weight: 400;
	text-transform: none;
}

@media (max-width: 599px) {
	.sdm-teaser-mehr .sdm-btn {
		width: 100%;
	}
}

.sdm-mehr-zahl {
	white-space: nowrap;
}

/* Grid-Kinder dürfen schmaler als ihr Inhalt werden – sonst schiebt die
   waagerecht scrollende Foto-Leiste die Detailseite am Handy breiter als den Bildschirm. */
.sdm-detail-oben > *,
.sdm-detail-unten > *,
.sdm-galerie {
	min-width: 0;
}

/* ==========================================================
   1.3.0 – Neue Maschine, Versand, Maschinenarchiv
   ========================================================== */

/* Heller Button für orange oder dunkle Flächen (Archiv „Mehr anzeigen“) */
.sdm .sdm-btn--weiss {
	border-color: #fff;
	color: #fff;
}

.sdm .sdm-btn--weiss:hover,
.sdm .sdm-btn--weiss:focus-visible {
	background: #fff;
	color: var(--sdm-dunkel);
}

/* Neuware: Neue Maschine / Neues Zubehör (orange) */
.sdm-neu-label {
	display: inline-block;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: var(--sdm-radius);
	background: var(--sdm-akzent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.sdm-neu-box {
	margin-bottom: 16px;
	padding: 16px 18px;
	border: 2px solid var(--sdm-akzent);
	border-radius: var(--sdm-radius);
	background: #fdf3f0;
}

.sdm-neu-box p {
	margin: 0 0 10px;
}

.sdm-neu-box p:last-child {
	margin-bottom: 0;
}

.sdm-neu-box .sdm-neu-label {
	padding: 6px 14px;
	font-size: 16px;
}

.sdm-garantie-box {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-left: 3px solid var(--sdm-akzent);
	background: #fff;
}

.sdm-neu-box .sdm-garantie-box p {
	margin: 0 0 4px;
}

.sdm-neu-box .sdm-garantie-box p:last-child {
	margin-bottom: 0;
}

.sdm-garantie {
	font-size: 17px;
}

.sdm-garantie-hinweis {
	font-size: 14px;
	font-weight: 600;
}

.sdm-gewaehrleistung {
	color: var(--sdm-grau);
	font-size: 14px;
}

/* Versand (Kachel) */
.sdm-versand {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
}

.sdm-versand li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sdm-versand-zeile {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--sdm-dunkel);
	font-weight: 600;
	line-height: 1.3;
}

.sdm-haken {
	flex: 0 0 auto;
	fill: var(--sdm-gruen);
}

.sdm-abholung-icon {
	flex: 0 0 auto;
	fill: var(--sdm-grau);
}

.sdm-versand-zeile--abholung {
	color: var(--sdm-grau);
}

/* Express-Erläuterung: Tooltip nur mit Maus (PC). Er darf über die Kachel hinausragen –
   deshalb schneidet nur der Bildbereich ab, nicht die ganze Kachel. */
.sdm-kachel {
	overflow: visible;
}

.sdm-kachel:hover {
	z-index: 4;
}

.sdm-kachel-bild {
	border-radius: var(--sdm-radius) var(--sdm-radius) 0 0;
}

.sdm-versand {
	position: relative;
}

.sdm-tooltip {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.sdm-versand-express {
		cursor: help;
	}

	.sdm-versand-express > span:first-child {
		text-decoration: underline dotted;
		text-underline-offset: 3px;
	}

	.sdm-tooltip {
		position: absolute;
		left: 0;
		right: 0;
		bottom: calc(100% + 8px);
		z-index: 5;
		display: block;
		padding: 12px 14px;
		border-radius: var(--sdm-radius);
		background: var(--sdm-dunkel);
		color: #fff;
		font-size: 13px;
		font-weight: 400;
		line-height: 1.45;
		box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
		opacity: 0;
		visibility: hidden;
		transform: translateY(4px);
		transition: opacity .15s, transform .15s, visibility .15s;
		pointer-events: none;
	}

	.sdm-versand-express:hover .sdm-tooltip {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

/* Versand (Detailseite) */
.sdm-versand-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
	padding: 14px 18px;
	border-radius: var(--sdm-radius);
	background: var(--sdm-flaeche);
	font-size: 16px;
}

.sdm-versand-box .sdm-versand-text {
	margin: 0;
	color: var(--sdm-grau);
	font-size: 15px;
}

.sdm-express summary {
	flex-wrap: wrap;
	cursor: pointer;
	list-style: none;
}

.sdm-versand-zeile > span:not(.sdm-tooltip) {
	white-space: nowrap;
}

.sdm-express summary::-webkit-details-marker {
	display: none;
}

.sdm-express-mehr {
	margin-left: 4px;
	color: var(--sdm-akzent);
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sdm-express[open] .sdm-express-mehr {
	display: none;
}

.sdm-express .sdm-versand-text {
	margin-top: 8px;
	padding: 12px 14px;
	border-left: 4px solid var(--sdm-gruen);
	background: #fff;
	color: var(--sdm-dunkel);
}

/* Verkauft (Detailseite) */
.sdm-verkauft-hinweis .sdm-verkauft-titel {
	color: var(--sdm-rot);
	font-size: 20px;
	font-weight: 700;
	text-transform: uppercase;
}

.sdm-verkauft-knoepfe {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.sdm-verkauft-knoepfe .sdm-btn {
	flex: 1 1 200px;
	text-transform: none;
}

/* Maschinenarchiv */
.sdm-badge--verkauft {
	background: var(--sdm-rot);
}

.sdm-archiv:not(.sdm-offen) .sdm-zusatz {
	display: none;
}

/* Ankersprung aus dem Menü: Überschrift nicht unter dem festen Header */
#maschinenarchiv,
#suchauftrag {
	scroll-margin-top: 110px;
}

/* Handy: kompakte Kacheln */
@media (max-width: 599px) {
	.sdm-raster--3 .sdm-versand,
	.sdm-raster--4 .sdm-versand {
		font-size: 12px;
	}

	.sdm-raster--3 .sdm-haken,
	.sdm-raster--4 .sdm-haken,
	.sdm-raster--3 .sdm-abholung-icon,
	.sdm-raster--4 .sdm-abholung-icon {
		width: 14px;
		height: 14px;
	}

	.sdm-raster--3 .sdm-neu-label,
	.sdm-raster--4 .sdm-neu-label {
		padding: 3px 6px;
		font-size: 10px;
	}

	.sdm-archiv .sdm-teaser-mehr .sdm-btn {
		width: 100%;
	}
}

/* ==========================================================
   Maschinensuche (ab 1.6.0) – Suchfeld über [sdm_uebersicht]
   ========================================================== */
.sdm-suche {
	margin: 0 0 var(--sdm-abstand);
	scroll-margin-top: 110px;
}

.sdm .sdm-suche-label {
	display: block;
	margin: 0 0 8px;
	color: var(--sdm-dunkel);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.sdm-suche-zeile {
	display: flex;
	gap: 10px;
	max-width: 720px;
}

.sdm .sdm-suche-feld {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 52px;
	margin: 0;
	padding: 12px 16px;
	border: 2px solid var(--sdm-linie);
	border-radius: var(--sdm-radius);
	background: #fff;
	color: var(--sdm-dunkel);
	font-size: 16px; /* mind. 16 px: kein automatisches Hineinzoomen am iPhone */
	line-height: 1.3;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.sdm .sdm-suche-feld:focus {
	border-color: var(--sdm-akzent);
	outline: none;
}

.sdm .sdm-suche-feld::placeholder {
	color: #8a8a8a;
	opacity: 1;
}

.sdm .sdm-suche-knopf {
	flex: 0 0 auto;
	cursor: pointer;
}

.sdm .sdm-suche-info {
	margin: 0 0 var(--sdm-abstand);
	color: var(--sdm-dunkel);
	font-size: 16px;
}

.sdm .sdm-suche-reset {
	margin-left: 12px;
	color: var(--sdm-akzent);
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

.sdm-suche-leer p {
	margin: 0 0 12px;
}

.sdm .sdm-suche-knoepfe {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 20px 0 0;
}

@media (max-width: 767px) {
	.sdm-suche-zeile {
		flex-direction: column;
	}

	.sdm .sdm-suche-knopf,
	.sdm .sdm-suche-knoepfe .sdm-btn {
		width: 100%;
	}

	.sdm .sdm-suche-reset {
		display: inline-block;
		margin: 6px 0 0;
	}
}
