/* Maschinenbörse im Stil von Bussmann Land- & Gartentechnik (Rot/Dunkelgrau).
   Nutzt die Farben des Themes, falls vorhanden. */
:root {
	--lbm-primary: var(--wp--preset--color--primary, #df232c);
	--lbm-primary-dark: var(--wp--preset--color--primary-dark, #b81a22);
	--lbm-dark: var(--wp--preset--color--dark, #262626);
	--lbm-text: var(--wp--preset--color--contrast, #262626);
	--lbm-muted: var(--wp--preset--color--muted, #6b6b6b);
	--lbm-border: var(--wp--preset--color--border, #e2e2e2);
	--lbm-surface: var(--wp--preset--color--surface, #f4f4f4);
	--lbm-bg: var(--wp--preset--color--base, #ffffff);
	--lbm-radius: 4px;
}

.lbm-button {
	display: inline-block;
	padding: .75em 1.4em;
	border: 2px solid var(--lbm-primary);
	border-radius: var(--lbm-radius);
	background: var(--lbm-primary);
	color: #fff !important;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	font-size: 1rem;
	font-family: inherit;
	transition: background .15s, border-color .15s;
}
.lbm-button:hover, .lbm-button:focus-visible { background: var(--lbm-primary-dark); border-color: var(--lbm-primary-dark); }
.lbm-button--outline { background: transparent; color: var(--lbm-primary) !important; }
.lbm-button--outline:hover, .lbm-button--outline:focus-visible { background: var(--lbm-primary); color: #fff !important; }

/* Filter */
.lbm-filter {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px 16px;
	align-items: end;
	padding: 20px;
	margin-bottom: 20px;
	background: var(--lbm-surface);
	border-radius: var(--lbm-radius);
}
.lbm-filter__field { display: flex; flex-direction: column; gap: 4px; font-size: .875rem; font-weight: 600; color: var(--lbm-text); }
.lbm-filter__field--search { grid-column: span 2; }
@media (min-width: 1100px) {
	.lbm-filter { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)) auto; }
	.lbm-filter__field--search { grid-column: auto; }
}
.lbm-filter input, .lbm-filter select {
	width: 100%;
	padding: .6em .7em;
	border: 1px solid var(--lbm-border);
	border-radius: var(--lbm-radius);
	background: #fff;
	font: inherit;
	font-weight: 400;
	font-size: 1rem;
	color: var(--lbm-text);
	box-sizing: border-box;
}
.lbm-filter__buttons { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lbm-filter__reset { font-size: .875rem; color: var(--lbm-muted); }
.lbm-count { color: var(--lbm-muted); margin: 0 0 16px; font-size: .95rem; }
@media (max-width: 600px) { .lbm-filter__field--search { grid-column: auto; } }

/* Kacheln */
.lbm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.lbm-card { background: var(--lbm-bg); border: 1px solid var(--lbm-border); border-bottom: 3px solid var(--lbm-border); border-radius: var(--lbm-radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.lbm-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); border-bottom-color: var(--lbm-primary); }
.lbm-card:hover .lbm-card__title { color: var(--lbm-primary); }
.lbm-card__link { display: flex; flex-direction: column; height: 100%; color: inherit !important; text-decoration: none !important; }
.lbm-card__image { position: relative; aspect-ratio: 4 / 3; background: var(--lbm-surface); }
.lbm-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbm-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lbm-card__title { margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 700; color: var(--lbm-text); transition: color .2s; }
.lbm-card__facts { margin: 0; color: var(--lbm-muted); font-size: .9rem; }
.lbm-card__price { margin: auto 0 0; padding-top: 10px; font-size: 1.25rem; font-weight: 700; color: var(--lbm-primary); }
.lbm-card--verkauft .lbm-card__image img { filter: grayscale(.7); opacity: .75; }
.lbm-price-note { font-size: .8em; font-weight: 400; color: var(--lbm-muted); }
.lbm-price--request { font-weight: 600; }

.lbm-badge { position: absolute; top: 0; left: 0; padding: 6px 14px; border-radius: 0 0 var(--lbm-radius) 0; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--lbm-dark); color: #fff; }
.lbm-badge--verkauft { background: var(--lbm-primary); color: #fff; }
.lbm-single__summary .lbm-badge { position: static; display: inline-block; margin-bottom: 8px; }

.lbm-noimage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 180px; color: var(--lbm-muted); background: var(--lbm-surface); font-size: .9rem; }
.lbm-empty { padding: 24px; background: var(--lbm-surface); border-radius: var(--lbm-radius); }
.lbm-teaser__more { margin-top: 24px; text-align: center; }

.lbm-pagination { margin-top: 32px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.lbm-pagination .page-numbers { padding: .5em .9em; border: 1px solid var(--lbm-border); border-radius: 6px; text-decoration: none; color: var(--lbm-text); }
.lbm-pagination .page-numbers.current { background: var(--lbm-primary); border-color: var(--lbm-primary); color: #fff; }

/* Detailseite */
.lbm-single__top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .lbm-single__top { grid-template-columns: 1fr; } }
.lbm-gallery__main { display: block; aspect-ratio: 4 / 3; background: var(--lbm-surface); border-radius: var(--lbm-radius); overflow: hidden; }
.lbm-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbm-gallery__thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.lbm-gallery__thumbs a { display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 2px solid transparent; opacity: .75; }
.lbm-gallery__thumbs a.is-active, .lbm-gallery__thumbs a:hover { border-color: var(--lbm-primary); opacity: 1; }
.lbm-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lbm-single__summary { padding: 24px; background: var(--lbm-surface); border-top: 4px solid var(--lbm-primary); border-radius: var(--lbm-radius); position: sticky; top: 110px; }
.lbm-single__price { margin: 0 0 16px; font-size: 1.75rem; font-weight: 700; color: var(--lbm-primary); line-height: 1.2; }
.lbm-keyfacts { list-style: none; margin: 0 0 20px; padding: 0; }
.lbm-keyfacts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--lbm-border); }
.lbm-keyfacts span { color: var(--lbm-muted); }
.lbm-actions { display: flex; flex-direction: column; gap: 10px; }
.lbm-actions .lbm-button { text-align: center; }

.lbm-section { margin-top: 40px; }
.lbm-section h2 { font-size: 1.4rem; margin: 0 0 16px; }
.lbm-specs { width: 100%; border-collapse: collapse; font-size: 1rem; }
.lbm-specs th, .lbm-specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--lbm-border); vertical-align: top; }
.lbm-specs th { width: 40%; font-weight: 600; color: var(--lbm-muted); }
.lbm-specs tr:nth-child(odd) { background: var(--lbm-surface); }
.lbm-section h2 { position: relative; padding-bottom: 10px; }
.lbm-section h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--lbm-primary); }
.lbm-disclaimer { font-size: .8rem; color: var(--lbm-muted); margin-top: 12px; }
.lbm-back { margin-top: 40px; }

/* Anfrage */
.lbm-inquiry { padding: 28px; border: 1px solid var(--lbm-border); border-radius: var(--lbm-radius); }
.lbm-form { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.lbm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .lbm-form__row { grid-template-columns: 1fr; } }
.lbm-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.lbm-form input[type=text], .lbm-form input[type=email], .lbm-form input[type=tel], .lbm-form textarea {
	padding: .65em .75em; border: 1px solid var(--lbm-border); border-radius: 6px; font: inherit; font-weight: 400; font-size: 1rem; box-sizing: border-box; width: 100%;
}
.lbm-form .lbm-form__check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.lbm-form .lbm-form__check input { margin-top: .3em; }
.lbm-form .lbm-button { align-self: flex-start; }
.lbm-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lbm-notice { padding: 14px 18px; border-radius: 6px; }
.lbm-notice--ok { background: #eaf6ec; color: #1e5b24; border-left: 4px solid #2e8540; }
.lbm-notice--error { background: #fdecea; color: #8c1d18; }

/* Bildbetrachter */
.lbm-lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lbm-lightbox::backdrop { background: rgba(0,0,0,.9); }
.lbm-lightbox__inner { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lbm-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lbm-lightbox button { position: absolute; background: var(--lbm-primary); color: #fff; border: 0; border-radius: var(--lbm-radius); width: 48px; height: 48px; font-size: 24px; cursor: pointer; }
.lbm-lightbox button:hover { background: var(--lbm-primary-dark); }
.lbm-lightbox__close { top: 16px; right: 16px; }
.lbm-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lbm-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lbm-lightbox__count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; }
