/**
 * Barra de filtros y "Cargar más productos".
 *
 * Hereda la tipografía del tema a propósito: esto tiene que parecer parte de la
 * tienda, no una pieza pegada encima.
 */

:root {
	--tdp-fc-acento: #8FE600;
}

.tdp-fc-barra {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 24px;
}

.tdp-fc-pastilla {
	position: relative;
}

.tdp-fc-boton {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	color: #2f3542;
	background: #fff;
	border: 1px solid #e3e6ec;
	border-radius: 10px;
	padding: 12px 16px;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.tdp-fc-boton:hover {
	border-color: #c9cfda;
}

.tdp-fc-pastilla.is-activa .tdp-fc-boton {
	border-color: var(--tdp-fc-acento);
	box-shadow: inset 0 0 0 1px var(--tdp-fc-acento);
}

.tdp-fc-resumen {
	font-size: 13px;
	color: #6b7280;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tdp-fc-flecha {
	width: 8px;
	height: 8px;
	border-right: 2px solid #9aa1ad;
	border-bottom: 2px solid #9aa1ad;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .15s ease;
}

.tdp-fc-pastilla.is-abierta .tdp-fc-flecha {
	transform: rotate(-135deg) translate(-3px, -3px);
}

.tdp-fc-panel {
	position: absolute;
	z-index: 60;
	top: calc(100% + 6px);
	left: 0;
	min-width: 260px;
	max-width: 340px;
	max-height: 320px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e3e6ec;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(20, 25, 35, .12);
	padding: 8px;
}

.tdp-fc-opcion {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	color: #2f3542;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.3;
}

.tdp-fc-opcion:hover {
	background: #f5f7fa;
	color: #2f3542;
}

.tdp-fc-marca {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 1px solid #c9cfda;
	border-radius: 4px;
}

.tdp-fc-opcion.is-puesta .tdp-fc-marca {
	background: var(--tdp-fc-acento);
	border-color: var(--tdp-fc-acento);
	position: relative;
}

.tdp-fc-opcion.is-puesta .tdp-fc-marca::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 4px;
	height: 9px;
	border-right: 2px solid #14210a;
	border-bottom: 2px solid #14210a;
	transform: rotate(45deg);
}

.tdp-fc-texto {
	flex: 1 1 auto;
}

.tdp-fc-cuenta {
	flex: 0 0 auto;
	font-size: 12px;
	color: #8a93a2;
}

.tdp-fc-rango {
	display: flex;
	gap: 10px;
	padding: 8px 10px 4px;
}

.tdp-fc-rango label {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: #6b7280;
}

.tdp-fc-rango input {
	width: 100%;
	font: inherit;
	font-size: 14px;
	padding: 8px 10px;
	border: 1px solid #e3e6ec;
	border-radius: 8px;
	background: #fff;
	color: #2f3542;
}

.tdp-fc-pista {
	margin: 4px 10px 0;
	font-size: 12px;
	color: #8a93a2;
}

.tdp-fc-aplicar {
	margin: 10px;
	width: calc(100% - 20px);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 14px;
	border: 0;
	border-radius: 8px;
	background: var(--tdp-fc-acento);
	color: #14210a;
	cursor: pointer;
}

.tdp-fc-limpiar {
	font-size: 14px;
	color: #6b7280;
	text-decoration: none;
	padding: 12px 4px;
}

.tdp-fc-limpiar:hover {
	color: #b91c1c;
}

/* ------------------------------------------------------------------ *
 * Cargar más
 * ------------------------------------------------------------------ */

.tdp-fc-mas {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 32px 0 8px;
	text-align: center;
}

.tdp-fc-cuenta-total {
	margin: 0;
	font-size: 15px;
	color: #8a93a2;
}

.tdp-fc-boton-mas {
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	background: #21262e;
	border: 0;
	border-radius: 10px;
	padding: 16px 34px;
	cursor: pointer;
	transition: background .15s ease;
}

.tdp-fc-boton-mas:hover:not(:disabled) {
	background: #11151b;
}

.tdp-fc-boton-mas:disabled {
	opacity: .7;
	cursor: default;
}

.tdp-fc-progreso {
	width: min(390px, 80%);
	height: 8px;
	border-radius: 999px;
	background: #e7e9ee;
	overflow: hidden;
}

.tdp-fc-progreso span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--tdp-fc-acento);
	transition: width .35s ease;
}

.tdp-fc-error {
	margin: 0;
	font-size: 14px;
	color: #b91c1c;
}

/* La paginación de siempre se esconde cuando hay botón, pero sigue en el HTML:
   es la única forma de recorrer el catálogo sin JavaScript, y por donde entran
   los buscadores. */
.tdp-fc-con-boton .woocommerce-pagination {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.tdp-fc-barra {
		gap: 8px;
	}

	.tdp-fc-boton {
		font-size: 14px;
		padding: 10px 13px;
	}

	.tdp-fc-panel {
		min-width: 220px;
		max-width: calc(100vw - 32px);
	}
}

/* El "Ordenar" del tema sobra cuando pintamos el nuestro: dos controles que
   hacen lo mismo, uno al lado del otro. Se esconde, no se quita, para que un
   tema que dependa de ese <select> siga encontrándolo. */
.tdp-fc-con-ordenar .woocommerce-ordering {
	display: none !important;
}
