/**
 * SwiftFind — Componente: sidebar de filtros.
 * Equivale a legacy .sidebar / .pill-btn / .cat-list / .filter-block / .check / .price-* .
 */

@layer wvn-components {
	.wvn-sidebar {
		border-right: 1px solid var(--wvn-color-line);
		padding: var(--wvn-space-7) var(--wvn-space-8);
		overflow-y: auto;
		display: flex;
		flex-direction: column;
		gap: var(--wvn-space-7);
	}
	.wvn-sidebar__title {
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		color: var(--wvn-color-muted);
		margin: 0 0 10px;
	}
	.wvn-sidebar__close { display: none; }

	/* Pills (populares / recientes) */
	.wvn-pill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--wvn-space-2); }
	.wvn-pill {
		display: inline-flex;
		align-items: center;
		gap: var(--wvn-space-2);
		background: var(--wvn-color-bg);
		border: 1px solid var(--wvn-color-line);
		border-radius: var(--wvn-radius-pill);
		padding: var(--wvn-space-2) var(--wvn-space-4);
		font-size: 13px;
		color: var(--wvn-color-ink-2);
	}
	.wvn-pill:hover { border-color: var(--wvn-color-ink); color: var(--wvn-color-ink); }

	/* Categorías */
	.wvn-cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
	.wvn-cat-list__item {
		width: 100%;
		display: flex;
		align-items: center;
		gap: 10px;
		background: transparent;
		border: none;
		padding: var(--wvn-space-3) 10px;
		border-radius: var(--wvn-radius-sm);
		text-align: left;
		font-size: 13.5px;
		color: var(--wvn-color-ink-2);
	}
	.wvn-cat-list__item:hover { background: var(--wvn-color-bg); color: var(--wvn-color-ink); }
	.wvn-cat-list__icon {
		width: 32px;
		height: 32px;
		border-radius: var(--wvn-radius-sm);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: var(--wvn-color-bg);
		color: var(--wvn-color-ink);
		flex: 0 0 auto;
	}
	.wvn-cat-list__label { font-weight: 600; color: var(--wvn-color-ink); }
	.wvn-cat-list__sub { font-size: 12px; color: var(--wvn-color-muted); }
	.wvn-cat-list__chev { margin-left: auto; color: var(--wvn-color-muted); }

	/* Bloques de filtro colapsables */
	.wvn-filters { border-top: 1px solid var(--wvn-color-line); padding-top: var(--wvn-space-7); display: flex; flex-direction: column; gap: var(--wvn-space-7); }
	.wvn-filter__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: transparent;
		border: none;
		padding: 0 0 var(--wvn-space-4);
		width: 100%;
		cursor: pointer;
		font: inherit;
		font-size: 13px;
		font-weight: 700;
		letter-spacing: var(--wvn-tracking-caps);
		text-transform: uppercase;
		color: var(--wvn-color-ink);
	}
	.wvn-filter__chev { transition: transform .2s; color: var(--wvn-color-muted); }
	.wvn-filter.wvn-is-collapsed .wvn-filter__chev { transform: rotate(-90deg); }
	.wvn-filter.wvn-is-collapsed .wvn-filter__body { display: none; }
	.wvn-filter__body { display: flex; flex-direction: column; gap: var(--wvn-space-3); }

	/* Checkbox custom */
	.wvn-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--wvn-color-ink-2); }
	.wvn-check[data-depth] { padding-inline-start: calc(var(--sf-facet-depth, 0) * 14px); }
	.wvn-check:hover { color: var(--wvn-color-ink); }
	.wvn-check__input {
		appearance: none;
		width: 17px;
		height: 17px;
		border: 1.5px solid var(--wvn-color-line-2);
		border-radius: 5px;
		background: var(--wvn-color-surface);
		position: relative;
		flex: 0 0 auto;
	}
	.wvn-check__input:checked { background: var(--wvn-color-ink); border-color: var(--wvn-color-ink); }
	.wvn-check__input:checked::after {
		content: "";
		position: absolute;
		left: 4px;
		top: 1px;
		width: 5px;
		height: 9px;
		border: 2px solid var(--wvn-color-accent);
		border-top: 0;
		border-left: 0;
		transform: rotate(45deg);
	}
	.wvn-check__count { margin-left: auto; color: var(--wvn-color-muted); font-size: 12px; }

	/* Precio */
	.wvn-price__vals { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--wvn-color-muted); }
	.wvn-price__vals b { color: var(--wvn-color-ink); font-weight: 600; }
	.wvn-price__track { position: relative; height: 4px; background: var(--wvn-color-line); border-radius: var(--wvn-radius-pill); margin: 18px 0 6px; }
	.wvn-price__fill { position: absolute; height: 100%; background: var(--wvn-color-ink); border-radius: var(--wvn-radius-pill); }
	.wvn-price__range {
		position: absolute;
		top: -8px;
		left: 0;
		right: 0;
		width: 100%;
		appearance: none;
		background: transparent;
		pointer-events: none;
		height: 20px;
	}
	.wvn-price__range::-webkit-slider-thumb {
		appearance: none;
		pointer-events: auto;
		width: 18px;
		height: 18px;
		background: var(--wvn-color-ink);
		border: 3px solid var(--wvn-color-surface);
		border-radius: 50%;
		cursor: grab;
		box-shadow: 0 0 0 1px var(--wvn-color-ink);
	}
	.wvn-price__range::-moz-range-thumb {
		width: 18px;
		height: 18px;
		background: var(--wvn-color-ink);
		border: 3px solid var(--wvn-color-surface);
		border-radius: 50%;
		cursor: grab;
		box-shadow: 0 0 0 1px var(--wvn-color-ink);
	}
}
