/* MH Motorrad Bestand – Frontend
   Akzentfarbe über CSS Variable anpassbar, z. B. im Customizer:
   :root { --mhmb-accent: #1c69d4; } */

:root {
	--mhmb-accent: #1c69d4;
	--mhmb-accent-dark: #10509e;
	--mhmb-border: #e1e4e8;
	--mhmb-text: #262626;
	--mhmb-muted: #6b7280;
}

/* ---------- Karussell ---------- */

.mhmb-carousel-wrap {
	position: relative;
	padding: 0 8px;
}

.mhmb-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 8px 2px 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.mhmb-carousel::-webkit-scrollbar { display: none; }

.mhmb-arrow {
	position: absolute;
	top: 40%;
	z-index: 5;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--mhmb-border);
	background: #fff;
	color: var(--mhmb-text);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
	transition: opacity .2s, background .2s;
}
.mhmb-arrow:hover { background: var(--mhmb-accent); color: #fff; }
.mhmb-arrow[disabled] { opacity: 0; pointer-events: none; }
.mhmb-prev { left: -8px; }
.mhmb-next { right: -8px; }

/* ---------- Grid ---------- */

.mhmb-grid-wrap {
	display: grid;
	grid-template-columns: repeat(var(--mhmb-cols, 3), minmax(0, 1fr));
	gap: 20px;
}
.mhmb-grid-wrap .mhmb-card {
	flex: none;
	width: auto;
}

/* Tablet: maximal 2 Spalten, egal wie viele eingestellt sind */
@media (max-width: 1024px) {
	.mhmb-grid-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Handy: eine Spalte */
@media (max-width: 600px) {
	.mhmb-grid-wrap { grid-template-columns: 1fr; }
}

/* ---------- Karte ---------- */

.mhmb-card {
	flex: 0 0 280px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--mhmb-border);
	border-radius: 6px;
	overflow: hidden;
	color: var(--mhmb-text);
	transition: box-shadow .2s, transform .2s;
}
.mhmb-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	transform: translateY(-2px);
}

@media (min-width: 1200px) { .mhmb-card { flex-basis: 300px; } }
@media (max-width: 480px)  { .mhmb-card { flex-basis: 86%; } }

.mhmb-card-image {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: #fff;
	overflow: hidden;
	padding-top: 34px; /* ruhiger Bereich für die Badge, Motorrad rutscht darunter */
}
.mhmb-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s;
}
.mhmb-card:hover .mhmb-card-image img { transform: scale(1.04); }

.mhmb-noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #7a8494;
	font-size: 14px;
}

/* Preisband oben rechts, wie im Vorbild */
.mhmb-ribbon {
	position: absolute;
	top: 0;
	right: 12px;
	background: var(--mhmb-accent);
	color: #fff;
	padding: 10px 12px 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	min-width: 74px;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
}
.mhmb-ribbon small {
	display: block;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	opacity: .85;
	margin-bottom: 3px;
}

.mhmb-status {
	position: absolute;
	left: 0;
	top: 12px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #fff;
	background: #996800;
}
.mhmb-status-verkauft { background: #b32d2e; }

.mhmb-count {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}
.mhmb-count svg { width: 15px; height: 15px; }

/* ---------- Galerie (Single) ---------- */

.mhmb-gallery { max-width: 100%; }

.mhmb-gallery-main {
	display: block;
	border-radius: 6px;
	overflow: hidden;
	background: #14171c;
	aspect-ratio: 16 / 10;
	cursor: zoom-in;
}
.mhmb-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mhmb-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
	margin-top: 10px;
}
.mhmb-gallery-thumb {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	background: none;
	cursor: pointer;
	line-height: 0;
	transition: border-color .15s, opacity .15s;
	opacity: .75;
}
.mhmb-gallery-thumb img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.mhmb-gallery-thumb:hover { opacity: 1; }
.mhmb-gallery-thumb.is-active {
	border-color: var(--mhmb-accent);
	opacity: 1;
}

