/* =========================================================
   AWI Shop Sidebar Filter — Lime Green Theme (XStore style)
   ========================================================= */

.awi-shop-sidebar {
	--awi-green: #8bc53f;
	--awi-green-dark: #74ab2e;
	--awi-text: #333333;
	--awi-muted: #8a8a8a;
	--awi-border: #ececec;
	--awi-bg: #ffffff;

	font-family: inherit;
	color: var(--awi-text);
	background: var(--awi-bg);
	max-width: 320px;
}

.awi-shop-sidebar * {
	box-sizing: border-box;
}

/* ---------- Filter Block ---------- */
.awi-filter-block {
	border-bottom: 1px solid var(--awi-border);
	padding: 20px 0;
}
.awi-filter-block:first-child {
	padding-top: 0;
}

.awi-filter-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 14px;
	cursor: pointer;
}

.awi-toggle {
	background: none;
	border: none;
	font-size: 18px;
	line-height: 1;
	color: var(--awi-text);
	cursor: pointer;
	padding: 0 4px;
}

.awi-filter-body {
	overflow: hidden;
	transition: max-height 0.3s ease;
}
.awi-filter-block.awi-collapsed .awi-filter-body {
	max-height: 0 !important;
	margin: 0;
	padding: 0;
}

/* ---------- Category Search ---------- */
.awi-search-box {
	position: relative;
	margin-bottom: 12px;
}
.awi-search-box input {
	width: 100%;
	padding: 9px 34px 9px 12px;
	border: 1px solid var(--awi-border);
	border-radius: 4px;
	font-size: 13px;
	outline: none;
}
.awi-search-box input:focus {
	border-color: var(--awi-green);
}
.awi-search-box svg {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--awi-muted);
}

/* ---------- Category List ---------- */
.awi-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.awi-cat-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
}
.awi-cat-list li.awi-cat-hidden {
	display: none;
}
.awi-cat-list li.awi-cat-hidden.awi-force-show {
	display: flex;
}
.awi-cat-list li.awi-search-hidden {
	display: none !important;
}

.awi-cat-list label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	flex: 1;
}

.awi-cat-checkbox,
.awi-stock-checkbox {
	appearance: none;
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	min-width: 16px;
	border: 1.5px solid #c9c9c9;
	border-radius: 3px;
	position: relative;
	cursor: pointer;
	margin: 0;
	transition: all 0.15s ease;
}
.awi-cat-checkbox:checked,
.awi-stock-checkbox:checked {
	background: var(--awi-green);
	border-color: var(--awi-green);
}
.awi-cat-checkbox:checked::after,
.awi-stock-checkbox:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.awi-cat-name {
	color: var(--awi-text);
}
.awi-cat-list label:hover .awi-cat-name {
	color: var(--awi-green-dark);
}

.awi-cat-count {
	font-size: 12px;
	color: var(--awi-muted);
}

.awi-show-more {
	background: none;
	border: none;
	color: var(--awi-green-dark);
	font-size: 13px;
	font-weight: 600;
	margin-top: 8px;
	cursor: pointer;
	padding: 0;
}
.awi-show-more:hover {
	text-decoration: underline;
}

/* ---------- Price Slider ---------- */
.awi-price-slider {
	position: relative;
	height: 4px;
	margin: 30px 4px 16px;
}
.awi-slider-track,
.awi-slider-range {
	position: absolute;
	height: 4px;
	border-radius: 2px;
	top: 0;
}
.awi-slider-track {
	width: 100%;
	background: #e2e2e2;
}
.awi-slider-range {
	background: var(--awi-green);
}

.awi-price-slider input[type="range"] {
	position: absolute;
	width: 100%;
	top: -8px;
	height: 20px;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}
.awi-price-slider input[type="range"]::-webkit-slider-thumb {
	pointer-events: all;
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--awi-green);
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.awi-price-slider input[type="range"]::-moz-range-thumb {
	pointer-events: all;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--awi-green);
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.awi-price-slider input[type="range"]::-webkit-slider-runnable-track {
	background: transparent;
}

.awi-price-label {
	font-size: 13px;
	color: var(--awi-text);
}
.awi-price-label span {
	font-weight: 600;
}

/* ---------- Stock Status ---------- */
.awi-stock-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	padding: 6px 0;
	cursor: pointer;
}

/* ---------- Buttons ---------- */
.awi-filter-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}
.awi-btn {
	flex: 1;
	padding: 11px 10px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}
.awi-btn-apply {
	background: var(--awi-green);
	color: #fff;
}
.awi-btn-apply:hover {
	background: var(--awi-green-dark);
}
.awi-btn-clear {
	background: #f2f2f2;
	color: var(--awi-text);
}
.awi-btn-clear:hover {
	background: #e5e5e5;
}

.awi-result-count {
	font-size: 12px;
	color: var(--awi-muted);
	margin-top: 14px;
	text-align: center;
}

/* ---------- Product Grid Loading State ---------- */
#awi-product-grid {
	position: relative;
	min-height: 200px;
	transition: opacity 0.25s ease;
}
#awi-product-grid.awi-loading {
	opacity: 0.4;
	pointer-events: none;
}
#awi-product-grid.awi-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 3px solid #e2e2e2;
	border-top-color: #8bc53f;
	border-radius: 50%;
	animation: awi-spin 0.7s linear infinite;
}
@keyframes awi-spin {
	to { transform: rotate(360deg); }
}

.awi-no-products {
	text-align: center;
	padding: 40px 0;
	color: #8a8a8a;
	font-size: 15px;
}

#awi-pagination-wrap {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 25px;
}
#awi-pagination-wrap span,
#awi-pagination-wrap a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	border-radius: 4px;
	font-size: 13px;
	text-decoration: none;
	color: var(--awi-text);
	border: 1px solid var(--awi-border);
}
#awi-pagination-wrap span.current,
#awi-pagination-wrap a:hover {
	background: var(--awi-green);
	color: #fff;
	border-color: var(--awi-green);
}

/* Responsive */
@media (max-width: 767px) {
	.awi-shop-sidebar {
		max-width: 100%;
		margin-bottom: 25px;
	}
}
