.product-shop {
	display: flex;
	gap: 28px;
}

.category-sidebar {
	flex: 0 0 300px;
	position: sticky;
}

@media (max-width: 1199px) {
	.category-sidebar {
		position: fixed;
		left: 0;
		top: 0 !important;
		background: hsl(var(--white));
		padding: 42px 16px 16px 16px;
		z-index: 99999;
		width: 100%;
		max-width: 324px;
		height: 100vh;
		height: 100dvh;
		overflow-y: auto;
		overflow-x: hidden;
		transform: translateX(-100%);
		transition: transform 0.3s ease-in, visibility 0.3s ease-in;
		visibility: hidden;
		pointer-events: none;
		-webkit-overflow-scrolling: touch;
	}

	.category-sidebar.active {
		transform: translateX(0);
		visibility: visible;
		pointer-events: auto;
	}
}

.product-filter-form {
	position: sticky;
	top: 242px;
}

.filter-in {
	font-size: 0.875rem;
	text-align: center;
	color: hsl(var(--white));
	border-radius: 3px;
	margin: 1px;
	cursor: pointer;
	background-color: hsl(var(--base));
	padding: 5px 10px;
}

.close-sidebar {
	color: hsl(var(--black) / 0.5) !important;
	position: absolute;
	background: transparent;
	right: 8px;
	top: 9px;
	font-size: 1.25rem;
}

.filter-overflow {
	max-height: 400px;
	overflow-y: auto;
}

.filter-overflow::-webkit-scrollbar {
	width: 4px;
	height: 4px;
}

.filter-overflow::-webkit-scrollbar-button {
	width: 0px;
	height: 0px;
}

.filter-overflow::-webkit-scrollbar-thumb {
	background-color: hsl(var(--border));
	border: 0px solid transparent;
	border-radius: 5px;
	background-color: #ebebeb;
	height: 10px !important;
}

.filter-overflow::-webkit-scrollbar-track {
	background-color: hsl(var(--base) / 0.1) !important;
	border-radius: 5px;
	display: none !important;
}

.widget {
	background: hsl(var(--white));
	padding: 20px;
	border-radius: 5px;
	margin-bottom: 20px;
	border: 1px solid hsl(var(--border));
}

.widget .title {
	padding-bottom: 1.2rem;
	font-size: 1.12rem;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget .ui-state-default {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: block;
	border: none;
	border-radius: 50%;
	background-color: hsl(var(--base));
	box-shadow: 0 9px 20px 0 rgba(22, 26, 57, 0.36);
	outline: none;
	cursor: pointer;
	top: -9px;
	position: absolute;
	z-index: 1;
}

.widget .ui-state-default::after {
	position: absolute;
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: hsl(var(--white));
	top: 3px;
	left: 3px;
	display: block;
}

.widget .ui-widget.ui-widget-content {
	position: relative;
	height: 3px;
	border: none;
	margin-right: 20px;
	margin-bottom: 25px;
}

.widget .ui-widget.ui-widget-content::after {
	position: absolute;
	content: "";
	top: 0;
	left: 0;
	height: 3px;
	background: hsl(var(--base) / 0.2);
	width: calc(100% + 20px);
}

.widget .ui-slider-range {
	height: 3px;
	background: hsl(var(--base));
	position: relative;
	z-index: 1;
}

.widget-check-group {
	align-items: center;
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
}

.widget-check-group:last-child {
	margin-bottom: 0;
}

.widget-check-group input {
	width: 14px;
	height: 14px;
	position: relative;
	border: none;
}

.widget-check-group input::after {
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	content: "\f00c";
	position: absolute;
	background: hsl(var(--white));
	color: hsl(var(--white));
	font-weight: 600;
	z-index: 1;
	font-family: "Line Awesome Free";
	border: 1px solid #a2a2a2;
	font-size: 10px;
	line-height: 12px;
	text-align: center;
	border-radius: 3px;
}

.widget-check-group input:checked::after {
	background: hsl(var(--base));
	border-color: hsl(var(--base));
}

.widget-check-group .form-check-input {
	margin-top: 0px !important;
}

.widget-check-group label {
	margin: 0;
	width: calc(100% - 14px);
	padding-left: 8px;
	font-size: 14px;
	color: hsl(var(--black) / 0.7);
	font-weight: 400;
}

.price-range {
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
}

.price-range .input-group .form-control:disabled,
.price-range .input-group .form-control {
	background-color: #f7f7f7;
	opacity: 1;
	border: 1px solid hsl(var(--border));
	font-weight: 400;
	padding: 0.375rem 0.75rem;
	color: hsl(var(--black) / 0.7);
}

.price-range label {
	margin: 0;
	font-weight: 400;
	color: hsl(var(--black) / 0.7);
}

.select-color {
	flex-shrink: 0;
	display: inline-block;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	position: relative;
	isolation: isolate;
	background: hsl(var(--light-3));
	outline: 1px solid hsl(var(--border));
	outline-offset: 2px;
	cursor: pointer;
}

.select-color:has(.select-color__input:checked)::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 11px;
	background: white;
	width: 2px;
	height: 2px;
	box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white,
		4px -6px 0 white, 4px -8px 0 white;
	transform: rotate(45deg);
}

