/**
 * Styled to match fastframe.com's existing design system (pulled directly
 * from the live site: its CSS custom properties, its own testimonial
 * slider component, and its pill-shaped buttons) rather than a generic
 * look — so this carousel reads as part of the site, not a bolted-on
 * plugin.
 *
 * Font names (Inter / PolySans / IBM Plex Mono) are referenced by name
 * only, not loaded here — the theme already loads them site-wide, and
 * each rule falls back to a generic family if it's ever used somewhere
 * those aren't available.
 */

:root {
	--ffgr-ink: #0a191e; /* fastframe.com's --black800 / body text + star fill */
	--ffgr-ink-muted: #6c7578; /* --black400 */
	--ffgr-ink-faint: #ced1d2; /* --black50, empty star fill */
	--ffgr-white: #ffffff;
	--ffgr-radius: 12px; /* fastframe.com's --radius */
	--ffgr-radius-pill: 100px; /* fastframe.com's --radiusround */
	--ffgr-font-body: "Inter", sans-serif;
	--ffgr-font-heading: "PolySans", sans-serif;
	--ffgr-font-mono: "IBM Plex Mono", monospace;
}

.ffgr-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 12px;
	margin: 0 0 20px;
	text-align: center;
}

.ffgr-avg-number {
	font-family: var(--ffgr-font-heading);
	font-size: 32px;
	font-weight: 400;
	color: var(--ffgr-ink);
	line-height: 1;
}

.ffgr-avg-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.ffgr-avg-label {
	font-family: var(--ffgr-font-mono);
	font-size: 12px;
	font-weight: 500;
	color: var(--ffgr-ink);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.ffgr-avg-count {
	font-family: var(--ffgr-font-body);
	font-size: 14px;
	color: var(--ffgr-ink-muted);
	width: 100%;
}

@media (min-width: 480px) {
	.ffgr-avg-count {
		width: auto;
	}
}

.ffgr-carousel {
	position: relative;
	max-width: 100%;
	margin: 0 auto;
}

.ffgr-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 4px 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ffgr-track::-webkit-scrollbar {
	display: none;
}

.ffgr-slide {
	flex: 0 0 85%;
	scroll-snap-align: start;
	background: var(--ffgr-white);
	border-radius: var(--ffgr-radius);
	box-shadow: none;
	padding: 32px 24px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.ffgr-slide {
		flex-basis: calc(50% - 8px);
	}
}

@media (min-width: 1000px) {
	.ffgr-slide {
		flex-basis: calc(33.333% - 11px);
	}
}

.ffgr-stars {
	margin-bottom: 12px;
}

.ffgr-star {
	display: inline-flex;
	margin-right: 2px;
}

.ffgr-star svg {
	width: 16px;
	height: 15px;
	display: block;
}

.ffgr-star path {
	fill: var(--ffgr-ink-faint);
}

.ffgr-star-filled path {
	fill: var(--ffgr-ink);
}

.ffgr-text {
	flex: 1 1 auto;
	font-family: var(--ffgr-font-body);
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	color: var(--ffgr-ink);
	margin: 0 0 20px;
}

.ffgr-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.ffgr-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ffgr-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ffgr-ink);
	color: var(--ffgr-white);
	font-family: var(--ffgr-font-body);
	font-weight: 600;
	text-transform: uppercase;
}

.ffgr-meta-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ffgr-author {
	font-family: var(--ffgr-font-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--ffgr-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ffgr-store {
	font-family: var(--ffgr-font-body);
	font-size: 13px;
	color: var(--ffgr-ink-muted);
}

.ffgr-links {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.ffgr-google-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--ffgr-font-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ffgr-ink-muted);
	text-decoration: none;
}

.ffgr-google-badge:hover {
	color: var(--ffgr-ink);
}

.ffgr-g-icon {
	flex-shrink: 0;
}

.ffgr-all-reviews-btn {
	display: inline-block;
	font-family: var(--ffgr-font-mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ffgr-ink);
	text-decoration: none;
	padding: 10px 20px;
	border: 1px solid var(--ffgr-ink);
	border-radius: var(--ffgr-radius-pill);
	transition: background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.ffgr-all-reviews-btn:hover {
	background: var(--ffgr-ink);
	color: var(--ffgr-white);
}

.ffgr-controls {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.ffgr-prev,
.ffgr-next {
	width: 48px;
	height: 48px;
	border-radius: var(--ffgr-radius-pill);
	border: 1px solid var(--ffgr-ink);
	background: transparent;
	color: var(--ffgr-ink);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
	padding: 0;
}

.ffgr-prev:hover,
.ffgr-next:hover {
	background: var(--ffgr-ink);
	color: var(--ffgr-white);
}

.ffgr-prev:focus-visible,
.ffgr-next:focus-visible {
	outline: 2px solid var(--ffgr-ink);
	outline-offset: 2px;
}
