.apf-shell,
.apf-shell *,
.apf-shell *::before,
.apf-shell *::after {
	box-sizing: border-box;
}

.apf-shell {
	--apf-red: #d71920;
	--apf-red-dark: #ae1017;
	--apf-ink: #111827;
	--apf-muted: #6b7280;
	--apf-line: #e5e7eb;
	--apf-soft: #f8fafc;
	width: 100%;
	font-family: inherit;
	color: var(--apf-ink);
}

.apf-filter-panel {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(270px, 0.9fr);
	background: #fff;
	border: 1px solid rgba(17, 24, 39, 0.07);
	border-radius: 18px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.11);
	overflow: hidden;
}

.apf-filter-panel__fields {
	display: grid;
	grid-template-columns: 1fr 1.35fr;
	gap: 12px 14px;
	padding: 20px;
}

.apf-field {
	display: block;
	min-width: 0;
}

.apf-field__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.apf-control {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--apf-line);
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apf-control:focus-within {
	border-color: rgba(215, 25, 32, 0.65);
	box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.08);
}

.apf-control__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	display: inline-flex;
	color: #374151;
	transform: translateY(-50%);
	pointer-events: none;
}

.apf-control select,
.apf-control input {
	width: 100%;
	min-width: 0;
	height: 46px;
	margin: 0;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--apf-ink);
	font: inherit;
	font-size: 14px;
}

.apf-control select {
	padding: 0 38px 0 42px;
	cursor: pointer;
}

.apf-control input {
	padding: 0 46px 0 15px;
}

.apf-control input::placeholder {
	color: #9ca3af;
	opacity: 1;
}

.apf-search-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	display: inline-flex;
	color: #111827;
	transform: translateY(-50%);
	pointer-events: none;
}

.apf-rating {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 24px;
	border-left: 1px solid var(--apf-line);
	background:
		linear-gradient(135deg, rgba(215, 25, 32, 0.035), transparent 55%),
		#fff;
}

.apf-rating__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.apf-rating__copy strong {
	margin-bottom: 2px;
	font-size: 14px;
	line-height: 1.3;
}

.apf-rating__copy > span {
	color: var(--apf-muted);
	font-size: 11px;
	line-height: 1.45;
}

.apf-stars {
	margin-top: 10px;
	color: var(--apf-red);
	font-size: 17px;
	letter-spacing: 3px;
	white-space: nowrap;
}

.apf-rating__copy small {
	margin-top: 5px;
	color: var(--apf-muted);
	font-size: 11px;
}

.apf-rating__score {
	display: flex;
	align-items: baseline;
	white-space: nowrap;
}

.apf-rating__score strong {
	color: var(--apf-red-dark);
	font-size: clamp(28px, 3vw, 43px);
	line-height: 1;
	letter-spacing: -1.8px;
}

.apf-rating__score span {
	color: #9ca3af;
	font-size: 23px;
	font-weight: 700;
}

.apf-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 58px;
	margin-top: 22px;
	color: var(--apf-muted);
	font-size: 14px;
}

.apf-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid #e5e7eb;
	border-top-color: var(--apf-red);
	border-radius: 50%;
	animation: apf-spin 0.7s linear infinite;
}

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

.apf-results {
	margin-top: 28px;
	transition: opacity 0.2s ease;
}

.apf-results.is-loading {
	opacity: 0.42;
	pointer-events: none;
}

.apf-results__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 16px;
}

.apf-results__head strong {
	font-size: 18px;
}

.apf-reset {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--apf-red);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.apf-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.apf-card {
	overflow: hidden;
	min-width: 0;
	border: 1px solid var(--apf-line);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.apf-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 35px rgba(15, 23, 42, 0.09);
}

.apf-card__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--apf-soft);
}

.apf-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 13px;
	transition: transform 0.3s ease;
}

.apf-card:hover .apf-card__image img {
	transform: scale(1.035);
}

.apf-card__body {
	padding: 16px;
}

.apf-card__tag {
	display: inline-flex;
	margin-bottom: 9px;
	padding: 5px 8px;
	border-radius: 999px;
	background: rgba(215, 25, 32, 0.08);
	color: var(--apf-red-dark);
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.apf-card__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.35;
}

.apf-card__title a {
	color: var(--apf-ink);
	text-decoration: none;
}

.apf-card__capacity {
	margin: 8px 0 0;
	color: #374151;
	font-size: 12px;
	font-weight: 700;
}

.apf-card__excerpt {
	margin: 9px 0 15px;
	color: var(--apf-muted);
	font-size: 13px;
	line-height: 1.6;
}

.apf-card__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--apf-red);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
}

.apf-card__link span {
	transition: transform 0.2s ease;
}

.apf-card__link:hover span {
	transform: translateX(3px);
}

.apf-empty {
	padding: 34px 24px;
	border: 1px dashed #d1d5db;
	border-radius: 14px;
	background: var(--apf-soft);
	text-align: center;
}

.apf-empty strong {
	font-size: 17px;
}

.apf-empty p {
	margin: 7px 0 14px;
	color: var(--apf-muted);
	font-size: 14px;
}

.apf-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.apf-page {
	width: 38px;
	height: 38px;
	border: 1px solid var(--apf-line);
	border-radius: 9px;
	background: #fff;
	color: var(--apf-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.apf-page.is-active,
.apf-page:hover {
	border-color: var(--apf-red);
	background: var(--apf-red);
	color: #fff;
}

.apf-filter-form.is-disabled {
	pointer-events: none;
}

@media (max-width: 1024px) {
	.apf-filter-panel {
		grid-template-columns: 1fr;
	}

	.apf-rating {
		border-top: 1px solid var(--apf-line);
		border-left: 0;
	}

	.apf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.apf-filter-panel {
		border-radius: 15px;
	}

	.apf-filter-panel__fields {
		grid-template-columns: 1fr;
		padding: 15px;
	}

	.apf-rating {
		padding: 18px;
	}

	.apf-rating__score strong {
		font-size: 34px;
	}

	.apf-grid {
		grid-template-columns: 1fr;
	}

	.apf-results__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}
}