.select-color__input {
	height: 0px;
}

.select-color__input {
	visibility: hidden;
	opacity: 0;
}

@supports not (gap: 1rem) {
	.select {
		margin: -0.5rem;
	}

	.select>* {
		margin: 0.5rem;
	}
}

.breadcrumb a {
	color: hsl(var(--heading-color) / 0.5);
	transition: all 0.3s ease;
}

.breadcrumb a:hover {
	color: hsl(var(--heading-color));
}

.breadcrumb-item+.breadcrumb-item::before {
	font-family: "Line Awesome Free";
	font-weight: 600;
	content: "\f105";
}

.breadcrumb li:last-child {
	color: hsl(var(--heading-color));
}

/* Product grid: 2 cols mobile, 3 tablet, 4 desktop – CSS Grid */
.products-mobile-grid {
	display: grid !important;
	gap: 0.75rem !important;
	grid-template-columns: repeat(2, 1fr) !important;
}
.products-mobile-grid__col {
	min-width: 0 !important;
	max-width: none !important;
	width: auto !important;
}
.products-mobile-grid__col.list-view-active {
	grid-column: 1 / -1 !important;
}
/* 768px–769px: still 2 columns (same as mobile) */
@media (max-width: 769px) {
	#grid-view,
	.products-mobile-grid {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
	}
	#grid-view .grid-control,
	.products-mobile-grid__col {
		min-width: 0 !important;
		max-width: none !important;
		width: auto !important;
	}
}
@media (min-width: 770px) {
	.products-mobile-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}
