/**
 * Apex Featured Boilers – front-end layout and cards.
 */

.apex-fb {
	--apex-fb-gap: 16px;
	--apex-fb-visible: 1;
	position: relative;
	box-sizing: border-box;
	max-width: 100%;
	display: flex;
	align-items: stretch;
	gap: 8px;
	margin: 1.5rem 0;
	color: #111;
}

.apex-fb *,
.apex-fb *::before,
.apex-fb *::after {
	box-sizing: border-box;
}

.apex-fb__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: hidden;
	overflow-y: visible;
}

@supports (overflow: clip) {
	.apex-fb__viewport {
		overflow-x: clip;
		overflow-y: visible;
	}
}

.apex-fb__track {
	min-width: 0;
	padding: 12px 0;
	transition: transform 0.35s ease;
	will-change: transform;
}

.apex-fb--grid .apex-fb__track {
	display: grid;
	gap: var(--apex-fb-gap);
	transform: none !important;
}

@media (max-width: 767px) {
	.apex-fb--grid .apex-fb__track {
		grid-template-columns: repeat(var(--apex-fb-cols-mobile), 238px);
		justify-content: start;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.apex-fb--grid .apex-fb__track {
		grid-template-columns: repeat(var(--apex-fb-cols-tablet), 238px);
		justify-content: start;
	}
}

@media (min-width: 1024px) {
	.apex-fb--grid .apex-fb__track {
		grid-template-columns: repeat(var(--apex-fb-cols-desktop), 238px);
		justify-content: start;
	}
}

.apex-fb--slider .apex-fb__track {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: var(--apex-fb-gap);
}

.apex-fb--slider .apex-fb__card {
	flex: 0 0 238px;
	width: 238px;
	min-width: 238px;
	max-width: 238px;
}

.apex-fb__nav {
	display: none;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	min-height: 48px;
	border: 1px solid #d4d4d4;
	border-radius: 8px;
	background: #fff;
	color: #111;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	transition: opacity 0.2s ease, border-color 0.2s ease;
	align-self: center;
}

.apex-fb__nav:hover,
.apex-fb__nav:focus-visible {
	border-color: #16a34a;
	outline: 2px solid rgba(22, 163, 74, 0.25);
	outline-offset: 2px;
}

.apex-fb--slider .apex-fb__nav {
	display: flex;
}

.apex-fb__nav--hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.apex-fb__nav[disabled] {
	opacity: 0.35;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.apex-fb__nav {
		width: 44px;
		height: 44px;
		min-height: 0;
		flex: 0 0 44px;
		border-radius: 50%;
		padding: 0;
	}

	.apex-fb__nav span {
		line-height: 1;
		display: block;
		font-size: 1rem;
	}

	.apex-fb--slider .apex-fb__viewport {
		touch-action: pan-y pinch-zoom;
		cursor: grab;
	}

	.apex-fb--slider.apex-fb--viewport-dragging .apex-fb__viewport {
		cursor: grabbing;
	}
}

.apex-fb__card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	overflow: visible;
	display: flex;
	flex-direction: column;
	width: 238px;
	min-width: 238px;
	max-width: 238px;
	flex-shrink: 0;
	min-height: 100%;
	position: relative;
	z-index: 1;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.apex-fb__card:hover {
	transform: translateY(-3px);
	z-index: 2;
	box-shadow: 0 11px 28px rgba(0, 0, 0, 0.1);
}

.apex-fb__card--recommended:hover {
	box-shadow: 0 11px 30px rgba(0, 43, 73, 0.16);
}

.apex-fb__card--recommended {
	border: 2px solid #002b49;
	box-shadow: 0 8px 24px rgba(0, 43, 73, 0.12);
}

.apex-fb__brand {
	margin: 0 0 5px;
	padding: 10px 10px 8px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.35;
	color: inherit;
	border-radius: 8px 8px 0 0;
}

.apex-fb__media {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 6px;
	padding: 0 10px 8px;
	min-height: 160px;
}

.apex-fb__rail {
	flex: 0 0 32px;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	background: #f4f4f5;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 4px;
	color: #444;
}

.apex-fb__imgwrap {
	flex: 1 1 auto;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafafa;
	border-radius: 10px;
	border: 1px solid #eee;
	min-height: 160px;
	overflow: hidden;
}

.apex-fb__imgwrap--has-bg {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.apex-fb__imginner {
	position: relative;
	z-index: 1;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: inherit;
}

.apex-fb__img {
	display: block;
	position: relative;
	z-index: 0;
	max-width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
}

.apex-fb__placeholder {
	display: block;
	width: 100%;
	min-height: 180px;
	background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.apex-fb__body {
	position: relative;
	padding: 10px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
	overflow: visible;
	z-index: 0;
}

.apex-fb__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.25;
	color: #0a0a0a;
}

.apex-fb__subtitle {
	margin: 0;
	font-size: 0.82rem;
	color: #6b7280;
	line-height: 1.35;
}

.apex-fb__stars {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
}

.apex-fb__star-row {
	display: inline-flex;
	gap: 2px;
	color: #7c3aed;
}

.apex-fb__star {
	font-size: 1rem;
	line-height: 1;
}

.apex-fb__rating-num {
	font-weight: 700;
	color: #111;
}

.apex-fb__reviews-link {
	color: #16a34a;
	font-weight: 600;
	text-decoration: underline;
}

.apex-fb__reviews-count {
	color: #16a34a;
	font-weight: 600;
}

.apex-fb__highlights {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.apex-fb__pill {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 4px;
	line-height: 1.2;
}

.apex-fb__features {
	margin: 0;
	padding: 0 0 0 1.1rem;
	font-size: 0.82rem;
	color: #374151;
	line-height: 1.45;
}

.apex-fb__features li {
	margin: 2px 0;
}

.apex-fb__features li::marker {
	color: #16a34a;
}

.apex-fb__desc {
	font-size: 0.85rem;
	line-height: 1.5;
	color: #374151;
}

.apex-fb__desc p {
	margin: 0 0 0.5rem;
}

.apex-fb__price-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 6px;
}

.apex-fb__price-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	color: #6b7280;
	max-width: 55%;
	line-height: 1.3;
}

.apex-fb__price-wrap {
	flex-shrink: 0;
	text-align: right;
}

.apex-fb__price {
	display: inline-flex;
	align-items: baseline;
	gap: 1px;
	line-height: 1;
	white-space: nowrap;
}

.apex-fb__price-currency {
	font-size: 0.75rem;
	font-weight: 800;
	color: #111;
	line-height: 1;
}

.apex-fb__price-amount {
	font-size: 29px;
	font-weight: 900;
	color: #111;
	line-height: 1;
}

.apex-fb__tip-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	z-index: 2;
	vertical-align: middle;
}

