/*
 * Desktop Shop Filter Sidebar
 *
 * Premium WooCommerce filter styling for tablet and desktop.
 * Mobile filter drawer styles are intentionally excluded.
 */

/* Mobile-first: hide sidebar on mobile devices */
@media (max-width: 767px) {
	.tw-shop-layout__sidebar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		visibility: hidden !important;
	}

	.tw-shop-filter-sidebar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		visibility: hidden !important;
	}
}

@media (min-width: 768px) {
	.tw-shop-filter-sidebar {
		--tw-filter-text: var(--tw-color-text, #1c1c1a);
		--tw-filter-muted: #95857d;
		--tw-filter-border: #e5ddd0;
		--tw-filter-accent: var(--tw-color-accent, #a8823d);
		--tw-filter-focus: rgba(168, 130, 61, 0.12);
		--tw-filter-sticky-offset: 148px;

		position: sticky;
		top: var(--tw-filter-sticky-offset);
		width: 100%;
		max-width: 100%;
		max-height: calc(100vh - var(--tw-filter-sticky-offset) - 40px);
		max-height: calc(100dvh - var(--tw-filter-sticky-offset) - 40px);
		padding: 0;
		overflow-x: hidden;
		overflow-y: auto;
		box-sizing: border-box;
		background-color: transparent;
		color: var(--tw-filter-text);
		overscroll-behavior: contain;
		scrollbar-color: var(--tw-filter-border) transparent;
		scrollbar-width: thin;
	}

	.tw-shop-filter-sidebar[hidden] {
		display: none !important;
	}

	.tw-shop-filter-sidebar,
	.tw-shop-filter-sidebar *,
	.tw-shop-filter-sidebar *::before,
	.tw-shop-filter-sidebar *::after {
		box-sizing: border-box;
	}

	.tw-shop-filter-sidebar::-webkit-scrollbar {
		width: 4px;
	}

	.tw-shop-filter-sidebar::-webkit-scrollbar-track {
		background: transparent;
	}

	.tw-shop-filter-sidebar::-webkit-scrollbar-thumb {
		border-radius: 999px;
		background-color: var(--tw-filter-border);
	}

	.tw-shop-filter-sidebar__groups {
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.tw-shop-filter-group {
		width: 100%;
		margin: 0;
		padding: 0;
		border-bottom: 1px solid var(--tw-filter-border);
	}

	.tw-shop-filter-group:first-child {
		border-top: 1px solid var(--tw-filter-border);
	}

	.tw-shop-filter-group__heading {
		margin: 0;
		padding: 0;
		font: inherit;
	}

	.tw-shop-filter-group__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		width: 100%;
		min-height: 48px;
		margin: 0;
		padding: 0 12px;
		border: 0;
		border-radius: 0;
		appearance: none;
		background: transparent;
		color: var(--tw-filter-text);
		font: inherit;
		text-align: left;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: color 180ms ease;
	}

	.tw-shop-filter-group__toggle:hover {
		color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__toggle:focus {
		outline: none;
	}

	.tw-shop-filter-group__toggle:focus-visible {
		outline: 2px solid var(--tw-filter-accent);
		outline-offset: -2px;
	}

	.tw-shop-filter-group__label {
		min-width: 0;
		font-size: 13px;
		font-weight: 500;
		line-height: 1.35;
		letter-spacing: 0.05em;
		text-transform: uppercase;
	}

	.tw-shop-filter-group__indicator {
		position: relative;
		flex: 0 0 14px;
		width: 14px;
		height: 14px;
		overflow: hidden;
		color: transparent;
		font-size: 0;
		line-height: 0;
		transform: rotate(0deg);
		transition: transform 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
	}

	.tw-shop-filter-group__indicator::before,
	.tw-shop-filter-group__indicator::after {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 8px;
		height: 0.75px;
		background-color: currentColor;
		content: "";
		transform: translate(-50%, -50%);
		transform-origin: center;
		transition:
			opacity 240ms ease,
			transform 240ms ease;
	}

	.tw-shop-filter-group__indicator::after {
		transform: translate(-50%, -50%) rotate(90deg);
	}

	.tw-shop-filter-group__toggle[aria-expanded="true"]
		.tw-shop-filter-group__indicator {
		transform: rotate(180deg);
	}

	.tw-shop-filter-group__toggle[aria-expanded="true"]
		.tw-shop-filter-group__indicator::after {
		opacity: 0;
		transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
	}

	.tw-shop-filter-group__panel {
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.tw-shop-filter-group__panel[hidden] {
		display: none !important;
	}

	.tw-shop-filter-group__toggle[aria-expanded="true"]
		+ .tw-shop-filter-group__panel
		.tw-shop-filter-group__content {
		animation: tw-filter-panel-enter 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
	}

	.tw-shop-filter-group__content {
		width: 100%;
		padding: 8px 0 16px 12px;
		color: var(--tw-filter-text);
		font-size: 13px;
		font-weight: 400;
		line-height: 1.55;
	}

	.tw-shop-filter-group__content .widget,
	.tw-shop-filter-group__content .widget-content,
	.tw-shop-filter-group__content form {
		width: 100%;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
	}

	.tw-shop-filter-group__content .widget-title,
	.tw-shop-filter-group__content > h2,
	.tw-shop-filter-group__content > h3 {
		display: none;
	}

	.tw-shop-filter-group__content ul {
		width: 100%;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.tw-shop-filter-group__content li {
		position: relative;
		display: flex;
		align-items: center;
		width: 100%;
		min-height: 36px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.tw-shop-filter-group__content li + li {
		margin-top: 2px;
	}

	.tw-shop-filter-group__content li > a {
		position: relative;
		display: flex;
		align-items: center;
		flex: 1 1 auto;
		gap: 9px;
		min-width: 0;
		min-height: 36px;
		padding: 6px 20px 6px 26px;
		color: var(--tw-filter-text);
		font-size: 13px;
		font-weight: 400;
		line-height: 1.5;
		text-decoration: none;
		transition: color 180ms ease;
	}

	.tw-shop-filter-group__content li > a::before {
		position: absolute;
		top: 50%;
		left: 0;
		width: 13px;
		height: 13px;
		border: 1px solid var(--tw-filter-border);
		border-radius: 1px;
		background-color: transparent;
		content: "";
		transform: translateY(-50%);
		transition:
			border-color 180ms ease,
			background-color 180ms ease;
	}

	.tw-shop-filter-group__content li > a::after {
		position: absolute;
		top: 50%;
		left: 3px;
		width: 5px;
		height: 7px;
		border-right: 1.15px solid var(--tw-filter-accent);
		border-bottom: 1.15px solid var(--tw-filter-accent);
		content: "";
		opacity: 0;
		transform: translateY(-60%) rotate(45deg) scale(0.5);
		transition:
			opacity 180ms ease,
			transform 180ms ease;
	}

	.tw-shop-filter-group__content li > a:hover {
		color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content li > a:hover::before {
		border-color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content li > a:focus {
		outline: none;
	}

	.tw-shop-filter-group__content li > a:focus-visible {
		outline: 2px solid var(--tw-filter-accent);
		outline-offset: 1px;
	}

	.tw-shop-filter-group__content
		li.chosen
		> a::before,
	.tw-shop-filter-group__content
		li.woocommerce-widget-layered-nav-list__item--chosen
		> a::before,
	.tw-shop-filter-group__content
		li.current-cat
		> a::before {
		border-color: var(--tw-filter-accent);
		background-color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content
		li.chosen
		> a::after,
	.tw-shop-filter-group__content
		li.woocommerce-widget-layered-nav-list__item--chosen
		> a::after,
	.tw-shop-filter-group__content
		li.current-cat
		> a::after {
		opacity: 1;
		transform: translateY(-60%) rotate(45deg) scale(1);
	}

	.tw-shop-filter-group__content .count {
		position: absolute;
		top: 50%;
		right: 4px;
		color: var(--tw-filter-muted);
		font-size: 11px;
		font-weight: 400;
		line-height: 1;
		transform: translateY(-50%);
	}

	.tw-shop-filter-group__content label {
		color: var(--tw-filter-text);
		font-size: 13px;
		font-weight: 400;
		line-height: 1.5;
		cursor: pointer;
	}

	.tw-shop-filter-group__content input[type="checkbox"],
	.tw-shop-filter-group__content input[type="radio"] {
		flex: 0 0 auto;
		width: 13px;
		height: 13px;
		margin: 0 9px 0 0;
		border: 1px solid var(--tw-filter-border);
		accent-color: var(--tw-filter-accent);
		cursor: pointer;
		transition: border-color 180ms ease;
	}

	.tw-shop-filter-group__content input[type="checkbox"]:hover,
	.tw-shop-filter-group__content input[type="radio"]:hover {
		border-color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content input[type="checkbox"]:focus-visible,
	.tw-shop-filter-group__content input[type="radio"]:focus-visible {
		outline: 2px solid var(--tw-filter-accent);
		outline-offset: 2px;
	}

	.tw-shop-filter-group__content input[type="text"],
	.tw-shop-filter-group__content input[type="number"],
	.tw-shop-filter-group__content input[type="search"],
	.tw-shop-filter-group__content select {
		width: 100%;
		height: 40px;
		margin: 0;
		padding: 0 11px;
		border: 1px solid var(--tw-filter-border);
		border-radius: 1px;
		appearance: none;
		background-color: transparent;
		color: var(--tw-filter-text);
		font: inherit;
		font-size: 13px;
		line-height: 1.5;
		transition:
			border-color 180ms ease,
			box-shadow 180ms ease;
	}

	.tw-shop-filter-group__content input[type="text"]:hover,
	.tw-shop-filter-group__content input[type="number"]:hover,
	.tw-shop-filter-group__content input[type="search"]:hover,
	.tw-shop-filter-group__content select:hover {
		border-color: #b5aca0;
	}

	.tw-shop-filter-group__content input[type="text"]:focus,
	.tw-shop-filter-group__content input[type="number"]:focus,
	.tw-shop-filter-group__content input[type="search"]:focus,
	.tw-shop-filter-group__content select:focus {
		border-color: var(--tw-filter-accent);
		outline: none;
		box-shadow: 0 0 0 3px var(--tw-filter-focus);
	}

	.tw-shop-filter-group__content .price_slider_wrapper {
		width: 100%;
		padding-top: 6px;
		padding-right: 4px;
	}

	.tw-shop-filter-group__content .price_slider {
		position: relative;
		height: 1.5px;
		margin: 8px 4px 24px;
		border: 0;
		border-radius: 999px;
		background-color: var(--tw-filter-border);
	}

	.tw-shop-filter-group__content .price_slider .ui-slider-range {
		position: absolute;
		z-index: 1;
		height: 100%;
		border: 0;
		border-radius: 999px;
		background-color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content .price_slider .ui-slider-handle {
		position: absolute;
		z-index: 2;
		top: 50%;
		width: 12px;
		height: 12px;
		margin-left: -6px;
		border: 1.5px solid var(--tw-filter-accent);
		border-radius: 50%;
		background-color: transparent;
		cursor: ew-resize;
		transform: translateY(-50%);
		transition:
			background-color 180ms ease,
			box-shadow 180ms ease;
	}

	.tw-shop-filter-group__content .price_slider .ui-slider-handle:hover,
	.tw-shop-filter-group__content .price_slider .ui-slider-handle:focus {
		background-color: var(--tw-filter-accent);
		outline: none;
		box-shadow: 0 0 0 3px var(--tw-filter-focus);
	}

	.tw-shop-filter-group__content .price_slider_amount {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 10px;
		width: 100%;
		margin: 0;
		padding: 0 4px;
		text-align: left;
	}

	.tw-shop-filter-group__content .price_slider_amount::after {
		display: none;
		content: none;
	}

	.tw-shop-filter-group__content .price_label {
		min-width: 0;
		color: var(--tw-filter-muted);
		font-size: 12px;
		line-height: 1.5;
	}

	.tw-shop-filter-group__content .price_slider_amount .button,
	.tw-shop-filter-group__content button[type="submit"] {
		min-width: 76px;
		min-height: 40px;
		margin: 0;
		padding: 0 12px;
		border: 1px solid var(--tw-filter-text);
		border-radius: 1px;
		background-color: var(--tw-filter-text);
		color: #ffffff;
		font: inherit;
		font-size: 11px;
		font-weight: 600;
		line-height: 1;
		letter-spacing: 0.04em;
		cursor: pointer;
		transition:
			border-color 180ms ease,
			background-color 180ms ease;
	}

	.tw-shop-filter-group__content .price_slider_amount .button:hover,
	.tw-shop-filter-group__content button[type="submit"]:hover {
		border-color: var(--tw-filter-accent);
		background-color: var(--tw-filter-accent);
	}

	.tw-shop-filter-group__content .price_slider_amount .button:focus-visible,
	.tw-shop-filter-group__content button[type="submit"]:focus-visible {
		outline: 2px solid var(--tw-filter-accent);
		outline-offset: 2px;
	}

	@keyframes tw-filter-panel-enter {
		from {
			opacity: 0;
			transform: translateY(-2px);
		}

		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.tw-shop-filter-sidebar {
		--tw-filter-sticky-offset: 136px;
	}

	.tw-shop-filter-group__toggle {
		min-height: 44px;
		padding: 0 11px;
	}

	.tw-shop-filter-group__label {
		font-size: 12px;
	}
}

@media (min-width: 1024px) {
	.tw-shop-filter-sidebar {
		--tw-filter-sticky-offset: 148px;
	}
}

@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
	.tw-shop-filter-sidebar *,
	.tw-shop-filter-sidebar *::before,
	.tw-shop-filter-sidebar *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}