/* Maschinen Katalog – Frontend */

/* Theme-Fix (BeTheme/Muffin): Beitragsbild wird vom Theme im Post-Header
   zusätzlich ausgegeben – auf Maschinen-Seiten ausblenden, die Galerie
   des Plugins übernimmt die Bildanzeige. */
body.single-maschine .section-post-header .single-photo-wrapper,
body.single-maschine .entry-header .post-thumbnail,
body.single-maschine .single-featured-image { display: none !important; }

.mkat-katalog, .mkat-detail { --mkat-primary: #005d9a; --mkat-border: #e3e6ea; }

/* Filter */
.mkat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.mkat-filter select, .mkat-filter input[type="text"] {
	padding: 8px 12px; border: 1px solid var(--mkat-border); border-radius: 4px; min-width: 180px;
}
.mkat-count { color: #666; font-size: 0.9em; }

/* Raster */
.mkat-grid-liste {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin: 0 0 24px;
}

/* Karte */
.mkat-card { border: 1px solid var(--mkat-border); border-radius: 6px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .2s; }
.mkat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
/* Bildbox: feste 4:3-Ratio über padding-Technik – robust gegen Theme-CSS
   (BeTheme setzt img { height: auto } und bricht sonst die Kartenhöhen). */
.mkat-card-img { display: block; position: relative; padding-top: 75%; overflow: hidden; background: #f4f5f7; }
.mkat-card-img img {
	position: absolute; top: 0; left: 0;
	width: 100% !important; height: 100% !important; max-height: none !important;
	object-fit: cover; display: block; margin: 0 !important;
}
.mkat-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2em; opacity: .3; }
.mkat-badge { position: absolute; top: 10px; left: 10px; background: var(--mkat-primary); color: #fff; font-size: .75em; padding: 3px 10px; border-radius: 3px; }
.mkat-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.mkat-card-body h3 { margin: 0 0 8px; font-size: 1.05em; }
.mkat-card-body h3 a { text-decoration: none; color: inherit; }
.mkat-card-meta { list-style: none; margin: 0 0 12px; padding: 0; font-size: .9em; color: #555; flex: 1; }
.mkat-card-meta li { margin-bottom: 3px; }
.mkat-card-preis { font-weight: 700; color: var(--mkat-primary); }

/* Buttons */
.mkat-btn { display: inline-block; padding: 8px 18px; background: var(--mkat-primary); color: #fff !important; border: 0; border-radius: 4px; text-decoration: none !important; cursor: pointer; font-size: .95em; }
.mkat-btn:hover { opacity: .88; }
.mkat-btn-wa { background: #25d366; }
.mkat-btn-primary { font-size: 1.05em; padding: 10px 26px; }

/* Seitennummerierung */
.mkat-pagination ul { list-style: none; display: flex; gap: 6px; padding: 0; flex-wrap: wrap; }
.mkat-pagination li a, .mkat-pagination li span { display: block; padding: 6px 12px; border: 1px solid var(--mkat-border); border-radius: 4px; text-decoration: none; }
.mkat-pagination .current { background: var(--mkat-primary); color: #fff; border-color: var(--mkat-primary); }

/* Detail: Galerie */
.mkat-galerie { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.mkat-galerie-haupt { flex: 1 1 100%; }
.mkat-galerie-haupt img { width: 100%; max-height: 480px; object-fit: contain; background: #f4f5f7; border-radius: 6px; }
.mkat-galerie-thumb img { width: 110px; height: 82px; object-fit: cover; border-radius: 4px; border: 1px solid var(--mkat-border); }

/* Detail: Daten-Tabelle */
.mkat-daten { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.mkat-daten th, .mkat-daten td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--mkat-border); }
.mkat-daten th { width: 220px; color: #444; font-weight: 600; }
.mkat-daten tr:nth-child(odd) { background: #f8f9fa; }

.mkat-ausstattung { columns: 2; }
@media (max-width: 600px) { .mkat-ausstattung { columns: 1; } .mkat-daten th { width: 140px; } }

.mkat-video { margin: 24px 0; }
.mkat-video iframe { max-width: 100%; }

/* Anfrage-Formular */
.mkat-anfrage { margin: 32px 0; padding: 24px; background: #f8f9fa; border: 1px solid var(--mkat-border); border-radius: 6px; }
.mkat-kontakt-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.mkat-form input[type="text"], .mkat-form input[type="email"], .mkat-form textarea {
	width: 100%; max-width: 560px; padding: 9px 12px; border: 1px solid #ccd2d8; border-radius: 4px;
}
.mkat-dsgvo { font-size: .9em; }
.mkat-hp { position: absolute !important; left: -9999px !important; }
.mkat-meldung { padding: 12px 16px; border-radius: 4px; }
.mkat-ok { background: #e2f5e7; border: 1px solid #9fd7ae; }
.mkat-fehler { background: #fdeaea; border: 1px solid #eba7a7; }

/* Lightbox */
.mkat-lightbox-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex;
	align-items: center; justify-content: center; z-index: 99999; cursor: zoom-out;
}
.mkat-lightbox-overlay img { max-width: 92vw; max-height: 92vh; border-radius: 4px; }
