/* ── Section heading ───────────────────────────────────────────── */
.gmr-section-heading {
	text-align: center;
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 1rem;
}

/* ── Aggregate rating badge ────────────────────────────────────── */
.gmr-rating-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
}

.gmr-rating-badge__body {
	display: flex;
	flex-direction: column;
	gap: .1rem;
}

.gmr-rating-badge__score {
	display: flex;
	align-items: center;
	gap: .4rem;
}

.gmr-rating-badge__number {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a1a2e;
	line-height: 1;
}

.gmr-rating-badge__stars .gmr-star {
	font-size: 1.4rem;
}

.gmr-rating-badge__label {
	font-size: .85rem;
	color: #6b7280;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: .25rem;
}

.gmr-rating-badge__count {
	font-weight: 600;
	color: #374151;
}

/* ── Stars ─────────────────────────────────────────────────────── */
.gmr-star { font-style: normal; }
.gmr-star--full,
.gmr-star--half { color: #FBBC05; }
.gmr-star--empty { color: #e5e7eb; }

/* ── Verified badge ────────────────────────────────────────────── */
.gmr-verified {
	display: inline-block;
	vertical-align: middle;
	margin-left: .25rem;
	flex-shrink: 0;
}

/* ── Review card ───────────────────────────────────────────────── */
.gmr-card {
	background: #f7f8fa;
	border-radius: 12px;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	height: 100%;
	box-sizing: border-box;
	transform: translateY(0);
	transition: transform .2s ease, box-shadow .2s ease;
}
.gmr-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.gmr-card__header {
	display: flex;
	align-items: flex-start;
	gap: .75rem;
}

.gmr-card__avatar-wrap { flex-shrink: 0; }

.gmr-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.gmr-card__avatar--initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #e07b39;
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
}

.gmr-card__author-meta {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: .1rem;
}

.gmr-card__author {
	font-weight: 700;
	font-size: .9rem;
	color: #111827;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}
a.gmr-card__author:hover { text-decoration: underline; }

.gmr-card__time {
	font-size: .8rem;
	color: #9ca3af;
	white-space: nowrap;
}

.gmr-card__google-logo {
	flex-shrink: 0;
	margin-left: auto;
	padding-left: .5rem;
}

.gmr-card__rating {
	display: flex;
	align-items: center;
	gap: .25rem;
}

.gmr-card__stars .gmr-star { font-size: 1.05rem; }

.gmr-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: .4rem;
}

.gmr-card__text {
	font-size: .875rem;
	color: #374151;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}
.gmr-card__text.is-expanded {
	-webkit-line-clamp: unset;
	overflow: visible;
}

.gmr-read-more {
	background: none;
	border: none;
	padding: 0;
	font-size: .8rem;
	color: #6b7280;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
}
.gmr-read-more:hover { color: #374151; text-decoration: underline; }

.gmr-card__footer {
	font-size: .78rem;
	color: #9ca3af;
	border-top: 1px solid #e5e7eb;
	padding-top: .5rem;
	margin-top: auto;
}

.gmr-no-reviews {
	color: #6b7280;
	font-style: italic;
	text-align: center;
	padding: 2rem 0;
}

/* ── Grid layout ───────────────────────────────────────────────── */
.gmr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
	margin: 1.5rem 0;
}

@media (max-width: 480px) {
	.gmr-grid { grid-template-columns: 1fr; }
}

/* ── Carousel wrapper ──────────────────────────────────────────── */
.gmr-carousel {
	--gmr-per-slide: 1;        /* overridden by JS */
	--gmr-gap: 1rem;
	position: relative;
	margin: 1rem 0 1.75rem;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1rem;
}

.gmr-carousel__viewport {
	position: relative;
	width: 100%;
	overflow-x: scroll;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	/* JS drives the animation; browser smooth-scroll is disabled */
	scroll-behavior: auto;
}
.gmr-carousel__viewport::-webkit-scrollbar { display: none; }

.gmr-carousel__track {
	display: flex;
	gap: var( --gmr-gap );
	align-items: stretch;
}

/*
 * --gmr-viewport-w is set by JS once the viewport has real dimensions.
 * Using a single variable on the container avoids per-card inline styles.
 */
.gmr-carousel__track .gmr-card {
	flex-shrink: 0;
	flex-grow: 0;
	box-sizing: border-box;
	width: calc(
		( var( --gmr-viewport-w, 300px ) - var( --gmr-gap ) * ( var( --gmr-per-slide ) - 1 ) )
		/ var( --gmr-per-slide )
	);
}

/* ── Carousel arrows ───────────────────────────────────────────── */
.gmr-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #374151;
	box-shadow: 0 1px 4px rgba(0,0,0,.1);
	transition: background .15s, border-color .15s, box-shadow .15s;
	padding: 0;
	/* offset dots height so arrow stays vertically centred on track only */
	margin-top: -1.5rem;
}
.gmr-carousel__arrow:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.gmr-carousel__arrow:focus-visible {
	outline: 2px solid #4285F4;
	outline-offset: 2px;
}
.gmr-carousel__arrow:disabled {
	opacity: .3;
	cursor: default;
	pointer-events: none;
}
.gmr-carousel__arrow--prev { left: -20px; }
.gmr-carousel__arrow--next { right: -20px; }

@media (max-width: 600px) {
	.gmr-carousel__arrow--prev { left: 0; }
	.gmr-carousel__arrow--next { right: 0; }
}

/* ── Carousel dots ─────────────────────────────────────────────── */
.gmr-carousel__dots {
	display: flex;
	gap: .4rem;
	align-items: center;
	justify-content: center;
	align-self: center; /* centre the dots row without shrinking the viewport */
}

.gmr-carousel__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: #d1d5db;
	cursor: pointer;
	padding: 0;
	transition: background .15s, transform .15s;
}
.gmr-carousel__dot.is-active {
	background: #4285F4;
	transform: scale(1.35);
}
.gmr-carousel__dot:focus-visible {
	outline: 2px solid #4285F4;
	outline-offset: 2px;
}
