.filtered-product-archive {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 2rem;
}

.filter-sidebar {
	/* max-height: calc(100vh - 40px); */ /* uncomment this line for sticky sidebar on desktop */
	top: 20px; /* Adjust this value based on your needs */
	overflow-y: auto; /* Allows scrolling if content is too long */
	padding-right: 15px; /* Add some padding for the scrollbar */
	/* padding: 0px 0px 60px 60px; */
	background: #f9f9f9;
	border-radius: 4px;
}

.filter-sidebar.sticky {
	will-change: transform;
}

.reset-filters-button {
	width: 100%;
	font-size: 18px;
	font-weight: bold;
	padding: 5px 0;
}

.reset-filters-button,
.reset-filters-button:focus {
	background: white;
	border: 2px solid #6a5d87;
	border-radius: 99px;
	color: #6a5d87;
}

.reset-filters-button:hover {
	background: linear-gradient(to right, #816d9c, #4a3b6a);
	color: white;
}

.reset-filters-button:hover svg path {
	fill: white;
}

.filter-group {
	margin-bottom: 46px;
}

.filter-group-title-container {
	border-bottom: 1px solid #dddddd;
	margin-bottom: 18px;
	padding-bottom: 5px;
	padding-top: 5px;
}

.filter-group h3 {
	font-size: 30px;
	font-weight: bold;
	color: #6a5d87;
	margin-bottom: 0px;
}

.filter-options-group {
	margin-bottom: 1.5rem;
}

.filter-option {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 15px;
	cursor: pointer;
	color: #161615;
	font-size: 18px;
}

.total-product-number {
	margin-right: 5px;
	color: #6a5d87;
}

.filter-option.unavailable {
	opacity: 0.5;
	cursor: not-allowed;
}

.filter-count {
	margin-right: 5px;
	color: #6a5d87;
}

/* Hide default radio button */
.filter-option input[type="radio"] {
	display: none;
}

/* Custom radio button */
.filter-option input[type="radio"] + span::before {
	content: "";
	display: inline-block;
	width: 25px;
	height: 25px;
	border: 1px solid #6a5d87;
	border-radius: 50%;
	margin-left: 8px;
	vertical-align: middle;
	transition: all 0.2s ease;
}
.filter-option input[type="radio"] + .filter-text::before {
	margin-left: 8px;
}

/* Selected state */
.filter-option input[type="radio"]:checked + span::before {
	background-color: #6a5d87;
	box-shadow: inset 0 0 0 5px white;
}

.filter-option input[type="radio"]:checked + span {
	font-weight: 500;
}

/* Disabled state */
.filter-option.unavailable input[type="radio"] + span::before {
	border-color: #a8a8a8;
}

.filter-option.unavailable input[type="radio"]:checked + span::before {
	background-color: #a8a8a8;
}

/* Number in parentheses styling */
.filter-option span {
	display: inline-flex;
	align-items: center;
}

/* Color Filter Styles */
.color-filters {
	margin-bottom: 46px;
	margin-top: 27px;
}

.color-options {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	flex-wrap: wrap;
}

.color-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 18px;
	color: #161615;
	min-width: 35px;
}

.color-option input[type="checkbox"] {
	display: none;
}

.color-swatch {
	width: 33px;
	height: 33px;
	border-radius: 50%;
	outline: 1px solid #b7b7b9;
	outline-offset: 2px;
}

.color-option input[type="checkbox"]:checked + .color-swatch {
	outline: 2px solid #6a5d87;
}

.color-option input[type="checkbox"]:checked ~ .color-name {
	font-weight: 500;
}

.color-name {
	font-size: 18px;
	color: #161615;
	text-align: center;
}

.mobile-filter-button {
	display: none;
	width: 100%;
	padding: 12px;
	background: #6a5d87;
	color: white;
	border: none;
	border-radius: 99px;
	font-size: 22px;
	font-weight: bold;
	cursor: pointer;
}

.mobile-filter-button:focus,
.mobile-filter-button:active,
.mobile-filter-button:hover {
	background: #6a5d87;
	color: white;
	border: none;
	outline: none;
}