/* Lightbox */
.mhmb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10,12,16,.92);
	padding: 24px;
}
.mhmb-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 4px;
}
.mhmb-lightbox button {
	position: absolute;
	background: rgba(255,255,255,.1);
	border: 1px solid rgba(255,255,255,.25);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 46px;
	height: 46px;
	font-size: 18px;
	line-height: 1;
	transition: background .15s;
}
.mhmb-lightbox button:hover { background: rgba(255,255,255,.25); }
.mhmb-lightbox .mhmb-lb-close { top: 20px; right: 20px; }
.mhmb-lightbox .mhmb-lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.mhmb-lightbox .mhmb-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.mhmb-lightbox .mhmb-lb-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
	opacity: .8;
}

/* ---------- Kartentext ---------- */

.mhmb-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 14px 16px 16px;
}

.mhmb-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 1px solid var(--mhmb-border);
	padding-bottom: 6px;
	margin-bottom: 8px;
}
.mhmb-brand { font-weight: 800; font-size: 15px; }
.mhmb-ez { font-size: 12px; color: var(--mhmb-muted); }

.mhmb-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 12px;
	min-height: 2.7em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mhmb-title a { color: inherit; text-decoration: none; }
.mhmb-title a:hover { color: var(--mhmb-accent); }

/* Datengrid 2x2 */
.mhmb-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 12px;
	margin-bottom: 14px;
}
.mhmb-spec {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--mhmb-border);
	border-radius: 4px;
	padding: 7px 9px;
	font-size: 12.5px;
}
.mhmb-spec strong { display: block; font-weight: 600; line-height: 1.2; }
.mhmb-spec em { display: block; font-style: normal; font-size: 11px; line-height: 1.2; margin-top: 1px; color: var(--mhmb-muted); }
.mhmb-spec span { line-height: 1.2; }
.mhmb-icon { flex: 0 0 auto; width: 18px; height: 18px; color: var(--mhmb-muted); }
.mhmb-icon svg { width: 100%; height: 100%; }

/* Tabs Leasing / Kaufpreis */
.mhmb-tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
}
.mhmb-tab {
	flex: 1;
	padding: 7px 4px;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid var(--mhmb-border);
	border-radius: 4px;
	background: #f5f6f8;
	color: var(--mhmb-text);
	cursor: pointer;
	transition: all .15s;
}
.mhmb-tab.is-active {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #fff;
}

/* Preiszeilen */
.mhmb-prices { margin-bottom: 8px; }
.mhmb-price {
	display: none;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13.5px;
	margin: 0;
	padding: 2px 0;
}
.mhmb-price.is-active { display: flex; }
.mhmb-price strong { font-size: 18px; font-weight: 800; }

.mhmb-footnote {
	font-size: 10.5px;
	line-height: 1.45;
	color: var(--mhmb-muted);
	margin: 0 0 12px;
}

.mhmb-button {
	display: block;
	margin-top: auto;
	text-align: center;
	padding: 10px 14px;
	border: 1px solid var(--mhmb-accent);
	border-radius: 4px;
	color: var(--mhmb-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all .15s;
}
.mhmb-button:hover {
	background: var(--mhmb-accent);
	color: #fff;
}

/* ---------- Single Seite: [motorrad_single] ---------- */

.mhmb-single {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: 32px;
	align-items: start;
}
@media (max-width: 900px) {
	.mhmb-single { grid-template-columns: 1fr; gap: 24px; }
}

.mhmb-single-info { display: flex; flex-direction: column; gap: 22px; }

/* Preis ohne Box, ohne Rahmen, ohne Trennlinie */
.mhmb-priceblock { padding: 0; }
.mhmb-priceblock-status {
	display: inline-block;
	margin-bottom: 10px;
	padding: 3px 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #fff;
	background: #996800;
	border-radius: 4px;
}
.mhmb-priceblock-status.mhmb-status-verkauft { background: #b32d2e; }

.mhmb-pr-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 4px 0;
	font-size: 15px;
	color: var(--mhmb-text);
}
.mhmb-pr-row strong { font-size: 20px; font-weight: 700; white-space: nowrap; color: var(--mhmb-text); }

/* Kaufpreis: schwarz, kräftig, keine Linie darüber */
.mhmb-pr-main { padding: 4px 0; }
.mhmb-pr-main strong { font-size: 26px; color: var(--mhmb-text); }

/* Zusatz inkl. MwSt. direkt unter dem Kaufpreis */
.mhmb-pr-tax {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--mhmb-muted);
}
.mhmb-pr-sub {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--mhmb-muted);
}
.mhmb-pr-sub s { color: var(--mhmb-muted); }

