/* Sidebar Component */
.sidebar {
	position: sticky;
	top: 120px;
	background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
	border: 2px solid rgba(139, 92, 246, 0.15);
	border-radius: 1.25rem;
	padding: 2.5rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
	max-height: calc(100vh - 140px);
	overflow-y: auto;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
	width: 6px;
}

.sidebar::-webkit-scrollbar-track {
	background: rgba(139, 92, 246, 0.05);
	border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
	background: rgba(139, 92, 246, 0.3);
	border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(139, 92, 246, 0.5);
}

.sidebar:hover {
	box-shadow: 0 8px 30px rgba(139, 92, 246, 0.12);
	border-color: rgba(139, 92, 246, 0.25);
}


.sidebar-close {
	display: none;
}

.sidebar-section {
	margin-bottom: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 2px solid rgba(139, 92, 246, 0.1);
}

.sidebar-section:last-of-type {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
}

.sidebar-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.sidebar-section h3 {
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--black);
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--font-sans);
	letter-spacing: -0.01em;
}

.sidebar-section h3 svg {
	width: 20px;
	height: 20px;
	color: #8b5cf6;
	stroke-width: 2;
	flex-shrink: 0;
	filter: drop-shadow(0 1px 4px rgba(139, 92, 246, 0.2));
}

/* Search Input */
.search-input {
	position: relative;
	width: 100%;
}

.search-input input {
	width: 100%;
	padding: 0.875rem 3rem 0.875rem 1.25rem;
	border: 2px solid rgba(139, 92, 246, 0.15);
	border-radius: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--gray-700);
	background: var(--white);
	transition: all 0.2s ease;
	font-family: var(--font-sans);
}

.search-input input::placeholder {
	color: var(--gray-400);
}

.search-input input:hover {
	border-color: rgba(139, 92, 246, 0.3);
	background: rgba(139, 92, 246, 0.02);
}

.search-input input:focus {
	outline: none;
	border-color: #8b5cf6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
	background: var(--white);
}

.search-input svg {
	position: absolute;
	right: 1.125rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gray-400);
	pointer-events: none;
	transition: color 0.2s ease;
}

.search-input input:focus + svg {
	color: #8b5cf6;
}

/* Filter Group */
.filter-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.filter-checkbox {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	cursor: pointer;
	padding: 0.875rem 1rem;
	border-radius: 0.625rem;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.filter-checkbox:hover {
	background: rgba(139, 92, 246, 0.05);
	border-color: rgba(139, 92, 246, 0.15);
}

.filter-checkbox input[type="checkbox"] {
	width: 20px;
	height: 20px;
	border: 2px solid var(--gray-300);
	border-radius: 6px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: var(--white);
	transition: all 0.2s ease;
	position: relative;
	flex-shrink: 0;
	margin: 0;
}

.filter-checkbox input[type="checkbox"]:hover {
	border-color: #8b5cf6;
	background: rgba(139, 92, 246, 0.05);
}

.filter-checkbox input[type="checkbox"]:checked {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	border-color: #8b5cf6;
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.filter-checkbox input[type="checkbox"]:checked::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 12px;
	font-weight: bold;
}

.filter-checkbox label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	cursor: pointer;
	font-size: 0.9375rem;
	color: var(--gray-700);
	font-weight: 500;
	margin: 0;
	transition: color 0.2s ease;
}

.filter-checkbox:hover label {
	color: var(--black);
}

.filter-count {
	color: var(--gray-500);
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.25rem 0.625rem;
	background: rgba(139, 92, 246, 0.08);
	border-radius: 12px;
	transition: all 0.2s ease;
}

.filter-checkbox:hover .filter-count {
	background: rgba(139, 92, 246, 0.15);
	color: #8b5cf6;
}

/* Price Range */
.price-range {
	padding: 0.5rem 0 0;
}

.price-inputs {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 0.75rem;
	align-items: center;
}