@media (min-width: 992px) {
	.products-mobile-grid {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

.list-view-active {
	flex: 0 0 100%;
	max-width: 100%;
}

.list-view-active .product-card {
	display: flex;
	flex-wrap: wrap;
}

.list-view-active .product-card .product-thumb {
	width: 240px;
	position: relative;
	display: flex;
}

@media (max-width: 767px) {
	.list-view-active .product-card .product-thumb {
		width: 200px;
	}
}

.list-view-active .product-card .product-thumb a {
	height: 100%;
}

.list-view-active .product-card .product-thumb img {
	height: 100%;
	object-fit: cover;
}

.list-view-active .product-card .product-thumb .product-card-buttons {
	opacity: 1;
	transform: translate(0);
}

.list-view-active .product-card .product-thumb .product-card-buttons li {
	transform: translate(0);
}

.list-view-active .product-card .product-content {
	width: calc(100% - 240px);
	padding-left: 24px;
}

@media (max-width: 767px) {
	.list-view-active .product-card .product-content {
		padding-left: 12px;
		width: calc(100% - 200px);
	}
}

@media screen and (max-width: 575px) {

	.list-view-active .product-card .product-thumb,
	.list-view-active .product-card .product-content {
		width: 100%;
		padding: 0;
	}
}

.list-view-active .product-card:hover .product-before-content {
	transform: translateY(0);
}

.list-view-active .single_content {
	padding-top: 20px;
	padding-bottom: 0;
	display: block;
}

.list-view-active .product-card .product-content .product-after-content {
	position: relative;
	opacity: 1;
	transform: scale(1);
	text-align: left;
}

.list-view-active .product-card .product-content .product-after-content .price {
	display: none;
}

.list-view-active .single_content__info {
	flex-direction: column-reverse;
}

.list-view-active .add-to-cart-btn {
	width: unset;
}

/* ========== Products listing – mobile layout ========== */
@media (max-width: 1199px) {
	/* Remove big top space on products listing page (sidebar is off-canvas) */
	.py-60:has(.product-shop) {
		padding-top: 1rem !important;
	}

	.product-shop {
		display: block;
		gap: 0;
	}

	/* Prevent horizontal scroll from off-canvas sidebar */
	.py-60 .product-shop {
		overflow-x: hidden;
	}

	.products-container {
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}

	/* On mobile: remove category sidebar and Filter button entirely */
	.category-sidebar {
		display: none !important;
	}

	.py-60 .filter-in,
	.py-60 .filter-select-item:has(.filter-in) {
		display: none !important;
	}
}

/* ========== Products page mobile – professional layout ========== */
@media (max-width: 767px) {
	.py-60:has(.product-shop) {
		padding-top: 1.25rem !important;
		padding-bottom: 2rem !important;
	}

	.py-60:has(.product-shop) .breadcrumb {
		margin-bottom: 1rem !important;
		font-size: 0.8125rem;
	}

	.product-shop .container,
	.py-60 .container {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* Filter bar: clean stacked layout */
	.filter-category-header {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		margin-bottom: 1.25rem !important;
		padding-bottom: 1rem;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.filter-category-header .filter-select-item {
		flex-direction: row !important;
		align-items: center !important;
	}

	.filter-category-header .filter-select-right {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	.filter-category-header .filter-select-item p.mb-0 {
		font-size: 0.8125rem;
		min-width: 4rem;
	}

	.filter-category-header .select-item .form--control,
	.filter-category-header .select-item .form--select {
		min-width: 0;
		flex: 1;
	}

	/* Product grid: 2 columns on mobile (769px and below) – CSS Grid overrides row/flex */
	#grid-view,
	.products-mobile-grid {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0.75rem !important;
		margin-top: 0 !important;
	}
	#grid-view .grid-control,
	#grid-view .products-mobile-grid__col,
	.products-mobile-grid__col {
		padding: 0 !important;
		min-width: 0 !important;
		max-width: none !important;
		width: auto !important;
	}
	#grid-view .grid-control.list-view-active,
	.products-mobile-grid__col.list-view-active {
		grid-column: 1 / -1 !important;
	}

	/* Product cards: polished look, no red bleed */
	#grid-view .grid-control {
		background: transparent !important;
	}

	#grid-view .product-card {
		background: #fff !important;
		border-radius: 12px;
		overflow: hidden;
		box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
		border: 1px solid rgba(0, 0, 0, 0.06);
		transition: box-shadow 0.2s ease, border-color 0.2s ease;
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	#grid-view .product-card:hover {
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
		border-color: rgba(0, 100, 40, 0.2);
	}

	#grid-view .product-card .product-thumb {
		aspect-ratio: 1;
		overflow: hidden;
		background: #f0f0f0 !important;
		position: relative;
		flex-shrink: 0;
	}

	#grid-view .product-card .product-thumb a {
		display: block;
		width: 100%;
		height: 100%;
		background: #f0f0f0 !important;
	}

	#grid-view .product-card .product-thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		background: #f0f0f0 !important;
	}

	#grid-view .product-card .product-thumb img[src*="default"],
	#grid-view .product-card .product-thumb img:not([data-src]) {
		background: #e8e8e8 !important;
	}

	#grid-view .product-card .product-content {
		padding: 0.75rem !important;
		background: #fff !important;
		flex: 1;
		min-height: 0;
	}

	#grid-view .product-card .product-content .title a {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.35;
		color: #1a1a1a;
	}

	#grid-view .product-card .product-content .price {
		font-size: 0.9375rem;
		font-weight: 600;
		color: #006428;
		margin-top: 0.25rem;
	}

	#grid-view .product-card .add-to-cart-btn,
	#grid-view .product-card .quickViewBtn.add-to-cart-btn {
		margin-top: 0.5rem;
		font-size: 0.8125rem;
		padding: 0.5rem 0.75rem;
		border-radius: 8px;
		font-weight: 600;
	}

	.view-style {
		justify-content: flex-start;
	}

	.py-60 .empty-message {
		padding: 2.5rem 1.5rem !important;
		border-radius: 12px;
		background: #f8f9fa;
	}
}

@media (max-width: 575px) {
	.py-60 .breadcrumb {
		flex-wrap: wrap;
		gap: 0.25rem;
	}

	.py-60 .pagination-wrapper {
		margin-top: 1.5rem !important;
		padding-top: 1.25rem !important;
	}

	.py-60 .pagination .page-link {
		padding: 0.5rem 0.75rem !important;
		font-size: 0.8125rem;
		border-radius: 8px;
	}
}