.ufwc-shop {
	--ufwc-sidebar-width: 260px;
	color: #a8a8a8;
}

/*
 * The search input carries its own background/border (not a wrapper div)
 * with `!important` on the theme-fighting properties: many WooCommerce
 * themes apply global branded styles to bare <input>/<select>/<button>
 * elements (rounded borders, brand-color fills) that otherwise win over a
 * single-class selector regardless of stylesheet load order. The icon is
 * absolutely positioned inside the input's own padding, so there's only
 * ever one visible box, not a wrapper box plus an inner input box.
 */
.ufwc-shop__search {
	position: relative;
	margin-bottom: 24px;
}

.ufwc-shop__search .ufwc-icon {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	pointer-events: none;
	background: none !important;
	color: #7a7a7a;
	fill: #7a7a7a;
}

.ufwc-shop__search-input {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background-color: #1a1a1a !important;
	background-image: none !important;
	color: #ffffff;
	font-size: 14px;
	padding: 12px 16px 12px 44px;
	outline: none;
}

.ufwc-shop__search-input::-webkit-search-decoration,
.ufwc-shop__search-input::-webkit-search-cancel-button,
.ufwc-shop__search-input::-webkit-search-results-button,
.ufwc-shop__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
}

.ufwc-shop__search-input::placeholder {
	color: #7a7a7a;
}

.ufwc-shop__body {
	display: grid;
	grid-template-columns: var(--ufwc-sidebar-width) 1fr;
	gap: 30px;
	align-items: start;
}

.ufwc-shop--sidebar-right .ufwc-shop__body {
	grid-template-columns: 1fr var(--ufwc-sidebar-width);
}

.ufwc-shop--sidebar-right .ufwc-shop__sidebar {
	order: 2;
}

.ufwc-shop__clear-filters {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	display: inline-flex;
	align-items: center;
	width: auto !important;
	margin: 0 0 20px;
	padding: 0 !important;
	background: none !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: #f4c60a;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ufwc-shop__clear-filters,
.ufwc-shop__clear-filters:hover,
.ufwc-shop__clear-filters:focus {
	color: #f4c60a !important;
}

.ufwc-shop__clear-filters:hover {
	opacity: 0.75;
}

.ufwc-shop__widget {
	margin-bottom: 28px;
}

.ufwc-shop__widget-title {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #ffffff;
}

.ufwc-cat-list,
.ufwc-price-list,
.ufwc-brand-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Mobile-only category dropdown — see the @media block for when it swaps with .ufwc-cat-list. */
.ufwc-cat-select {
	display: none;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	width: 100%;
	background-color: #1a1a1a !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 1px solid #2e2e2e !important;
	border-radius: 0 !important;
	color: #ffffff !important;
	padding: 10px 12px;
	font-size: 13px;
}

.ufwc-cat-list__item + .ufwc-cat-list__item {
	margin-top: 2px;
}

/*
 * Grid, not flex, for the row: a fixed 32px second column guarantees the
 * toggle/spacer lines up identically on every row regardless of that
 * item's own box model (font metrics, inherited sizing, etc.) — grid track
 * sizes don't depend on the item's computed width the way flex-basis does.
 */
.ufwc-cat-list__row {
	display: grid !important;
	grid-template-columns: 1fr 32px;
	align-items: center;
	border-left: 2px solid transparent;
	border-radius: 3px;
	transition: border-color 0.2s ease;
}

.ufwc-cat-list a {
	display: flex !important;
	align-items: center;
	justify-content: space-between !important;
	min-width: 0;
	gap: 8px;
	padding: 8px 10px;
	color: #a8a8a8;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.2s ease;
}

.ufwc-cat-list a:hover {
	color: #f4c60a;
}

.ufwc-cat-list__item.is-active > .ufwc-cat-list__row {
	border-color: #f4c60a;
}

.ufwc-cat-list__item.is-active > .ufwc-cat-list__row > a {
	color: #f4c60a;
}

.ufwc-cat-list__count {
	font-size: 12px;
	color: #6b6b6b;
}

.ufwc-cat-list__toggle {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 26px !important;
	margin: 0 !important;
	padding: 0 !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 0 !important;
	overflow: visible;
	border-radius: 0 !important;
	color: #f4c60a !important;
	fill: #f4c60a !important;
	cursor: pointer;
	line-height: 1;
	font-size: 0;
	transition: opacity 0.2s ease;
}

.ufwc-cat-list__toggle .ufwc-icon {
	display: block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: inherit;
	fill: inherit;
	transition: transform 0.2s ease;
}

.ufwc-cat-list__toggle:hover {
	opacity: 0.75;
}

.ufwc-cat-list__toggle-spacer {
	display: block;
	width: 100%;
	height: 26px;
}

.ufwc-cat-list__item.is-open > .ufwc-cat-list__row .ufwc-cat-list__toggle .ufwc-icon {
	transform: rotate( 180deg );
}

.ufwc-cat-list__item.is-open > .ufwc-cat-list__row .ufwc-cat-list__toggle {
	color: #ffffff !important;
	fill: #ffffff !important;
}

.ufwc-cat-list__children {
	list-style: none;
	margin: 0;
	padding: 0 0 0 16px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.ufwc-cat-list__item.is-open > .ufwc-cat-list__children {
	max-height: 1000px;
}

.ufwc-cat-list__children .ufwc-cat-list a {
	font-size: 13px;
}

.ufwc-price-list li,
.ufwc-brand-list li {
	padding: 6px 10px;
}

.ufwc-price-list label,
.ufwc-brand-list label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #a8a8a8;
	cursor: pointer;
}

.ufwc-price-checkbox,
.ufwc-brand-checkbox {
	accent-color: #f4c60a;
	width: 15px;
	height: 15px;
}

.ufwc-shop__toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-bottom: 24px;
}

