/* Google Reviews Sync – carousel */
.grs-widget {
	--grs-bg: #ffffff;
	--grs-card-bg: #ffffff;
	--grs-border: #d4af37;
	--grs-star: #f4b400;
	--grs-star-empty: #e0e0e0;
	--grs-text: #111111;
	--grs-muted: #6b6b6b;
	--grs-font: inherit;
	--grs-fs: 15px;
	--grs-radius: 16px;
	--grs-gap: 20px;
	--grs-pv-d: 3;
	--grs-pv-t: 2;
	--grs-pv-m: 1;
	--grs-pv: var(--grs-pv-d);
	--grs-lines: 6;
	--grs-summary-w: 240px;
	--grs-summary-bg: transparent;
	--grs-summary-color: #111111;
	--grs-summary-size: 48px;
	--grs-nav-bg: #ffffff;
	--grs-nav-color: #111111;
	--grs-dot: #d9d9d9;
	--grs-dot-active: var(--grs-border);
	font-family: var(--grs-font);
	color: var(--grs-text);
	background: var(--grs-bg);
	box-sizing: border-box;
	width: 100%;
}
.grs-widget *,
.grs-widget *::before,
.grs-widget *::after { box-sizing: border-box; }

.grs-layout {
	display: flex;
	align-items: center;
	gap: calc(var(--grs-gap) * 1.5);
}

/* ---------- Summary ---------- */
.grs-summary {
	flex: 0 0 auto;
	width: var(--grs-summary-w-active, var(--grs-summary-w));
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	padding: 16px;
	background: var(--grs-summary-bg);
	color: var(--grs-summary-color);
	border-radius: var(--grs-radius);
}
.grs-summary__rating { font-size: var(--grs-summary-size); font-weight: 700; line-height: 1.1; }
.grs-summary__count { font-size: 0.95em; color: inherit; opacity: .8; }
.grs-summary__brand,
.grs-summary__link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.grs-summary__google { font-weight: 600; font-size: 1.15em; letter-spacing: .2px; }
.grs-summary__cta {
	margin-top: 8px; display: inline-block; padding: 8px 16px; border: 1px solid var(--grs-border);
	border-radius: 999px; color: inherit; text-decoration: none; font-size: .9em;
}
.grs-summary__cta:hover, .grs-summary__cta:focus-visible { background: var(--grs-border); color: #fff; }

/* ---------- Stars ---------- */
.grs-stars { display: inline-flex; gap: 2px; line-height: 0; }
.grs-star { position: relative; display: inline-block; width: 1.15em; height: 1.15em; }
.grs-star svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--grs-star-empty); }
.grs-star::after {
	content: ""; position: absolute; inset: 0; background: var(--grs-star);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center / contain no-repeat;
	clip-path: inset(0 calc(100% - var(--grs-fill, 100%)) 0 0);
}
.grs-stars--summary { font-size: 26px; }
.grs-stars--card { font-size: 18px; margin: 10px 0 8px; }

/* ---------- Carousel ---------- */
.grs-carousel {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 28px;
}
.grs-track {
	display: flex;
	gap: var(--grs-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 10px 4px 16px;
	overscroll-behavior-x: contain;
	outline: none;
}
.grs-track::-webkit-scrollbar { display: none; }
.grs-track:focus-visible { box-shadow: 0 0 0 2px var(--grs-border); border-radius: 6px; }

.grs-card {
	position: relative;
	flex: 0 0 calc((100% - (var(--grs-pv) - 1) * var(--grs-gap)) / var(--grs-pv));
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	padding: 22px 22px 20px;
	background: var(--grs-card-bg);
	border: 1.5px solid var(--grs-border);
	border-radius: var(--grs-radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
	font-size: var(--grs-fs);
	color: var(--grs-text);
	min-height: 260px;
	overflow: hidden;
}
.grs-card__quote {
	position: absolute; right: 18px; bottom: -18px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 110px; line-height: 1; color: var(--grs-border); opacity: .18;
	pointer-events: none; user-select: none;
}
.grs-card__header { display: flex; align-items: center; gap: 12px; }
.grs-card__avatar {
	flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
	background: #f1f1f1;
}
.grs-card__avatar--initial {
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 20px; color: #fff; background: var(--grs-border);
}
.grs-card__meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.grs-card__name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grs-card__date { font-size: .85em; color: var(--grs-muted); }
.grs-card__source { margin-left: auto; line-height: 0; flex: 0 0 auto; }
.grs-card__body { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1 1 auto; }
.grs-card__text {
	margin: 0; line-height: 1.55;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--grs-lines);
	overflow: hidden;
	max-height: calc(1.55em * var(--grs-lines));
	word-break: break-word;
}
.grs-card--expanded .grs-card__text {
	display: block; -webkit-line-clamp: unset; overflow-y: auto; padding-right: 4px;
}
.grs-card__more {
	align-self: flex-start; margin-top: 8px; padding: 0; border: 0; background: none;
	color: inherit; font: inherit; font-size: .9em; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.grs-card__more[hidden] { display: none; }

/* ---------- Navigation ---------- */
.grs-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--grs-border);
	background: var(--grs-nav-bg); color: var(--grs-nav-color); display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; padding: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); transition: opacity .2s, transform .2s;
}
.grs-nav svg { width: 22px; height: 22px; fill: currentColor; }
.grs-nav--prev { left: -6px; }
.grs-nav--next { right: -6px; }
.grs-nav:disabled { opacity: .35; cursor: default; }
.grs-nav:not(:disabled):hover { transform: translateY(-50%) scale(1.06); }
.grs-nav:focus-visible { outline: 2px solid var(--grs-border); outline-offset: 2px; }

.grs-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; min-height: 10px; }
.grs-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--grs-dot); cursor: pointer; transition: background .2s, transform .2s; }
.grs-dot[aria-selected="true"] { background: var(--grs-dot-active); transform: scale(1.2); }
.grs-dot:focus-visible { outline: 2px solid var(--grs-border); outline-offset: 2px; }

.grs-empty { flex: 1 1 auto; padding: 24px; text-align: center; color: var(--grs-muted); border: 1px dashed var(--grs-border); border-radius: var(--grs-radius); }
.grs-empty p { margin: 0; }

/* ---------- Summary above the reviews ---------- */
.grs-widget--summary-top .grs-layout { flex-direction: column; align-items: stretch; }
.grs-widget--summary-top .grs-summary { width: auto; }

/* Narrow placements (e.g. a half-width column): carousel.js adds this class from the widget's
   own width so the summary stacks above the reviews (and caps the cards per view). */
.grs-widget.grs-is-narrow .grs-layout { flex-direction: column; align-items: stretch; }
.grs-widget.grs-is-narrow .grs-summary { width: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.grs-widget { --grs-pv: var(--grs-pv-t); }
}
@media (max-width: 767px) {
	.grs-widget { --grs-pv: var(--grs-pv-m); }
	.grs-layout { flex-direction: column; align-items: stretch; }
	.grs-summary { width: auto; }
	.grs-carousel { padding: 0; }
	.grs-nav { display: none; }
	.grs-card { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
	.grs-track { scroll-behavior: auto; }
	.grs-nav, .grs-dot { transition: none; }
}
