/*
 * bennows — Kategorie- und Shopseiten: Sortierleiste
 * Ergebnisanzahl links, „Sortieren“ und „Produkte pro Seite“ als gleich hohe, native Auswahlfelder rechts.
 * Das Theme hängt Select2 an beide (eigene Optik, verschobene Höhen); das Skript wird im MU-Plugin
 * abgemeldet, hier bekommen die nativen Felder die Gestalt der Kasse.
 */

.storefront-sorting {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin: 0 0 24px;
	padding: 0;
	font-size: 15px;
}

.storefront-sorting::before,
.storefront-sorting::after {
	display: none;
}

.storefront-sorting .woocommerce-notices-wrapper {
	flex: 0 0 100%;
}

.storefront-sorting .woocommerce-notices-wrapper:empty {
	display: none;
}

.storefront-sorting .woocommerce-result-count {
	order: 1;
	flex: 1 1 auto;
	float: none;
	margin: 0;
	padding: 0;
	color: #5f6368;
	font-size: 15px;
}

.storefront-sorting .woocommerce-ordering {
	order: 2;
	float: none;
	margin: 0;
}

.storefront-sorting .products-per-page {
	order: 3;
	float: none !important;
	margin: 0 !important;
}

.storefront-sorting select.orderby,
.storefront-sorting select.wppp-select {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: auto;
	max-width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 38px 0 12px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d1d1b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
	box-shadow: none;
	color: #2b2b2b;
	font: inherit;
	font-size: 15px;
	line-height: 40px;
	cursor: pointer;
}

.storefront-sorting select.orderby:hover,
.storefront-sorting select.wppp-select:hover {
	border-color: #9aa0a6;
}

.storefront-sorting select.orderby:focus-visible,
.storefront-sorting select.wppp-select:focus-visible {
	border-color: #1d1d1b;
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 189, 17, 0.55);
}

/* Unter der Produktliste zählt nur noch das Blättern; Sortieren steht schon oben. */
ul.products ~ .storefront-sorting .woocommerce-ordering,
ul.products ~ .storefront-sorting .products-per-page {
	display: none;
}

ul.products ~ .storefront-sorting {
	margin: 24px 0 0;
}

.storefront-sorting .woocommerce-pagination {
	order: 4;
	float: none;
	margin: 0 0 0 auto;
}

@media (max-width: 767px) {
	.storefront-sorting .woocommerce-result-count {
		flex: 0 0 100%;
		font-size: 14px;
	}

	.storefront-sorting .woocommerce-ordering,
	.storefront-sorting .products-per-page {
		flex: 1 1 0;
		min-width: 0;
	}

	.storefront-sorting select.orderby,
	.storefront-sorting select.wppp-select {
		width: 100%;
		font-size: 16px;
	}
}
