/* FFM Product Showcase — front-end styles */

.ffm-product {
	background: #fff;
	border: 1px solid #e5e5e0;
	border-radius: 10px;
	padding: 1.6em;
	margin: 2em 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ffm-product__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5em;
	margin-bottom: 1.2em;
}

.ffm-product__badge {
	font-size: 0.85em;
	font-weight: 800;
	color: #1a5f3f;
	margin-bottom: 0.4em;
}

.ffm-product__name {
	margin: 0 0 0.3em;
	font-size: 1.3em;
	font-weight: 800;
	line-height: 1.3;
	color: #1a1a1a;
}

.ffm-product__name a {
	color: inherit !important;
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.ffm-product__image-link {
	display: block;
	flex-shrink: 0;
	width: 140px;
}

.ffm-product__price {
	font-size: 1.05em;
	font-weight: 700;
	color: #333;
}

.ffm-product__image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

/* Fallback sizing when there's no primary link to wrap the image in
   (.ffm-product__image-link won't exist in that case). */
.ffm-product__header > .ffm-product__image {
	flex-shrink: 0;
	width: 140px;
}

.ffm-product__cta {
	display: block;
	text-align: center;
	padding: 0.85em 1.4em;
	border-radius: 8px;
	font-weight: 700;
	font-size: 0.95em;
	text-decoration: none !important;
	margin-bottom: 0.7em;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.ffm-product__cta:last-of-type {
	margin-bottom: 0;
}

.ffm-product__cta--primary {
	background: #1a5f3f;
	color: #fff !important;
}

.ffm-product__cta--primary:hover {
	background: #14472f;
}

.ffm-product__cta--secondary {
	background: #eaf3ea;
	color: #1a5f3f !important;
}

.ffm-product__cta--secondary:hover {
	background: #dcebdc;
}

.ffm-product__disclosure {
	margin: 1.2em 0 0;
	font-size: 0.8em;
	color: #888;
	font-style: italic;
	text-align: center;
}

/* Accordion */

.ffm-accordion {
	border-top: 1px solid #e6e6e6;
	margin-top: 1.4em;
	padding-top: 1.2em;
}

.ffm-accordion__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-size: 1.15em;
	font-weight: 800;
	color: #1a1a1a;
	text-align: left;
}

.ffm-accordion__chevron {
	transition: transform 0.2s ease;
	font-size: 0.9em;
	color: #666;
}

.ffm-accordion:not(.is-open) .ffm-accordion__chevron {
	transform: rotate(-90deg);
}

.ffm-accordion__panel {
	overflow: hidden;
	max-height: 2000px;
	transition: max-height 0.25s ease;
	margin-top: 1.2em;
}

.ffm-accordion:not(.is-open) .ffm-accordion__panel {
	max-height: 0;
	margin-top: 0;
}

/* Rating */

.ffm-rating {
	display: flex;
	gap: 2em;
	flex-wrap: wrap;
	align-items: center;
}

.ffm-rating__gauge {
	position: relative;
	width: 120px;
	height: 120px;
	flex-shrink: 0;
}

.ffm-rating__ring {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ffm-rating__ring-bg {
	fill: none;
	stroke: #eee;
	stroke-width: 10;
}

.ffm-rating__ring-fill {
	fill: none;
	stroke: #1a5f3f;
	stroke-width: 10;
	stroke-linecap: round;
	transition: stroke-dasharray 0.3s ease;
}

.ffm-rating__gauge-text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.ffm-rating__gauge-text strong {
	font-size: 1.7em;
	font-weight: 800;
	color: #1a5f3f;
	line-height: 1;
}

.ffm-rating__gauge-text span {
	font-size: 0.72em;
	color: #888;
	margin-top: 0.2em;
}

.ffm-rating__criteria {
	flex: 1 1 280px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em 1.5em;
}

.ffm-rating__criterion-head {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.35em;
}

.ffm-rating__criterion-label {
	font-size: 0.78em;
	font-weight: 800;
	letter-spacing: 0.03em;
	color: #1a5f3f;
}

.ffm-rating__criterion-score {
	font-size: 0.78em;
	font-weight: 700;
	color: #444;
}

.ffm-dots {
	display: inline-flex;
	gap: 3px;
}

.ffm-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ddd;
}

.ffm-dot--full {
	background: #1a5f3f;
}

.ffm-dot--half {
	background: linear-gradient(90deg, #1a5f3f 50%, #ddd 50%);
}

.ffm-dot--empty {
	background: #e2e2e2;
}

/* What We Like / Don't Like */

.ffm-likes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5em;
}

.ffm-likes__title {
	font-size: 0.78em;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 0.6em;
}

.ffm-likes__title--like {
	color: #1a7a3f;
}

.ffm-likes__title--dislike {
	color: #c0392b;
}

.ffm-likes__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ffm-likes__list li {
	position: relative;
	padding-left: 1.4em;
	margin-bottom: 0.6em;
	font-size: 0.92em;
	line-height: 1.45;
	color: #333;
}

.ffm-likes__list--like li::before {
	content: '\2713';
	position: absolute;
	left: 0;
	color: #1a7a3f;
	font-weight: 700;
}

.ffm-likes__list--dislike li::before {
	content: '\2715';
	position: absolute;
	left: 0;
	color: #c0392b;
	font-weight: 700;
}

@media (max-width: 640px) {
	.ffm-product__header {
		flex-direction: column-reverse;
	}

	.ffm-product__image {
		max-width: 60%;
		margin: 0 auto 1em;
	}

	.ffm-rating {
		flex-direction: column;
		align-items: flex-start;
	}

	.ffm-rating__criteria {
		grid-template-columns: 1fr;
	}

	.ffm-likes {
		grid-template-columns: 1fr;
	}
}

/* "Best X of [year]" product grid */

.ffm-grid {
	margin: 2.5em 0;
}

.ffm-grid__title {
	font-size: 1.9em;
	font-weight: 800;
	margin: 0 0 1em;
	color: #1a1a1a;
}

.ffm-grid__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4em;
}

