/**
 * Shop-/Kategorie-Archiv: Toolbar, Filterleiste, Produktraster.
 */

.woocommerce-products-header {
	margin-bottom: var(--space-xl);
}

.woocommerce-products-header__title {
	font-size: var(--font-size-2xl);
}

.term-description,
.woocommerce-products-header .archive-description {
	color: var(--color-text-muted);
	max-width: 65ch;
	margin-top: var(--space-sm);
}

/* Toolbar: Ergebniszahl, Filter-Button (mobil), Sortierung. */
.musterlaune-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	margin-bottom: var(--space-lg);
	flex-wrap: wrap;
}

.musterlaune-shop-toolbar__count p {
	margin: 0;
	font-size: var(--font-size-sm);
	color: var(--color-text-muted);
}

.musterlaune-shop-toolbar__sort select {
	min-height: 44px;
	width: auto;
}

.musterlaune-filter-toggle {
	display: none;
}

/* Horizontale Filterleiste (Desktop) / Drawer (Mobile). */
.musterlaune-filter-drawer {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-medium);
	padding: var(--space-lg);
	margin-bottom: var(--space-xl);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xl);
}

.musterlaune-filter-drawer__header {
	display: none;
}

.musterlaune-filter-widget {
	min-width: 180px;
}

.musterlaune-filter-widget__title {
	font-size: var(--font-size-sm);
	font-weight: 600;
	margin-bottom: var(--space-sm);
}

.musterlaune-filter-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
}

.musterlaune-filter-widget ul li a {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	font-size: var(--font-size-xs);
	color: var(--color-text);
}

.musterlaune-filter-widget ul li a:hover,
.musterlaune-filter-widget ul li.chosen a {
	border-color: var(--color-primary);
	color: var(--color-primary);
	text-decoration: none;
}

.musterlaune-filter-widget .price_slider_wrapper {
	margin-top: var(--space-md);
}

/* Produktraster-Spaltenregeln liegen zentral in components.css, da
   ul.products (Bestseller, Related/Upsells, Shop-Archiv) auf mehreren
   Templates verwendet wird, nicht nur auf der Shop-Seite. */

/* Mobile Filter-Drawer: Off-Canvas von rechts. */
@media (max-width: 899px) {
	.musterlaune-filter-toggle {
		display: inline-flex;
	}

	.musterlaune-filter-drawer {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(340px, 88vw);
		border-radius: 0;
		transform: translateX(100%);
		transition: transform var(--transition-base);
		z-index: 200;
		overflow-y: auto;
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.musterlaune-filter-drawer.is-open {
		transform: translateX(0);
	}

	.musterlaune-filter-drawer__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-weight: 600;
		margin-bottom: var(--space-md);
	}

	.musterlaune-filter-close {
		background: none;
		border: none;
		font-size: 1.5rem;
		cursor: pointer;
		line-height: 1;
	}
}

@media (max-width: 599px) {
	.musterlaune-shop-toolbar__sort {
		order: 3;
		width: 100%;
	}
}