/* Style for unavailable color options */
.color-filters .color-option.unavailable {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.color-filters .color-option.unavailable input {
	cursor: not-allowed;
}

.color-filters .color-option.unavailable .color-swatch {
	background-color: #c9c9c9 !important;
}

.color-option:hover:not(.unavailable) .color-swatch {
	outline: 2px solid #6a5d87;
}
.color-option.unavailable .color-name {
	color: #999;
}

.color-option.all-colors .color-swatch.all-colors-swatch {
	background: linear-gradient(180deg, #049dd6 0%, #2e3391 25%, #e71684 50%, #ed1e37 75%, #ff9036 100%);
	border-radius: 50%;
	outline: 1px solid #b7b7b9;
	outline-offset: 2px;
}

.filter-group-title-chevron {
	display: none;
}

.sidebar-mobile-footer {
	display: none;
}

.sidebar-mobile-header {
	display: none;
}

@media (max-width: 768px) {
	.sidebar-container {
		width: 100%;
		padding: 12px;
		background: #f9f9f9;
	}

	.mobile-filter-button {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 32px;
		height: 46px;
		position: relative;
	}

	.sidebar-container.sticky {
		position: fixed;
		top: 0;
		z-index: 99999;
		margin-bottom: 0;
	}

	.mobile-filter-button svg {
		position: absolute;
		right: 27.55px;
	}

	.filter-sidebar {
		display: none;
		padding: 20px;
		background: #f9f9f9;
		transition: transform 0.3s ease-in-out;
	}

	.filter-text {
		margin-right: 8px;
	}

	.filter-sidebar.active {
		border-radius: 0px;
		flex-direction: column;
		position: fixed;
		height: calc(100vh - 70px); /* Subtract footer height */
		width: 100vw;
		margin: 0;
		padding: 0 0 20px 0; /* Add bottom padding for content */
		background: #fff;
		top: 0;
		left: 0;
		right: 0;
		z-index: 999999;
		box-sizing: border-box;
		overflow: auto;
	}

	.filter-group:last-of-type {
		margin-bottom: 20px;
	}

	.filter-sidebar.sliding-in {
		transform: translateY(0);
	}

	.filter-sidebar.sliding-out {
		transform: translateY(100%);
	}

	.sidebar-mobile-header {
		position: sticky;
		top: 0;
		z-index: 5;
		display: flex;
		width: 100%;
		padding: 10px;
		margin: 0;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		background: #6a5d87;
	}

	.sidebar-mobile-header span {
		color: #fff;
		font-size: 30px;
		font-weight: bold;
	}

	.reset-filters-button {
		display: none;
	}

	.filter-group-title-container {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
		border-color: #6a5d87;
		margin-bottom: 15px;
		margin-top: 15px;
		padding-bottom: 15px;
	}

	.filter-group-title-container.colors-filter-container {
		border-top: 0px;
		margin-top: 0px;
		padding-top: 0px;
	}

	.filter-group-title-chevron {
		display: block;
		margin-bottom: 4px;
	}

	.filter-group h3 {
		border-color: #6a5d87;
		font-size: 22px;
	}

	.filter-group:not(:first-child) h3 {
		margin: 0;
	}

	.filter-group {
		margin-bottom: -15px;
		padding: 0 15px;
	}

	.color-filters {
		margin-top: 20px;
	}

	.color-options {
		row-gap: 10px;
		column-gap: 35px;
		padding-top: 15px;
		margin-bottom: 20px;
	}

	.color-option {
		width: 38px;
	}

	.sidebar-mobile-footer {
		display: none;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 10px;
		margin: 0;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		gap: 10px;
		background: #fff;
		box-shadow: 0px -2px 5px rgba(22, 22, 21, 0.1);
		z-index: 1000000; /* Higher than filter-sidebar */
		height: 70px; /* Fixed height */
	}

	.sidebar-mobile-footer-button {
		width: 100%;
		font-size: 22px;
		padding: 7px;
		font-weight: bold;
		border-radius: 99px;
		border: 1px solid #6a5d87;
		outline: none;
	}

	.sidebar-mobile-footer-button.reset-filters-button-mobile,
	.sidebar-mobile-footer-button.reset-filters-button-mobile:hover {
		background: #fff;
		color: #6a5d87;
	}

	.sidebar-mobile-footer-button.filter-button,
	.sidebar-mobile-footer-button.filter-button:hover {
		background: #6a5d87;
		color: #fff;
	}
}