.ffm-grid-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: #fff;
	border: 1px solid #e5e5e0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ffm-grid-card--hidden {
	display: none;
}

.ffm-grid.is-expanded .ffm-grid-card--hidden {
	display: flex;
}

.ffm-grid-card__badge {
	width: 100%;
	background: #16181d;
	color: #fff;
	font-size: 0.72em;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0.8em 1em;
	line-height: 1.35;
}

.ffm-grid-card__image-link {
	display: block;
	padding: 1.2em 1.2em 0.6em;
}

.ffm-grid-card__image {
	width: 100%;
	max-width: 130px;
	height: 90px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.ffm-grid-card__name {
	margin: 0.3em 1em 0.2em;
	font-size: 1em;
	font-weight: 800;
	line-height: 1.35;
}

.ffm-grid-card__name a {
	color: #1a1a1a !important;
	text-decoration: underline;
}

.ffm-grid-card__rating {
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #1a5f3f;
	margin-bottom: 0.9em;
}

.ffm-grid-card__buy {
	width: calc(100% - 2.4em);
	margin-bottom: 0.7em;
}

.ffm-grid-card__buy-btn {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	background: #1a5f3f;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.82em;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	border: none;
	padding: 0.75em 1em;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ffm-grid-card__buy-btn:hover {
	background: #14472f;
}

.ffm-grid-card__buy-caret {
	font-size: 0.85em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.ffm-grid-card__buy[data-ffm-buy-dropdown].is-open .ffm-grid-card__buy-caret {
	transform: rotate(180deg);
}

/* Expands inline (pushes the card taller) instead of floating over content */

.ffm-grid-card__buy-extra {
	display: none;
	flex-direction: column;
	gap: 0.5em;
	margin-top: 0.5em;
}

.ffm-grid-card__buy[data-ffm-buy-dropdown].is-open .ffm-grid-card__buy-extra {
	display: flex;
}

.ffm-grid-card__buy-btn--alt {
	background: #1a5f3f;
}

.ffm-grid-card__buy-btn--alt:hover {
	background: #14472f;
}

.ffm-grid-card__jump {
	font-size: 0.78em;
	font-weight: 700;
	color: #1a5f3f !important;
	text-decoration: none !important;
	margin-bottom: 1.2em;
}

.ffm-grid-card__jump:hover {
	text-decoration: underline !important;
}

.ffm-grid__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	margin: 1.6em auto 0;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 999px;
	padding: 0.7em 1.6em;
	font-size: 0.82em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #1a1a1a;
	cursor: pointer;
}

.ffm-grid__toggle:hover {
	background: #f7f7f5;
}

.ffm-grid.is-expanded .ffm-grid__toggle-chevron {
	transform: rotate(180deg);
}

.ffm-grid__toggle-chevron {
	transition: transform 0.2s ease;
	font-size: 0.9em;
}

@media (max-width: 900px) {
	.ffm-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.ffm-grid__list {
		grid-template-columns: 1fr;
	}
}
