/* M24 Plattform — Mega-Suche: Panel im Theme-Overlay + Vollergebnis-Seite */

/* tagDiv-eigenes Live-Result ausblenden — unser Mega-Panel uebernimmt dessen Platz.
   !important schlaegt tagDivs inline display:block. */
.tdb-aj-search,
.td-drop-down-search .td-aj-search-results,
.td-drop-down-search .result-msg { display: none !important; }

/* Mega-Panel: im Overlay in-flow, als Float-Fallback fixed positioniert. */
.m24-mega { display: none; font-family: 'Saira', Arial, sans-serif; color: #14161a; }
.m24-mega.m24-mega--on { display: block; }
.m24-mega--float {
	position: fixed;
	z-index: 100000;
	max-height: 80vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
	-webkit-overflow-scrolling: touch;
}

.m24-mega-wrap {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 40px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 16px 20px 18px;
	background: #fff;
	box-sizing: border-box;
}
.m24-mega--float .m24-mega-wrap { max-width: none; margin: 0; padding: 10px 12px; }

/* Breites Panel im Theme-Overlay: nur der befuellte Overlay-Container (.m24-mega-host,
   per JS gesetzt) wird verbreitert — RECHTSBUENDIG (rechter Rand bleibt, waechst nach
   links Richtung Nav). Breite ueber --m24-mega-w justierbar (Default ~ Nav-Beginn bis
   Header-Kante); auf schmalen Viewports auf 96vw geklemmt → volle Breite/gestapelt. */
.tdb-drop-down-search-inner.m24-mega-host,
.td-drop-down-search.m24-mega-host {
	width: var(--m24-mega-w, 980px) !important;
	max-width: calc(100vw - 24px) !important;
	margin-left: auto !important;                          /* rechtsbuendig: waechst nach links */
	margin-right: var(--m24-mega-right, 0) !important;     /* Feinjustage rechter Rand */
}
.m24-mega-host .m24-mega-wrap { max-width: none; margin: 0; }
.m24-mega-wrap * { box-sizing: border-box; }
.m24-mega-col { min-width: 0; }

.m24-sr-group { padding: 4px 0 10px; }
.m24-sr-group + .m24-sr-group { border-top: 1px solid rgba(0, 0, 0, .08); margin-top: 4px; }
.m24-sr-head {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #9a6b25;
	padding: 8px 4px 6px;
}

.m24-sr-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 6px;
	text-decoration: none;
	color: #14161a;
	border-radius: 6px;
}
.m24-sr-item:hover { background: #f4f6f8; }
.m24-sr-thumb { flex: 0 0 auto; width: 52px; height: 36px; border-radius: 4px; overflow: hidden; background: #f0f0ee; display: block; }
.m24-sr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m24-sr-thumb--empty { background: repeating-linear-gradient(45deg, #f0f0ee, #f0f0ee 6px, #e8e8e4 6px, #e8e8e4 12px); }
.m24-sr-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Voller Titel — kein Abschneiden mehr (umbrechen statt ellipsis). */
.m24-sr-title { font-size: 14px; font-weight: 600; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
.m24-sr-sub { font-size: 12.5px; color: #6b7077; }
.m24-sr-sub.m24-sr-price { color: #9a6b25; font-weight: 700; }
.m24-sr-sub.m24-sr-sold { color: #9e2b2b; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 11.5px; }

.m24-sr-all { display: inline-block; margin: 6px 4px 0; font-size: 12.5px; font-weight: 700; color: #1763ad; text-decoration: none; }
.m24-sr-all:hover { text-decoration: underline; }
.m24-sr-none { padding: 18px 8px; color: #6b7077; font-size: 13px; grid-column: 1 / -1; }

/* Mobil/schmal: Spalten untereinander, volle Breite. */
@media (max-width: 782px) {
	.m24-mega-wrap { grid-template-columns: 1fr; gap: 0; padding: 12px 14px; }
	.m24-mega--float { max-height: 82vh; }
	.m24-sr-title { white-space: normal; }
}

/* ── Vollergebnis-Seite (templates/search-group.php) ── */
.m24-search-page { margin: 28px auto 56px; }
.m24-search-page h1 { font-family: 'Saira', Arial, sans-serif; font-weight: 700; font-size: 26px; margin: 0 0 6px; }
.m24-search-page .m24-sp-sub { color: #6b7077; margin: 0 0 22px; }
.m24-sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.m24-sp-card { display: block; text-decoration: none; color: #14161a; border: 1px solid rgba(0, 0, 0, .12); border-radius: 10px; overflow: hidden; background: #fff; }
.m24-sp-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }
.m24-sp-card .m24-sp-img { aspect-ratio: 3/2; background: #f0f0ee; }
.m24-sp-card .m24-sp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m24-sp-card .m24-sp-b { padding: 12px 14px; }
.m24-sp-card h3 { font-family: 'Saira', Arial, sans-serif; font-size: 15px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.m24-sp-card .m24-sp-price { color: #9a6b25; font-weight: 700; }
.m24-sp-card .m24-sp-sold { color: #9e2b2b; font-weight: 700; }
.m24-sp-empty { color: #6b7077; padding: 20px 0; }
