/* General Reviews — v2 (horizontal scroll + modern card design) */

.gr-section--v2 {
	position: relative;
	padding: 80px 0 64px;
	background-color: var(--primary-background-color);
	background-image: linear-gradient(135deg, var(--primary-background-color) 0%, var(--secondary-background-color) 100%);
	overflow: hidden;
}

.gr-section__header--v2 {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 36px;
}

.gr-section__eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--primary-brand-color);
	margin-bottom: 10px;
}

.gr-section__title {
	font-size: clamp(1.75rem, 3.5vw, 2.35rem);
	font-weight: 700;
	color: var(--primary-title-color);
	line-height: 1.2;
	margin: 0 0 12px;
}

.gr-section__subtitle {
	margin: 0;
	max-width: 480px;
	color: var(--primary-text-color);
	opacity: 0.85;
	line-height: 1.6;
}

.gr-section__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gr-section__cta--outline {
	border: 1px solid rgba(212, 175, 55, 0.45);
	color: var(--primary-title-color);
	background: transparent;
}

.gr-section__cta--outline:hover {
	background: var(--primary-brand-color);
	color: var(--secondary-background-color);
	border-color: var(--primary-brand-color);
}

/* Horizontal scroll rail (home — v1 & v2) */
.gr-scroll-board {
	position: relative;
}

.gr-scroll-inner {
	position: relative;
}

.gr-scroll-outer {
	position: relative;
	padding: 0 52px;
}

.gr-scroll-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: var(--secondary-background-color);
	color: var(--primary-title-color);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.gr-scroll-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.gr-scroll-nav--prev {
	inset-inline-start: 0;
}

.gr-scroll-nav--next {
	inset-inline-end: 0;
}

.gr-scroll-rail {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scroll-padding-inline: 12px;
	padding: 8px 12px 20px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

/* RTL: first review on the right; same scroll rules as Categories V2 (scrollBy + WebKit vs Firefox edges). */
html[dir="rtl"] .gr-scroll-rail {
	direction: rtl;
}

.gr-scroll-rail .gr-review-item {
	flex: 0 0 min(340px, 86vw);
	scroll-snap-align: start;
}

/* ── V2 card: classic review card (original design) ── */
.gr-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px;
	border-radius: 20px;
	background: var(--secondary-background-color);
	border: 1px solid rgba(212, 175, 55, 0.16);
	/* box-shadow: 0 14px 36px rgba(0, 0, 0, 0.07); */
	min-height: 100%;
	height: 100%;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gr-card--v2 {
	background: linear-gradient(
		165deg,
		var(--secondary-background-color) 0%,
		color-mix(in srgb, var(--primary-background-color) 40%, var(--secondary-background-color)) 100%
	);
	border: 1px solid rgba(212, 175, 55, 0.22);
}

.gr-card--v2:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.12);
}

.gr-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.gr-card__reviewer {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.gr-card__avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
	color: var(--secondary-background-color);
	background: linear-gradient(135deg, var(--primary-brand-color), #9a7b1a);
}

.gr-card__meta {
	min-width: 0;
}

.gr-card__name {
	display: block;
	font-weight: 600;
	color: var(--primary-title-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gr-card__date {
	display: block;
	font-size: 0.82rem;
	color: var(--primary-text-color);
	opacity: 0.75;
	margin-top: 2px;
}

.gr-card__rating {
	flex-shrink: 0;
	display: inline-flex;
	gap: 2px;
	color: var(--primary-brand-color);
	font-size: 0.85rem;
}

.gr-card__comment {
	margin: 0;
	position: relative;
	padding-inline-start: 28px;
}

.gr-card__quote-icon {
	position: absolute;
	inset-inline-start: 0;
	top: 2px;
	font-size: 0.9rem;
	color: var(--primary-brand-color);
	opacity: 0.55;
}

.gr-card__comment p {
	margin: 0;
	color: var(--primary-text-color);
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gr-card__product {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px dashed rgba(212, 175, 55, 0.25);
}

.gr-card__product-link {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
	border-radius: 14px;
	padding: 8px;
	margin: -8px;
	transition: background 0.2s ease;
}

.gr-card__product-link:hover {
	background: rgba(212, 175, 55, 0.1);
}

.gr-card__product-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--primary-background-color);
	border: 1px solid rgba(212, 175, 55, 0.2);
}

.gr-card__product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gr-card__product-info {
	flex: 1;
	min-width: 0;
}

.gr-card__product-label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--primary-brand-color);
	margin-bottom: 4px;
}