.price-input {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.price-input label {
	font-size: 0.6875rem;
	color: var(--gray-600);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.price-input input {
	padding: 0.75rem 1rem;
	border: 2px solid rgba(139, 92, 246, 0.15);
	border-radius: 0.625rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gray-700);
	background: var(--white);
	transition: all 0.2s ease;
	font-family: var(--font-sans);
}

.price-input input:hover {
	border-color: rgba(139, 92, 246, 0.3);
	background: rgba(139, 92, 246, 0.02);
}

.price-input input:focus {
	outline: none;
	border-color: #8b5cf6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
	background: var(--white);
}

.price-separator {
	color: var(--gray-400);
	font-weight: 600;
	margin-top: 1.5rem;
	font-size: 1.125rem;
}

/* Year Range */
.year-range {
	padding: 0.5rem 0 0;
}

.year-slider {
	margin-top: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.year-slider input[type="range"] {
	width: 100%;
	height: 6px;
	background: linear-gradient(to right, 
		rgba(139, 92, 246, 0.2) 0%, 
		rgba(139, 92, 246, 0.2) 100%);
	border-radius: 3px;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
}

.year-slider input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	border: 3px solid var(--white);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
	transition: all 0.2s ease;
}

.year-slider input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

.year-slider input[type="range"]::-webkit-slider-thumb:active {
	transform: scale(1.05);
}

.year-slider input[type="range"]::-moz-range-thumb {
	width: 20px;
	height: 20px;
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	border: 3px solid var(--white);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
	transition: all 0.2s ease;
}

.year-slider input[type="range"]::-moz-range-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

.year-slider input[type="range"]::-moz-range-thumb:active {
	transform: scale(1.05);
}

.year-values {
	display: flex;
	justify-content: space-between;
	margin-top: 1rem;
	font-size: 0.9375rem;
	color: var(--gray-700);
	font-weight: 700;
	padding: 0.625rem 1rem;
	background: rgba(139, 92, 246, 0.05);
	border-radius: 0.5rem;
}

/* Sidebar Actions */
.sidebar-actions {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.apply-filters-btn,
.reset-filters-btn {
	width: 100%;
	padding: 1rem 1.75rem;
	border: none;
	border-radius: 0.75rem;
	font-weight: 600;
	font-size: 0.9375rem;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: var(--font-sans);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.apply-filters-btn {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	color: var(--white);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
	border: 2px solid transparent;
}

.apply-filters-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.apply-filters-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.reset-filters-btn {
	background: transparent;
	color: var(--gray-600);
	border: 2px solid var(--gray-300);
}

.reset-filters-btn:hover {
	border-color: var(--gray-400);
	color: var(--gray-700);
	background: var(--gray-100);
}

.reset-filters-btn:active {
	background: var(--gray-200);
}

/* Mobile Sidebar */
@media (max-width: 968px) {
	.sidebar {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.7);
		z-index: 1000;
		padding: 0;
		border-radius: 0;
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		max-height: none;
		border: none;
	}
	
	.sidebar.active {
		display: flex;
		align-items: flex-start;
		justify-content: flex-start;
	}
	
	.sidebar-content {
		position: relative;
		width: 90%;
		max-width: 400px;
		height: 100%;
		background: var(--white);
		padding: 2.5rem 2rem;
		overflow-y: auto;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
		animation: slideInLeft 0.3s ease-out;
	}
	
	@keyframes slideInLeft {
		from {
			transform: translateX(-100%);
			opacity: 0;
		}
		to {
			transform: translateX(0);
			opacity: 1;
		}
	}
	
	.sidebar-close {
		display: flex;
		position: absolute;
		top: 1.5rem;
		right: 1.5rem;
		width: 44px;
		height: 44px;
		background: var(--gray-100);
		border: 2px solid var(--gray-300);
		border-radius: 50%;
		cursor: pointer;
		align-items: center;
		justify-content: center;
		transition: all 0.3s ease;
		z-index: 10;
	}
	
	.sidebar-close svg {
		width: 20px;
		height: 20px;
		color: var(--gray-600);
	}
	
	.sidebar-close:hover {
		background: var(--gray-200);
		border-color: var(--gray-400);
		transform: rotate(90deg);
	}
	
	.sidebar-close:hover svg {
		color: var(--black);
	}
}

@media (max-width: 768px) {
	.sidebar-content {
		width: 85%;
		max-width: 320px;
		padding: 2rem 1.5rem;
	}
	
	.sidebar-section {
		margin-bottom: 2rem;
		padding-bottom: 2rem;
	}
	
	.filter-checkbox {
		padding: 0.75rem 0.875rem;
	}
}
