/**
 * Rollfoods Tuotteet — front-end filter & product grid.
 * Brand-matched: dark rounded pills, yellow active state.
 */

.rf-catalog {
	--rf-brand:        #b41840;
	--rf-brand-dark:   #8f1233;
	--rf-pill-bg:      var(--rf-brand);
	--rf-pill-fg:      #ffffff;
	--rf-pill-active:  #f5e003;
	--rf-pill-active-fg:#1a1208;
	--rf-heading:      #1a1208;
	--rf-rule:         #1a1208;
	--rf-meta:         #6b6258;
	--rf-card-border:  #e7e2da;

	display: grid;
	grid-template-columns: minmax(220px, 280px) 1fr;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 781px) {
	.rf-catalog { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---- Facets ---------------------------------------------------------- */

.rf-facets { min-width: 0; }

.rf-clear {
	display: inline-block;
	margin-bottom: 1.25rem;
	font-size: 0.85rem;
	text-decoration: underline;
	color: var(--rf-meta);
}

.rf-facet { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--rf-rule); }
.rf-facet:last-child { border-bottom: 0; }

.rf-facet__title {
	margin: 0 0 0.9rem;
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--rf-heading);
}

.rf-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.rf-pill {
	display: inline-block;
	padding: 0.5rem 1.05rem;
	border-radius: 999px;
	background: var(--rf-pill-bg);
	color: var(--rf-pill-fg);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.rf-pill:hover,
.rf-pill:focus-visible { background: var(--rf-brand-dark); color: #fff; }

.rf-pill.is-active {
	background: var(--rf-pill-active);
	color: var(--rf-pill-active-fg);
}

.rf-pill.is-active:hover { background: #ffe92e; }
.rf-pill:active { transform: translateY(1px); }

/* ---- Results --------------------------------------------------------- */

.rf-results { min-width: 0; }

.rf-grid {
	display: grid;
	grid-template-columns: repeat(var(--rf-cols, 3), 1fr);
	gap: 1.5rem;
}

@media (max-width: 1024px) { .rf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .rf-grid { grid-template-columns: 1fr; } }

.rf-card {
	border: 1px solid var(--rf-card-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.rf-card:hover { box-shadow: 0 10px 28px rgba(26, 18, 8, 0.12); transform: translateY(-2px); }

.rf-card__link { display: block; color: inherit; text-decoration: none; }

.rf-card__media { display: block; aspect-ratio: 1 / 1; background: #faf8f4; }
.rf-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; }

.rf-card__body { display: block; padding: 0.9rem 1rem 1.1rem; }

.rf-card__title {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--rf-heading);
}

.rf-card__meta { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: var(--rf-meta); }

.rf-empty { color: var(--rf-meta); font-style: italic; }

/* ---- Pagination ------------------------------------------------------ */

.rf-pagination { margin-top: 2rem; }
.rf-pagination ul { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }

.rf-pagination a,
.rf-pagination span {
	display: inline-block;
	min-width: 2.4rem;
	padding: 0.45rem 0.7rem;
	text-align: center;
	border-radius: 8px;
	background: #f3efe9;
	color: var(--rf-heading);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
}

.rf-pagination a:hover { background: #e7e0d6; }
.rf-pagination .current { background: var(--rf-pill-bg); color: #fff; }
