/* BN Fahrzeuge – front end. Colours come from the theme's custom properties, with fallbacks. */
:root {
	--_navy: var( --bn-navy, #13294b );
	--_accent: var( --bn-accent, #3f9e8f );
	--_blue: var( --bn-blue, #4a7fc8 );
	--_bg: var( --bn-bg, #f1f6fd );
	--_line: var( --bn-line, #dde5f0 );
	--_radius: var( --bn-radius, 14px );
}

/* Buttons */
.bn-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .8em 1.5em; border: 2px solid transparent; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none !important; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.bn-btn:hover { transform: translateY( -1px ); }
.bn-btn--primary { background: var( --_navy, #13294b ); color: #fff !important; }
.bn-btn--primary:hover { box-shadow: 0 6px 18px rgba( 19, 41, 75, .25 ); }
.bn-btn--ghost { background: transparent; border-color: var( --_navy, #13294b ); color: var( --_navy, #13294b ) !important; }
.bn-btn--whatsapp { background: #25d366; color: #fff !important; }
.bn-btn--small { padding: .5em 1.1em; font-size: 14px; background: var( --_bg ); color: var( --_navy ) !important; }
.bn-btn--block { display: flex; width: 100%; margin-bottom: 10px; box-sizing: border-box; }

/* Cards */
.bn-grid { display: grid; grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) ); gap: 24px; margin: 0 0 30px; }
.bn-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var( --_line ); border-radius: var( --_radius ); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.bn-card:hover { box-shadow: 0 12px 30px rgba( 19, 41, 75, .12 ); transform: translateY( -2px ); }
.bn-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var( --_bg ); overflow: hidden; }
.bn-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.bn-card:hover .bn-card__media img { transform: scale( 1.04 ); }
.bn-card__noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 200px; color: #8a9ab3; font-weight: 600; }
.bn-card__count { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba( 0, 0, 0, .6 ); color: #fff; font-size: 12px; }
.bn-card__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.bn-card__title { margin: 0 0 8px !important; font-size: 18px !important; line-height: 1.3 !important; }
.bn-card__title a { color: var( --_navy ) !important; text-decoration: none; }
.bn-card__facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px !important; padding: 0 !important; list-style: none !important; }
.bn-card__facts li { margin: 0 !important; padding: 3px 9px; border-radius: 6px; background: var( --_bg ); color: #475569; font-size: 13px; }
.bn-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.bn-card__price { color: var( --_navy ); font-size: 22px; font-weight: 800; }

.bn-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var( --_accent ); }
.bn-badge.bn-status--reserviert { background: #d97706; }
.bn-badge.bn-status--verkauft { background: #b91c1c; }

/* Filter */
.bn-filter { display: grid; grid-template-columns: 2fr repeat( 5, 1fr ); gap: 12px; align-items: end; margin: 0 0 22px; padding: 20px; background: #fff; border: 1px solid var( --_line ); border-radius: var( --_radius ); box-shadow: 0 6px 20px rgba( 19, 41, 75, .06 ); }
.bn-filter__field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; font-weight: 600; color: #475569; }
.bn-filter input, .bn-filter select, .bn-sort select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var( --_line, #dde5f0 ); border-radius: 10px; background: #fff; font-size: 15px; color: #1e293b; box-sizing: border-box; }
.bn-filter__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.bn-filter__reset { font-size: 14px; }
.bn-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; }
.bn-results-count { margin: 0 !important; }
.bn-sort label { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.bn-sort select { width: auto; height: 38px; }
.bn-pagination { display: flex; justify-content: center; gap: 6px; margin: 10px 0 30px; }
.bn-pagination a, .bn-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid #dde5f0; text-decoration: none; }
.bn-pagination .is-current { background: #13294b; color: #fff; border-color: #13294b; }
.bn-empty { padding: 30px; text-align: center; background: #f1f6fd; border-radius: 14px; }

/* Detail page */
.bn-single { padding: 10px 0 40px; }
.bn-back { margin: 0 0 16px !important; }
.bn-back a { text-decoration: none; font-weight: 600; }
.bn-single__top { display: grid; grid-template-columns: minmax( 0, 1.7fr ) minmax( 0, 1fr ); gap: 28px; align-items: start; }
.bn-gallery__main { position: relative; aspect-ratio: 4 / 3; border-radius: var( --_radius ); overflow: hidden; background: var( --_bg ); }
.bn-gallery__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none; cursor: zoom-in; }
.bn-gallery__slide.is-active { opacity: 1; pointer-events: auto; }
.bn-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-gallery__nav { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba( 255, 255, 255, .9 ); color: #13294b; font-size: 28px; line-height: 40px; cursor: pointer; box-shadow: 0 2px 10px rgba( 0, 0, 0, .2 ); }
.bn-gallery__prev { left: 12px; }
.bn-gallery__next { right: 12px; }
.bn-gallery__counter { position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 3px 10px; border-radius: 999px; background: rgba( 0, 0, 0, .6 ); color: #fff; font-size: 13px; }
.bn-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.bn-gallery__thumb { flex: 0 0 auto; width: 90px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .65; background: none; }
.bn-gallery__thumb.is-active { border-color: var( --_navy ); opacity: 1; }
.bn-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bn-single__summary { position: sticky; top: 20px; padding: 24px; background: #fff; border: 1px solid var( --_line ); border-radius: var( --_radius ); box-shadow: 0 10px 30px rgba( 19, 41, 75, .08 ); }
.bn-single__title { margin: 0 0 8px !important; font-size: 26px !important; line-height: 1.25 !important; color: var( --_navy ); }
.bn-single__price { margin: 0 !important; font-size: 32px; font-weight: 800; color: var( --_navy ); }
.bn-single__tax { margin: 2px 0 0 !important; font-size: 13px; color: #64748b; }
.bn-single__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 !important; padding: 0 !important; list-style: none !important; }
.bn-single__facts li { margin: 0 !important; padding: 8px 10px; border-radius: 8px; background: var( --_bg ); font-size: 14px; }
.bn-single__address { margin: 8px 0 0 !important; font-size: 14px; color: #64748b; }

.bn-single__details { max-width: 860px; margin-top: 34px; }
.bn-panel { margin: 0 0 22px; padding: 24px; background: #fff; border: 1px solid var( --_line ); border-radius: var( --_radius ); }
.bn-panel h2 { margin: 0 0 14px !important; font-size: 21px !important; color: var( --_navy ); }
.bn-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin: 0; }
.bn-specs div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var( --_line ); }
.bn-specs dt { color: #64748b; font-weight: 400; }
.bn-specs dd { margin: 0; font-weight: 600; text-align: right; }
.bn-features { columns: 2; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.bn-features li { break-inside: avoid; margin: 0 0 8px !important; padding-left: 24px; position: relative; }
.bn-features li::before { content: "✓"; position: absolute; left: 0; color: var( --_accent ); font-weight: 800; }
.bn-legal-note { font-size: 13px; color: #64748b; }

.bn-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: rgba( 8, 15, 30, .92 ); }
.bn-lightbox[hidden] { display: none; }
.bn-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.bn-lightbox__close { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 40px; cursor: pointer; }
.bn-lightbox .bn-gallery__prev { left: 20px; }
.bn-lightbox .bn-gallery__next { right: 20px; }
body.bn-no-scroll { overflow: hidden; }

/* Forms */
.bn-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.bn-form__field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px !important; }
.bn-form__full { grid-column: 1 / -1; }
.bn-form label { font-size: 14px; font-weight: 600; color: #334155; }
.bn-form input[type=text], .bn-form input[type=email], .bn-form input[type=tel], .bn-form input[type=number], .bn-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd9e7; border-radius: 10px; background: #fff; font-size: 16px; color: #1e293b; box-sizing: border-box; font-family: inherit; }
.bn-form input:focus, .bn-form textarea:focus, .bn-filter input:focus, .bn-filter select:focus { outline: 0; border-color: #4a7fc8; box-shadow: 0 0 0 3px rgba( 74, 127, 200, .2 ); }
.bn-form__consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: #475569; }
.bn-form__consent input { margin-top: 3px; flex: 0 0 auto; }
.bn-hp { position: absolute !important; left: -9999px !important; }
.bn-notice { margin: 0 0 16px; padding: 14px 16px; border-radius: 10px; }
.bn-notice--ok { background: #dcfce7; color: #14532d; }
.bn-notice--error { background: #fee2e2; color: #7f1d1d; }

/* Map */
.bn-map { position: relative; min-height: 360px; border-radius: var( --_radius ); overflow: hidden; background: linear-gradient( 135deg, #e6eef9, #e3f3ef ); }
.bn-map iframe { display: block; width: 100%; height: 420px; border: 0; }
.bn-map__consent { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 360px; padding: 30px; text-align: center; box-sizing: border-box; }
.bn-map__consent p { max-width: 460px; }
.bn-map__title { font-size: 20px; font-weight: 800; color: #13294b; }
.bn-map__consent .bn-btn { margin: 4px; }

@media ( max-width: 900px ) {
	.bn-filter { grid-template-columns: 1fr 1fr; }
	.bn-filter__search { grid-column: 1 / -1; }
	.bn-single__top { grid-template-columns: 1fr; }
	.bn-single__summary { position: static; }
}
@media ( max-width: 600px ) {
	.bn-filter { padding: 14px; }
	.bn-filter__actions .bn-btn { width: 100%; }
	.bn-filter__actions { flex-direction: column; }
	.bn-form__grid, .bn-specs { grid-template-columns: 1fr; }
	.bn-features { columns: 1; }
	.bn-single__title { font-size: 22px !important; }
	.bn-single__price { font-size: 28px; }
	.bn-gallery__thumb { width: 70px; height: 52px; }
	.bn-panel { padding: 18px; }
}
.bn-card__media, .bn-card__media:hover { text-decoration: none; }