.ufwc-shop__sort {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	box-sizing: border-box !important;
	width: auto !important;
	max-width: max-content;
	flex: 0 0 auto !important;
	height: 38px !important;
	background-color: #1a1a1a !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #a8a8a8 !important;
	border: 1px solid #2e2e2e !important;
	border-radius: 0 !important;
	padding: 0 8px !important;
	font-size: 12px !important;
	line-height: 1.4;
}

.ufwc-shop__view-toggle {
	display: flex;
	gap: 4px;
}

.ufwc-shop__view-toggle button {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	background-color: #1a1a1a !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #a8a8a8;
	fill: #a8a8a8;
	border: 0 !important;
	margin: 0;
	padding: 0;
	overflow: visible;
	border-radius: 0 !important;
	cursor: pointer;
	line-height: 1;
	font-size: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ufwc-shop__view-toggle button .ufwc-icon {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.ufwc-shop__view-toggle button.is-active {
	background-color: #f4c60a !important;
	color: #1a1a1a;
	fill: #1a1a1a;
}

.ufwc-shop__results.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.ufwc-shop__results[data-view="grid"] .ufwc-list {
	display: none;
}

.ufwc-shop__results[data-view="list"] .ufwc-grid {
	display: none;
}

.ufwc-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ufwc-row {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px;
	background-color: #1a1a1a;
	border-radius: 6px;
}

.ufwc-row__media {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 4px;
	overflow: hidden;
	display: block;
	background-color: #ffffff;
}

.ufwc-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ufwc-row__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ufwc-row__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}

.ufwc-row__title a {
	color: #ffffff;
	text-decoration: none;
}

.ufwc-row__desc {
	font-size: 13px;
	line-height: 1.5;
	color: #a8a8a8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ufwc-row__price {
	font-size: 14px;
	font-weight: 700;
	color: #f4c60a;
}

.ufwc-row__action {
	flex-shrink: 0;
}

.ufwc-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.ufwc-pagination__btn {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	box-sizing: border-box !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	margin: 0;
	padding: 0 10px;
	background-color: #1a1a1a !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #ffffff !important;
	border: 1px solid #2e2e2e !important;
	border-radius: 0 !important;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ufwc-pagination__btn:hover:not(:disabled):not(.is-active) {
	color: #f4c60a !important;
}

.ufwc-pagination__btn.is-active {
	background-color: #f4c60a !important;
	color: #1a1a1a !important;
	border-color: #f4c60a !important;
}

.ufwc-pagination__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.ufwc-shop__body,
	.ufwc-shop--sidebar-right .ufwc-shop__body {
		grid-template-columns: 1fr;
	}

	.ufwc-shop--sidebar-right .ufwc-shop__sidebar {
		order: 0;
	}

	.ufwc-shop__toolbar {
		flex-wrap: wrap;
		justify-content: center;
	}

	.ufwc-shop__clear-filters {
		width: 100% !important;
		justify-content: center;
	}

	/* Category filter becomes a dropdown instead of the accordion list. */
	.ufwc-cat-list {
		display: none;
	}

	.ufwc-cat-select {
		display: block;
	}

	/* Price range and brand checkboxes run inline instead of stacking. */
	.ufwc-price-list,
	.ufwc-brand-list {
		display: flex;
		flex-wrap: wrap;
		gap: 6px 18px;
	}

	.ufwc-price-list li,
	.ufwc-brand-list li {
		padding: 0;
	}
}