.gr-card__product-name {
	display: block;
	font-weight: 600;
	color: var(--primary-title-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gr-card__product-action {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--primary-brand-color);
	color: var(--secondary-background-color);
}

/* List page — v2 uses wider two-column layout */
.gr-page {
	padding: 48px 0 80px;
	background: linear-gradient(160deg, var(--primary-background-color) 0%, var(--secondary-background-color) 100%);
	min-height: 60vh;
}

.gr-page__header {
	margin-bottom: 36px;
}

.gr-page__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	color: var(--primary-brand-color);
	text-decoration: none;
	font-weight: 600;
}

.gr-page__back:hover {
	text-decoration: underline;
}

.gr-page__title {
	font-size: clamp(1.85rem, 4vw, 2.5rem);
	color: var(--primary-title-color);
	margin: 0 0 10px;
}

.gr-page__subtitle {
	margin: 0;
	color: var(--primary-text-color);
	opacity: 0.85;
}

.gr-page__grid--v2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	margin-bottom: 32px;
}

.gr-page__empty {
	text-align: center;
	padding: 64px 24px;
	color: var(--primary-title-color);
}

.gr-page__empty i {
	font-size: 2.5rem;
	color: var(--primary-brand-color);
	margin-bottom: 16px;
	display: block;
}

.gr-page .pagination {
	margin-top: 8px;
}

@media (max-width: 768px) {
	.gr-section--v2 {
		padding: 56px 0 48px;
	}

	.gr-section__header--v2 {
		flex-direction: column;
		align-items: flex-start;
	}

	.gr-scroll-outer {
		padding: 0 44px;
	}

	.gr-scroll-nav {
		width: 38px;
		height: 38px;
	}

	.gr-scroll-rail {
		gap: 14px;
		padding: 6px 0 16px;
		scroll-padding-inline: calc(50% - min(260px, 78vw) / 2);
	}

	.gr-scroll-rail::before,
	.gr-scroll-rail::after {
		content: '';
		flex: 0 0 calc(50% - min(260px, 78vw) / 2);
	}

	.gr-scroll-rail .gr-review-item {
		flex: 0 0 min(260px, 78vw);
		scroll-snap-align: center;
	}

	.gr-card {
		gap: 12px;
		padding: 16px;
		border-radius: 16px;
	}

	.gr-card__reviewer {
		gap: 10px;
	}

	.gr-card__avatar {
		width: 36px;
		height: 36px;
		border-radius: 12px;
		font-size: 0.9rem;
	}

	.gr-card__name {
		font-size: 0.9rem;
	}

	.gr-card__date {
		font-size: 0.75rem;
	}

	.gr-card__rating {
		font-size: 0.78rem;
	}

	.gr-card__comment {
		padding-inline-start: 22px;
	}

	.gr-card__comment p {
		font-size: 0.88rem;
		line-height: 1.6;
		-webkit-line-clamp: 4;
	}

	.gr-card__product {
		padding-top: 10px;
	}

	.gr-card__product-thumb {
		width: 44px;
		height: 44px;
		border-radius: 10px;
	}

	.gr-card__product-action {
		width: 32px;
		height: 32px;
		border-radius: 10px;
	}

	.gr-page__grid--v2 {
		grid-template-columns: 1fr;
	}
}