.apex-fb__info {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: none;
	background: #16a34a;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 900;
	line-height: 1;
	padding: 0;
	cursor: help;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.apex-fb__info:focus,
.apex-fb__info:focus-visible {
	outline: none;
	box-shadow: none;
}

.apex-fb__tooltip {
	position: absolute;
	left: 0;
	right: auto;
	top: auto;
	bottom: calc(100% + 6px);
	transform: none;
	background: #111;
	color: #fff;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 0.72rem;
	line-height: 1.35;
	width: max-content;
	max-width: calc(238px - 28px);
	min-width: 0;
	z-index: 20;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	white-space: normal;
	hyphens: auto;
	text-align: left;
	box-sizing: border-box;
}

.apex-fb__tip-wrap:focus-within .apex-fb__tooltip,
.apex-fb__tip-wrap:hover .apex-fb__tooltip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.apex-fb__extra-tips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	position: relative;
	z-index: 1;
}

.apex-fb__extra-tips .apex-fb__tip-wrap {
	z-index: 3;
}

.apex-fb__cta {
	margin-top: 4px;
}

.apex-fb__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 16px;
	font-weight: 800;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 8px;
	box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
	transition: filter 0.15s ease, transform 0.1s ease;
}

.apex-fb__button:hover,
.apex-fb__button:focus-visible {
	filter: brightness(1.05);
	transform: translateY(-1px);
	outline: 2px solid rgba(0, 0, 0, 0.08);
	outline-offset: 2px;
}

.apex-fb__footer {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0;
	flex-wrap: nowrap;
	background: #f4f4f5;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 0.78rem;
	color: #374151;
	margin-top: 4px;
}

.apex-fb__footer-img {
	flex: 0 0 auto;
	align-self: center;
	margin-right: 5px;
	line-height: 0;
}

.apex-fb__footer-thumb {
	display: block;
	width: auto;
	height: var(--apex-fb-footer-img-h, 29px);
	max-height: var(--apex-fb-footer-img-h, 29px);
	max-width: 120px;
	object-fit: contain;
	object-position: left center;
}

.apex-fb__footer-text {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 14px;
}

.apex-fb__footer-text p {
	margin: 0 0 0.35em;
}

.apex-fb__footer-text p:last-child {
	margin-bottom: 0;
}

.apex-fb__footer-text a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

.apex-fb__footer .apex-fb__footer-text a:hover,
.apex-fb__footer .apex-fb__footer-text a:focus-visible {
	text-decoration: none !important;
	box-shadow: 0 1px 0 0 currentColor !important;
}

@media (forced-colors: active) {
	.apex-fb__footer .apex-fb__footer-text a:hover,
	.apex-fb__footer .apex-fb__footer-text a:focus-visible {
		text-decoration: underline !important;
		box-shadow: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.apex-fb__track {
		transition: none;
	}
	.apex-fb__card {
		transition: none;
	}
	.apex-fb__card:hover {
		transform: none;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
	}
	.apex-fb__card--recommended:hover {
		box-shadow: 0 8px 24px rgba(0, 43, 73, 0.12);
	}
}
