/* Smart Woo Filter */
.swf {
	--swf-accent: #006fba;
	--swf-accent-soft: #eef5fb;
	--swf-border: #e6e9ee;
	--swf-text: #222;
	--swf-muted: #7a8391;
	--swf-danger: #d63638;
	font-size: 14px;
	line-height: 1.4;
	color: var(--swf-text);
}

/* Theme hay gạch chân link trong widget */
.swf a {
	text-decoration: none !important;
	box-shadow: none !important;
}

/* Reset nút (Flatsome style mọi <button>) */
.swf button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font: inherit;
	color: inherit;
}
.swf button:focus-visible,
.swf a:focus-visible {
	outline: 2px solid var(--swf-accent);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ---------- Đang lọc ---------- */
.swf-active {
	padding: 0 0 14px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--swf-border);
}
.swf-active__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.swf-active__title {
	font-weight: 700;
	font-size: 15px;
}
.swf a.swf-clear {
	color: var(--swf-danger);
	font-size: 13px;
	text-decoration: none;
}
.swf a.swf-clear:hover {
	opacity: .8;
}
.swf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.swf a.swf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 6px 3px 10px;
	border: 1px solid #cfe3f3;
	border-radius: 16px;
	background: var(--swf-accent-soft);
	color: var(--swf-accent);
	font-size: 13px;
	text-decoration: none;
	transition: background .15s, border-color .15s;
}
.swf a.swf-chip:hover {
	background: #fff;
	border-color: var(--swf-accent);
}
.swf-chip__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(0, 111, 186, .12);
	font-size: 14px;
	line-height: 1;
}

/* ---------- Nhóm ---------- */
.swf-group {
	padding: 14px 0;
	border-bottom: 1px solid var(--swf-border);
}
.swf-group:last-of-type {
	border-bottom: 0;
}
.swf .swf-group__title {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 15px;
	color: var(--swf-text);
}
.swf-caret {
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
	opacity: .6;
}
.swf-group.is-closed .swf-caret {
	transform: rotate(-45deg);
}
.swf-group__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 10px;
}
.swf-group.is-closed .swf-group__body {
	display: none;
}
.swf-group.is-collapsed .swf-extra {
	display: none;
}

/* ---------- Lựa chọn ---------- */
.swf .swf-opt,
.swf a.swf-cat {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	margin: 0 -8px;
	border-radius: 6px;
	color: var(--swf-text);
	text-decoration: none;
	transition: background .15s;
}
.swf a.swf-opt:hover,
.swf a.swf-cat:hover {
	background: #f3f7fb;
	color: var(--swf-text);
}
.swf-opt.is-disabled {
	opacity: .45;
	cursor: default;
}
.swf-opt__label {
	flex: 1 1 auto;
	min-width: 0;
}
.swf-opt__count {
	flex: 0 0 auto;
	min-width: 26px;
	padding: 1px 7px;
	border-radius: 10px;
	background: #f2f4f7;
	color: var(--swf-muted);
	font-size: 12px;
	text-align: center;
}
.swf-opt.is-active .swf-opt__label {
	font-weight: 600;
	color: var(--swf-accent);
}

/* Ô tick / nút tròn */
.swf-box {
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	border: 1.5px solid #c3ccd6;
	border-radius: 4px;
	background: #fff;
	transition: background .15s, border-color .15s;
}
.swf-opt--radio .swf-box {
	border-radius: 50%;
}
.swf a.swf-opt:hover .swf-box {
	border-color: var(--swf-accent);
}
.swf-opt.is-active .swf-box {
	border-color: var(--swf-accent);
	background: var(--swf-accent);
}
.swf-opt--checkbox.is-active .swf-box::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.swf-opt--radio.is-active .swf-box {
	background: #fff;
}
.swf-opt--radio.is-active .swf-box::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--swf-accent);
}

/* Danh mục */
.swf a.swf-cat.is-current {
	background: var(--swf-accent-soft);
	color: var(--swf-accent);
	font-weight: 600;
}
.swf a.swf-cat--back {
	color: var(--swf-muted);
	font-size: 13px;
}
.swf-cat__arrow {
	font-size: 18px;
	line-height: 1;
}

/* Xem thêm */
.swf .swf-more {
	align-self: flex-start;
	margin-top: 4px;
	padding: 4px 0;
	color: var(--swf-accent);
	font-size: 13px;
	font-weight: 600;
}
.swf .swf-more:hover {
	text-decoration: underline;
}

/* ---------- Nút "Xem N sản phẩm" (chỉ trên mobile, trong popup lọc) ---------- */
.swf-apply-bar {
	display: none;
}
@media (max-width: 849px) {
	.swf-apply-bar {
		display: block;
		position: sticky;
		bottom: 0;
		padding: 12px 0;
		background: #fff;
		z-index: 2;
	}
	.swf .swf-apply {
		display: block;
		width: 100%;
		padding: 12px;
		border-radius: 8px;
		background: var(--swf-accent);
		color: #fff;
		font-weight: 600;
		text-align: center;
	}
	.swf .swf-opt,
	.swf a.swf-cat {
		padding: 9px 8px; /* vùng bấm lớn hơn trên điện thoại */
	}
}

/* ---------- Đang tải ---------- */
html.swf-is-loading .shop-container,
html.swf-is-loading .swf {
	opacity: .55;
	pointer-events: none;
	transition: opacity .15s;
}
html.swf-is-loading body {
	cursor: progress;
}
