/* Textilbirodalom termékszűrő */

/* ------------------------------------------------------------------
   RESET — a téma és az Elementor gomb-/űrlapstílusait semlegesítjük
   a szűrőn belül, különben "felfújja" a nyilakat és a Törlés gombot.
   ------------------------------------------------------------------ */
.tbpf button,
.tbpf input[type="checkbox"],
.tbpf input[type="number"],
.tbpf select {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	min-height: 0;
	min-width: 0;
}

.tbpf button {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	background-color: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	width: auto;
	height: auto;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: none;
}

.tbpf button:hover,
.tbpf button:focus {
	background: none;
	background-color: transparent;
	box-shadow: none;
	transform: none;
}

.tbpf {
	--tbpf-cols: 4;
	--tbpf-gap: 20px;
	--tbpf-radius: 10px;
	--tbpf-border: #e6e1da;
	--tbpf-muted: #7a7268;
	--tbpf-accent: #b08968;
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 32px;
	align-items: start;
}

/* ---- Szűrő oldalsáv ---- */
.tbpf__sidebar {
	border: 1px solid var(--tbpf-border);
	border-radius: var(--tbpf-radius);
	padding: 18px;
	position: sticky;
	top: 20px;
}

.tbpf__sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.tbpf__title { font-size: 1.1rem; margin: 0; }

.tbpf .tbpf__reset {
	color: var(--tbpf-accent);
	font-size: .85rem;
	text-decoration: underline;
	line-height: 1.4;
	flex: 0 0 auto;
}
.tbpf .tbpf__reset:hover { color: #8f6d51; }

.tbpf__group { border-top: 1px solid var(--tbpf-border); padding: 14px 0; }
.tbpf__group:first-of-type { border-top: 0; padding-top: 0; }
.tbpf__group-title {
	font-size: .78rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tbpf-muted);
	margin: 0 0 10px;
}

.tbpf__list, .tbpf__sublist { list-style: none; margin: 0; padding: 0; }
.tbpf__item { position: relative; }

.tbpf__label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	cursor: pointer;
	font-size: .93rem;
	line-height: 1.3;
}

.tbpf__cb { width: 16px; height: 16px; flex: 0 0 auto; cursor: pointer; }
.tbpf__name { flex: 1 1 auto; }
.tbpf__count { color: var(--tbpf-muted); font-size: .82rem; }

/* Alkategória-fa nyitó nyíl */
.tbpf .tbpf__item { padding-right: 26px; }

.tbpf .tbpf__toggle {
	position: absolute;
	right: 0;
	top: 4px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	flex: 0 0 auto;
}
.tbpf .tbpf__toggle::after {
	content: '';
	display: block;
	width: 6px;
	height: 6px;
	border-right: 2px solid var(--tbpf-muted);
	border-bottom: 2px solid var(--tbpf-muted);
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform .2s ease;
}
.tbpf .tbpf__toggle:hover { background: rgba(0, 0, 0, .04); }
.tbpf .tbpf__toggle[aria-expanded="true"]::after {
	transform: rotate(-135deg) translate(-1px, -1px);
}

.tbpf__sublist {
	margin-left: 22px;
	padding-left: 10px;
	border-left: 1px solid var(--tbpf-border);
}

/* Ár */
.tbpf__price { display: flex; align-items: center; gap: 8px; }
.tbpf__price input {
	width: 100%;
	min-width: 0;
	padding: 7px 9px;
	border: 1px solid var(--tbpf-border);
	border-radius: 7px;
	font-size: .9rem;
}
.tbpf__price-sep { color: var(--tbpf-muted); }

/* ---- Fő terület ---- */
.tbpf__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.tbpf__result { margin: 0; color: var(--tbpf-muted); font-size: .9rem; }
.tbpf__orderby {
	padding: 7px 10px;
	border: 1px solid var(--tbpf-border);
	border-radius: 7px;
	font-size: .9rem;
	background: #fff;
}

