/* Hagda Filtros — barra horizontal arriba del grid */

.hf-bar {
	position: relative;
	z-index: 30;
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.4;
}

/* Tipografía: el JS lee la fuente computada del menú del tema y la expone
   como --hf-font; sin JS se hereda la del sitio (los <button>/<input> no
   heredan fuente por default, hay que forzarlo). */
.hf-bar {
	font-family: var(--hf-font, inherit);
}
.hf-bar button,
.hf-bar input {
	font-family: inherit;
}

.hf-groups {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hf-group {
	position: relative;
}

/* Botón del grupo */
/* Mismo tratamiento tipográfico que el menú de Flatsome:
   mayúsculas, bold y letter-spacing. */
.hf-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: var(--hf-font-weight, 700);
	text-transform: uppercase;
	letter-spacing: var(--hf-letter-spacing, .02em);
	color: #222;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
	min-height: 40px;
	line-height: 1;
	white-space: nowrap;
}
.hf-toggle:hover {
	border-color: #999;
}
.hf-toggle.has-sel {
	border-color: #111;
	box-shadow: inset 0 0 0 1px #111;
}
.hf-group.open .hf-toggle {
	border-color: #111;
}

.hf-badge {
	display: inline-block;
	min-width: 18px;
	padding: 2px 5px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
}

.hf-caret {
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .15s;
}
.hf-group.open .hf-caret {
	transform: rotate(-135deg) translateY(-2px);
}

/* Panel desplegable */
.hf-panel {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
	padding: 14px;
	min-width: 280px;
	max-width: min(92vw, 460px);
	max-height: 60vh;
	overflow: auto;
	z-index: 40;
}
.hf-group.open .hf-panel {
	display: block;
}

/* Pills genéricos */
.hf-pill {
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	color: #222;
	cursor: pointer;
	transition: background .12s, border-color .12s, color .12s;
	line-height: 1.2;
	min-height: 36px;
}
.hf-pill:hover {
	border-color: #111;
}
.hf-pill.is-on {
	background: #111;
	border-color: #111;
	color: #fff;
}

/* Tallas: cuadrícula de botones */
.hf-talla-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
	gap: 6px;
}
.hf-talla-grid .hf-pill {
	text-align: center;
	padding: 8px 4px;
}

/* Listas verticales (colaboraciones, colores) */
.hf-vlist {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 210px;
}
.hf-vlist .hf-pill {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 8px 10px;
}
.hf-vlist .hf-pill:hover {
	background: #f5f5f5;
	border-color: transparent;
}
.hf-vlist .hf-pill.is-on {
	background: #111;
	border-color: #111;
	color: #fff;
}

/* Colores */
.hf-color-pill {
	display: flex;
	align-items: center;
	gap: 9px;
}
.hf-swatch {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .18);
	flex: 0 0 auto;
}
.hf-color-pill.is-on .hf-swatch {
	box-shadow: 0 0 0 2px #fff;
}

/* Categorías */
.hf-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hf-cat-list .hf-cat-list {
	padding-left: 16px;
}
.hf-cat-list li {
	margin: 0;
}
.hf-cat-list label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 4px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13.5px;
	color: #222;
}
.hf-cat-list label:hover {
	background: #f5f5f5;
}
.hf-cat-list input[type="checkbox"] {
	margin: 0;
	accent-color: #111;
}
.hf-muted {
	color: #999;
	font-size: 12px;
}

/* Precio */
.hf-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}
.hf-price-row {
	display: flex;
	align-items: center;
	gap: 8px;
}
.hf-price-row input[type="number"] {
	width: 90px;
	padding: 8px 10px;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	font-size: 14px;
	min-height: 38px;
}
.hf-price-sep {
	color: #999;
}
.hf-price-apply {
	background: #111;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	min-height: 38px;
}
.hf-price-apply:hover {
	background: #333;
}

/* Botón "Listo" (útil en móvil) */
.hf-done {
	display: block;
	width: 100%;
	margin-top: 12px;
	background: #f2f2f2;
	border: none;
	border-radius: 8px;
	padding: 9px;
	font-size: 13px;
	font-weight: 600;
	color: #222;
	cursor: pointer;
}

/* Chips de filtros activos */
.hf-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}
.hf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f2f2f2;
	border: none;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12.5px;
	color: #222;
	cursor: pointer;
}
.hf-chip:hover {
	background: #e6e6e6;
}
.hf-chip-x {
	font-size: 15px;
	line-height: 1;
	color: #666;
}
.hf-clear {
	background: none;
	border: none;
	padding: 5px 8px;
	font-size: 12.5px;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
}
.hf-clear:hover {
	color: #111;
}

/* Leyenda en tarjetas de la cola de agotados */
.hf-oos-note {
	font-size: 12px;
	line-height: 1.35;
	color: #b3261e;
	margin: 4px 0 2px;
}

/* Estado de carga: atenuar el grid mientras responde el AJAX */
body.hf-loading .products {
	opacity: .4;
	pointer-events: none;
	transition: opacity .2s;
}

/* Móvil: los botones hacen wrap (sin scroll horizontal),
   panel como bottom sheet */
@media (max-width: 768px) {
	.hf-groups {
		flex-wrap: wrap;
	}
	.hf-panel {
		position: fixed;
		left: 10px;
		right: 10px;
		bottom: 10px;
		top: auto;
		min-width: 0;
		max-width: none;
		max-height: 65vh;
		box-shadow: 0 -8px 40px rgba(0, 0, 0, .25);
	}
}
