/**
 * Bộ lọc nâng cao — sidebar cửa hàng.
 */

.sanomart-advanced-filters {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
}

.sanomart-advanced-filters__form {
	margin: 0;
}

.sanomart-advanced-filters__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.sanomart-advanced-filters__icon {
	display: inline-flex;
	color: #111827;
	flex-shrink: 0;
}

.sanomart-advanced-filters__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

.sanomart-advanced-filters__reset-wrap {
	margin: 0;
	padding: 0.5rem 1rem 0;
}

.sanomart-advanced-filters__reset {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
}

.sanomart-advanced-filters__reset:hover {
	text-decoration: underline;
}

/* Nhóm accordion */
.sanomart-filter-group {
	border-bottom: 1px solid #e5e7eb;
}

.sanomart-filter-group:last-child {
	border-bottom: 0;
}

.sanomart-filter-group__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 0.85rem 1rem;
	border: 0;
	background: #fff;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: #111827;
}

.sanomart-filter-group__toggle:hover {
	background: #f9fafb;
}

.sanomart-filter-group__label {
	font-size: 0.875rem;
	font-weight: 700;
}

.sanomart-filter-group__chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid #6b7280;
	border-bottom: 2px solid #6b7280;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-top: -3px;
}

.sanomart-filter-group.is-open .sanomart-filter-group__chevron {
	transform: rotate(-135deg);
	margin-top: 3px;
}

.sanomart-filter-group__body {
	padding: 0 1rem 1rem;
}

.sanomart-filter-group__body[hidden] {
	display: none !important;
}

/* Checkbox list */
.sanomart-filter-checklist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sanomart-filter-checklist--scroll {
	max-height: 220px;
	overflow-y: auto;
	padding-right: 2px;
}

.sanomart-filter-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.35rem 0;
	cursor: pointer;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #374151;
}

.sanomart-filter-check__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.sanomart-filter-check__box {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	border: 1.5px solid #d1d5db;
	border-radius: 3px;
	background: #fff;
	position: relative;
}

.sanomart-filter-check.is-checked .sanomart-filter-check__box {
	background: #2563eb;
	border-color: #2563eb;
}

.sanomart-filter-check.is-checked .sanomart-filter-check__box::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.sanomart-filter-check__text {
	flex: 1;
	min-width: 0;
}

.sanomart-filter-more {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2563eb;
	cursor: pointer;
}

.sanomart-filter-more__chevron {
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -2px;
}

.sanomart-filter-more.is-expanded .sanomart-filter-more__chevron {
	transform: rotate(-135deg);
	margin-top: 2px;
}

/* Giá bán — nút pill */
.sanomart-filter-prices {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sanomart-filter-price {
	display: block;
	margin: 0;
	cursor: pointer;
}

.sanomart-filter-price__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sanomart-filter-price__label {
	display: block;
	padding: 0.55rem 0.75rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: #374151;
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sanomart-filter-price:hover .sanomart-filter-price__label {
	border-color: #93c5fd;
}

.sanomart-filter-price.is-active .sanomart-filter-price__label,
.sanomart-filter-price__input:checked + .sanomart-filter-price__label {
	border-color: #2563eb;
	background: #eff6ff;
	color: #1d4ed8;
	font-weight: 600;
}

.sanomart-filter-price--clear .sanomart-filter-price__label {
	border-style: dashed;
	color: #6b7280;
	font-weight: 500;
}

/* Sidebar wrapper */
.sanomart-shop__filters .sanomart-advanced-filters {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 0;
	background: #fff;
}

.sanomart-shop__filters {
	background: transparent;
	border: 0;
	padding: 0;
}

@media (min-width: 992px) {
	.sanomart-shop__filters {
		position: sticky;
		top: 1rem;
	}
}