.tbpf__grid {
	display: grid;
	grid-template-columns: repeat(var(--tbpf-cols), minmax(0, 1fr));
	gap: var(--tbpf-gap);
	transition: opacity .2s ease;
}
/* Szűrés közben halványul a rács — de utántöltésnél NEM,
   mert ott a meglévő termékek a helyükön maradnak. */
.tbpf.is-loading:not(.is-appending) .tbpf__grid { opacity: .45; }

/* Görgetéses utántöltés jelzése */
.tbpf.is-appending .tbpf__more { visibility: hidden; }
.tbpf.is-appending .tbpf__more-wrap {
	position: relative;
	min-height: 46px;
}
.tbpf.is-appending .tbpf__more-wrap::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	border: 2px solid var(--tbpf-border);
	border-top-color: var(--tbpf-accent);
	border-radius: 50%;
	animation: tbpf-spin .7s linear infinite;
}

@keyframes tbpf-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.tbpf.is-appending .tbpf__more-wrap::after { animation-duration: 2s; }
}

.tbpf__empty {
	padding: 40px 0;
	text-align: center;
	color: var(--tbpf-muted);
}

.tbpf__more-wrap { text-align: center; margin-top: 28px; }
.tbpf .tbpf__more {
	display: inline-block;
	padding: 12px 28px;
	border: 1px solid var(--tbpf-accent);
	background: #fff;
	color: var(--tbpf-accent);
	border-radius: 999px;
	font-size: .95rem;
	line-height: 1.3;
	transition: background .2s ease, color .2s ease;
}
.tbpf .tbpf__more:hover {
	background: var(--tbpf-accent);
	background-color: var(--tbpf-accent);
	color: #fff;
}

/* ---- Kártya ---- */
.tbpf-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tbpf-border);
	border-radius: var(--tbpf-radius);
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s ease, transform .2s ease;
}
.tbpf-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }

.tbpf-card__link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1 1 auto; }
.tbpf-card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f6f3ef; }
.tbpf-card__img, .tbpf-card__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
}

.tbpf-badge {
	position: absolute;
	top: 10px; left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 600;
	color: #fff;
	background: var(--tbpf-accent);
}
.tbpf-badge--oos { left: auto; right: 10px; background: #8a8a8a; }

.tbpf-card__title {
	font-size: .95rem;
	line-height: 1.35;
	margin: 12px 14px 6px;
	font-weight: 500;
}
.tbpf-card__price { margin: 0 14px 12px; font-weight: 600; }
.tbpf-card__price del { opacity: .5; font-weight: 400; margin-right: 6px; }

.tbpf .tbpf-card__btn {
	display: block;
	margin: auto 14px 14px;
	padding: 10px 14px;
	text-align: center;
	border-radius: 7px;
	background: var(--tbpf-accent);
	color: #fff !important;          /* a téma link-színe felülírná */
	text-decoration: none;
	font-size: .88rem;
	font-weight: 500;
	line-height: 1.3;
	border: 1px solid var(--tbpf-accent);
	transition: filter .2s ease;
}
.tbpf .tbpf-card__btn:hover { filter: brightness(1.07); }

.tbpf .tbpf-card__btn--alt {
	background: transparent;
	color: var(--tbpf-accent) !important;
	border: 1px solid var(--tbpf-border);
}
.tbpf .tbpf-card__btn--alt:hover {
	border-color: var(--tbpf-accent);
	filter: none;
	background: rgba(176, 137, 104, .06);
}

/* ---- Reszponzív ---- */
@media (max-width: 1100px) {
	.tbpf { grid-template-columns: 220px 1fr; gap: 24px; }
	.tbpf__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
	.tbpf { grid-template-columns: 1fr; }
	.tbpf__sidebar { position: static; }
	.tbpf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 420px) {
	.tbpf__grid { grid-template-columns: 1fr; }
}
