.bw-mm-wrap {
	display: block;
	margin: 24px 0;
	font-family: inherit;
}

.bw-mm-body {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr);
	gap: 24px;
}

/* Filter bar. */
.bw-mm-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
}

.bw-mm-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	color: #1e293b;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
	line-height: 1;
}

.bw-mm-wrap .bw-mm-filter-btn:hover:not(.is-active),
.bw-mm-wrap .bw-mm-filter-btn:focus-visible:not(.is-active) {
	background: #f8fafc;
	border-color: var(--bw-mm-cat-color, #2563eb);
	color: var(--bw-mm-cat-color, #2563eb);
}

.bw-mm-wrap .bw-mm-filter-btn.is-active {
	background: var(--bw-mm-cat-color, #2563eb);
	border-color: var(--bw-mm-cat-color, #2563eb);
	color: #fff;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.bw-mm-wrap .bw-mm-filter-btn.is-active:hover {
	filter: brightness(0.92);
}

.bw-mm-filter-icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
}

.bw-mm-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.08);
	color: inherit;
	font-size: 0.75rem;
	font-weight: 600;
}

.bw-mm-filter-btn.is-active .bw-mm-filter-count {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

/* List column. */
.bw-mm-list {
	max-height: var(--bw-mm-map-height, 600px);
	overflow-y: auto;
	padding-right: 8px;
	scroll-behavior: smooth;
}

.bw-mm-category + .bw-mm-category {
	margin-top: 24px;
}

.bw-mm-category-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px 0;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #1e293b;
	border-bottom: 2px solid var(--bw-mm-cat-color, #2563eb);
	padding-bottom: 6px;
}

.bw-mm-category-icon {
	display: inline-flex;
	color: var(--bw-mm-cat-color, #2563eb);
}

.bw-mm-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bw-mm-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px;
	margin: 0 0 10px 0;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.bw-mm-item:hover,
.bw-mm-item:focus,
.bw-mm-item.is-active {
	border-color: var(--bw-mm-cat-color, #2563eb);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
	background: #f8fafc;
	outline: none;
}

.bw-mm-item-thumb {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	border-radius: 6px;
	background-color: #e2e8f0;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #475569;
}

.bw-mm-item-thumb--empty {
	background: linear-gradient(135deg, rgba(15,23,42,0.05), rgba(15,23,42,0.12));
	color: var(--bw-mm-cat-color, #2563eb);
}

.bw-mm-item-body {
	flex: 1 1 auto;
	min-width: 0;
}

.bw-mm-item-title {
	margin: 0 0 6px 0;
	font-size: 1rem;
	line-height: 1.3;
	font-weight: 600;
	color: #0f172a;
}

.bw-mm-item-excerpt {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #475569;
}

/* Map column. */
.bw-mm-map-col {
	position: relative;
}

.bw-mm-map {
	width: 100%;
	height: var(--bw-mm-map-height, 600px);
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	position: sticky;
	top: 16px;
}

.bw-mm-empty {
	padding: 32px;
	background: #f1f5f9;
	border-radius: 8px;
	text-align: center;
	color: #475569;
}

/* Markers. */
.bw-mm-marker {
	/* background applied inline per-marker for per-category color. */
	color: #fff;
	border: 2px solid #fff;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
	transition: transform 160ms ease, filter 160ms ease;
}

.bw-mm-marker svg {
	display: block;
}

.bw-mm-marker.is-active {
	transform: scale(1.4);
	filter: brightness(0.85) saturate(1.3);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
	z-index: 1000;
}

.bw-mm-marker.is-faded {
	opacity: 0.18;
	pointer-events: none;
	transition: opacity 220ms ease;
}

/* Central / "home" marker. */
.bw-mm-marker--central {
	width: 40px;
	height: 40px;
	border-width: 3px;
	box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25), 0 4px 14px rgba(15, 23, 42, 0.45);
	z-index: 1100 !important;
}
.bw-mm-marker--central.is-faded { opacity: 1 !important; pointer-events: auto !important; }

/* Image-style central marker (site logo OR custom uploaded image).
   Background uses the accent colour from the inline style, so white logos
   on a dark accent (or dark logos on a light accent) both have contrast. */
.bw-mm-marker--central.bw-mm-marker--image {
	width: 44px;
	height: 44px;
	border-width: 3px;
	padding: 3px;
	overflow: hidden;
}
.bw-mm-marker--central.bw-mm-marker--image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Popups. */
.bw-mm-popup .bw-mm-popup-thumb {
	width: 100%;
	height: 110px;
	background-size: cover;
	background-position: center;
	border-radius: 4px;
	margin-bottom: 8px;
}
.bw-mm-popup .bw-mm-popup-title {
	font-weight: 700;
	margin: 0 0 4px 0;
	font-size: 1rem;
}
.bw-mm-popup .bw-mm-popup-excerpt {
	margin: 0 0 8px 0;
	color: #475569;
	font-size: 0.9rem;
}

.bw-mm-popup .bw-mm-popup-distance {
	margin: 0 0 8px 0;
	font-size: 0.85rem;
	color: #1e293b;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.bw-mm-popup .bw-mm-popup-actions {
	margin: 0;
}

.bw-mm-popup .bw-mm-popup-directions {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: #2563eb;
	color: #fff !important;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	transition: background 160ms ease, transform 120ms ease;
}
.bw-mm-popup .bw-mm-popup-directions:hover,
.bw-mm-popup .bw-mm-popup-directions:focus {
	background: #1d4ed8;
	color: #fff !important;
	text-decoration: none;
	transform: translateY(-1px);
}

@media (max-width: 768px) {
	.bw-mm-body {
		grid-template-columns: 1fr;
	}
	.bw-mm-list {
		max-height: none;
		order: 2;
	}
	.bw-mm-map-col {
		order: 1;
	}
	.bw-mm-map {
		height: 360px;
		position: relative;
		top: 0;
	}
}