.mhmb-single-info .mhmb-spec-table { margin-top: 0; }

/* Kontakt Buttons: primär Anruf, sekundär E-Mail */
.mhmb-single-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.mhmb-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	flex: 1 1 auto;
	min-width: 170px;
	padding: 13px 20px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.mhmb-cta-ic { display: inline-flex; }
.mhmb-cta-ic svg { width: 18px; height: 18px; display: block; }
.mhmb-cta-primary {
	background: var(--mhmb-accent);
	color: #fff;
	border: 2px solid var(--mhmb-accent);
}
.mhmb-cta-primary:hover {
	background: var(--mhmb-accent-dark);
	border-color: var(--mhmb-accent-dark);
	color: #fff;
}
.mhmb-cta-secondary {
	background: #fff;
	color: var(--mhmb-accent);
	border: 2px solid var(--mhmb-accent);
}
.mhmb-cta-secondary:hover {
	background: var(--mhmb-accent);
	color: #fff;
}
@media (max-width: 480px) {
	.mhmb-cta { flex: 1 1 100%; }
}

/* ---------- Beschreibung (Gutenberg Inhalt) unter dem Zweispalter ---------- */

.mhmb-single-desc {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--mhmb-border);
}
.mhmb-desc-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--mhmb-text);
	margin: 0 0 14px;
}
.mhmb-desc-body {
	font-size: 16px;
	line-height: 1.7;
	color: var(--mhmb-text);
	max-width: 80ch; /* angenehme Zeilenlaenge fuer langen Text */
}
.mhmb-desc-body > *:first-child { margin-top: 0; }
.mhmb-desc-body > *:last-child { margin-bottom: 0; }
.mhmb-desc-body p { margin: 0 0 1em; }
.mhmb-desc-body h2,
.mhmb-desc-body h3,
.mhmb-desc-body h4 { margin: 1.4em 0 .5em; line-height: 1.3; }
.mhmb-desc-body ul,
.mhmb-desc-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.mhmb-desc-body li { margin: 0 0 .4em; }
.mhmb-desc-body a { color: var(--mhmb-accent); }
.mhmb-desc-body img { max-width: 100%; height: auto; border-radius: 8px; }
.mhmb-desc-body figure { margin: 1em 0; }
.mhmb-desc-body blockquote {
	margin: 1em 0;
	padding: 4px 0 4px 16px;
	border-left: 3px solid var(--mhmb-border);
	color: var(--mhmb-muted);
}

@media (max-width: 900px) {
	.mhmb-single-desc { margin-top: 24px; padding-top: 20px; }
	.mhmb-desc-body { font-size: 15.5px; }
}

/* ---------- Datentabelle (Single) ---------- */

.mhmb-spec-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
}
.mhmb-spec-table th,
.mhmb-spec-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--mhmb-border);
}
.mhmb-spec-table th {
	width: 40%;
	font-weight: 600;
	color: var(--mhmb-muted);
	background: #fafbfc;
}

@media (prefers-reduced-motion: reduce) {
	.mhmb-carousel { scroll-behavior: auto; }
	.mhmb-card, .mhmb-card-image img { transition: none; }
}
