/* Moksi Theme - Collection archive filters */

.moksi-collection-filters-bar {
	margin-bottom: 25px;
}

.moksi-collection-filters {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	padding-top: 10px;
}

.moksi-collection-filters .moksi-filter-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 1 260px;
	min-width: 200px;
}

.moksi-collection-filters .moksi-filter-group--reset,
.moksi-collection-filters .moksi-filter-group--sort {
	flex: 0 0 auto;
	min-width: 0;
}

/* Push the sort dropdown to the right end of the row, filters stay left. */
.moksi-collection-filters .moksi-filter-group--sort {
	margin-left: auto;
}

/* Fixed height on both the real labels and the invisible spacer labels
   (used to vertically align the Reset button and Sort dropdown with the
   Creator/Collection/Category selects) guarantees identical box heights
   regardless of text content, so nothing drifts out of alignment. */
.moksi-collection-filters .moksi-filter-group label,
.moksi-collection-filters .moksi-filter-label-spacer {
	display: block;
	height: 14px;
	line-height: 14px;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #333;
	margin: 0;
	padding: 0;
}

.moksi-collection-filters .moksi-filter-label-spacer {
	visibility: hidden;
}

/* The WooCommerce ordering dropdown ships inside its own <form> with the
   theme's default block margin-bottom. Zero that out so its flex item is
   exactly the same height as the plain select/button items next to it. */
.moksi-collection-filters .woocommerce-ordering {
	display: block;
	margin: 0 !important;
	min-width: 180px;
}

/* Shared control styling so the Creator, Collection, Category selects,
   the Reset button, and the Sort dropdown all read as one consistent set
   of controls. High specificity + !important throughout, since the site's
   default WooCommerce ordering select is otherwise styled (gold border,
   pale arrow) via its own more specific rule (likely an #orderby ID
   selector), which would otherwise win over a plain class override. */
.moksi-collection-filters .moksi-filter-select,
.moksi-collection-filters .woocommerce-ordering select#orderby,
.moksi-collection-filters .woocommerce-ordering select.orderby {
	box-sizing: border-box !important;
	display: block !important;
	width: 100% !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 36px 0 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 0 !important;
	background-color: #fff !important;
	color: #333 !important;
	font-size: 14px !important;
	line-height: 44px !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c4b98b' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
}

.moksi-collection-filters .moksi-filter-select:focus,
.moksi-collection-filters .woocommerce-ordering select#orderby:focus,
.moksi-collection-filters .woocommerce-ordering select.orderby:focus {
	outline: none;
	border-color: #c4b98b !important;
}

/* Reset button: identical box to the dropdowns, not the site's default
   filled/orange button style. Text is centred with flex instead of
   line-height so button-vs-select font metrics can't cause a few pixels
   of drift between the two control types. */
.moksi-collection-filters button.moksi-filter-reset.moksi-filter-select {
	width: auto !important;
	min-width: 140px;
	line-height: normal !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background-color: #fff !important;
	background-image: none !important;
	border: 1px solid #c4b98b !important;
	color: #333 !important;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.moksi-collection-filters button.moksi-filter-reset.moksi-filter-select:hover {
	background-color: #c4b98b !important;
	color: #fff !important;
}

.moksi-collection-results {
	position: relative;
	transition: opacity 0.2s ease;
}

.moksi-collection-results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

@media (max-width: 767px) {
	.moksi-collection-filters .moksi-filter-group,
	.moksi-collection-filters .moksi-filter-group--sort {
		flex: 1 1 100%;
		margin-left: 0;
	}

	.moksi-collection-filters button.moksi-filter-reset.moksi-filter-select {
		width: 100% !important;
	}
}