/* ═══════════════════════════════════════════════════════════════════════════
   RESEÑAS DE GOOGLE (template-parts/home/google-reviews.php)

   Tarjetas redondeadas sobre el lienzo de la página, no una tira de texto:
   comilla grande de fondo, estrellas en tinta, el texto en la serif de los
   titulares y quien escribe en un círculo con sus iniciales. Una de cada tres va
   invertida (tinta con texto claro) para que la fila tenga ritmo. Ni lila ni
   amarillo de Google: tinta, blanco y las reglas finas del resto de la web.
   ═══════════════════════════════════════════════════════════════════════════ */

.zihouse-gresenas {
	padding-block: var(--zihouse-space-3xl);
}

/* ── Cabecera: titular a la izquierda, acciones a la derecha ─────────────── */
.zihouse-gresenas__cabecera {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--zihouse-space-lg) var(--zihouse-space-xl);
	margin-bottom: var(--zihouse-space-xl);
}

.zihouse-gresenas__titular {
	display: grid;
	gap: var(--zihouse-space-sm);
}

.zihouse-gresenas__titulo {
	margin: 0;
	max-width: 17ch;
	font-family: var(--zihouse-font-display);
	font-size: clamp(2rem, 1.2rem + 2.8vw, 3.6rem);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.02em;
}

.zihouse-gresenas__acciones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem var(--zihouse-space-lg);
}

.zihouse-gresenas__enlace {
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	font-size: var(--zihouse-text-xs);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--zihouse-color-ink);
	text-decoration: underline;
	text-underline-offset: 0.35em;
}

.zihouse-gresenas__enlace:hover,
.zihouse-gresenas__enlace:focus-visible {
	color: var(--zihouse-color-ink-muted);
}

/* ── La lista: fila hasta tres tarjetas, carril desde cuatro ─────────────── */
.zihouse-gresenas__carril {
	position: relative;
	min-width: 0;
}

.zihouse-gresenas__lista {
	margin: 0;
	padding: 0;
	list-style: none;
}

.zihouse-gresenas__lista.is-fila {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: clamp(var(--zihouse-space-md), 2vw, var(--zihouse-space-lg));
	align-items: stretch;
}

/* Con una sola, que no se estire a todo el ancho. */
.zihouse-gresenas__lista--n1 {
	grid-template-columns: minmax(0, 40rem);
}

/* Con dos, la primera pesa más: el texto largo respira y la corta no queda sola. */
@media (min-width: 62rem) {
	.zihouse-gresenas__lista--n2 {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}
}

.zihouse-gresenas__lista.is-carril {
	display: flex;
	gap: clamp(var(--zihouse-space-md), 2vw, var(--zihouse-space-lg));
	padding-bottom: var(--zihouse-space-sm);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.zihouse-gresenas__lista.is-carril::-webkit-scrollbar {
	display: none;
}

.zihouse-gresenas__lista.is-carril .zihouse-gresenas__item {
	flex: 0 0 min(25rem, 86%);
	scroll-snap-align: start;
}

.zihouse-gresenas__item {
	display: flex;
	min-width: 0;
}

/* ── La tarjeta ──────────────────────────────────────────────────────────── */
.zihouse-gresenas__tarjeta {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--zihouse-space-md);
	width: 100%;
	margin: 0;
	padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
	background: var(--zihouse-color-surface-raised, #fff);
	color: var(--zihouse-color-ink);
	border: 1px solid var(--zihouse-color-border);
	border-radius: var(--zihouse-radius-media, 16px);
	box-shadow: var(--zihouse-shadow-sm);
	overflow: hidden;
	transition: transform 420ms var(--zihouse-ease-out-quart, ease-out),
		box-shadow 420ms var(--zihouse-ease-out-quart, ease-out);
}

.zihouse-gresenas__tarjeta:hover {
	transform: translateY(-4px);
	box-shadow: var(--zihouse-shadow-md);
}

/* La comilla de fondo: un ornamento enorme y casi invisible, detrás del texto. */
.zihouse-gresenas__comillas {
	position: absolute;
	top: -1.4rem;
	right: 1.25rem;
	font-family: var(--zihouse-font-display);
	font-size: clamp(8rem, 6rem + 6vw, 12rem);
	line-height: 1;
	color: color-mix(in srgb, currentColor 7%, transparent);
	pointer-events: none;
	user-select: none;
}

.zihouse-gresenas__tarjeta > *:not(.zihouse-gresenas__comillas) {
	position: relative;
}

/* La que va invertida: tinta con texto crema. Una de cada tres, empezando por la primera. */
.zihouse-gresenas__item:nth-child(3n + 1) .zihouse-gresenas__tarjeta {
	background: var(--zihouse-color-ink);
	color: var(--zihouse-color-bg);
	border-color: var(--zihouse-color-ink);
	box-shadow: var(--zihouse-shadow-md);
}

/* Con una sola reseña no hay con qué contrastar: va en claro. */
.zihouse-gresenas__lista--n1 .zihouse-gresenas__item .zihouse-gresenas__tarjeta {
	background: var(--zihouse-color-surface-raised, #fff);
	color: var(--zihouse-color-ink);
	border-color: var(--zihouse-color-border);
	box-shadow: var(--zihouse-shadow-sm);
}

/* ── Estrellas ───────────────────────────────────────────────────────────── */
.zihouse-gestrellas {
	display: inline-flex;
	gap: 0.18rem;
	font-size: 1.05rem;
	line-height: 1;
}

.zihouse-gestrellas__una {
	display: inline-flex;
}

.zihouse-gestrellas svg {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linejoin: round;
	opacity: 0.45;
}

.zihouse-gestrellas__una.is-llena svg {
	fill: currentColor;
	opacity: 1;
}

/* ── Texto ───────────────────────────────────────────────────────────────── */
.zihouse-gresenas__texto {
	margin: 0;
}

.zihouse-gresenas__texto p {
	margin: 0;
	font-family: var(--zihouse-font-display);
	font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem);
	font-weight: 400;
	line-height: 1.36;
	letter-spacing: -0.008em;
	text-wrap: pretty;
}

/* ── Respuesta de la tienda ──────────────────────────────────────────────── */
.zihouse-gresenas__respuesta {
	display: grid;
	gap: 0.4rem;
	padding: 1rem 1.15rem;
	background: color-mix(in srgb, currentColor 6%, transparent);
	border-radius: var(--zihouse-radius-media-sm, 12px);
}

.zihouse-gresenas__respuesta p {
	margin: 0;
	font-size: var(--zihouse-text-sm);
	line-height: 1.6;
	opacity: 0.82;
}

.zihouse-gresenas__respuesta-de,
.zihouse-gresenas__origen {
	font-size: var(--zihouse-text-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.62;
}

/* ── Quien escribe: círculo con iniciales, nombre y origen ───────────────── */
.zihouse-gresenas__autor {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: auto;
	padding-top: var(--zihouse-space-sm);
	border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.zihouse-gresenas__avatar {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 50%;
	background: var(--zihouse-color-ink);
	color: var(--zihouse-color-bg);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.zihouse-gresenas__item:nth-child(3n + 1) .zihouse-gresenas__avatar {
	background: var(--zihouse-color-bg);
	color: var(--zihouse-color-ink);
}

.zihouse-gresenas__lista--n1 .zihouse-gresenas__item .zihouse-gresenas__avatar {
	background: var(--zihouse-color-ink);
	color: var(--zihouse-color-bg);
}

.zihouse-gresenas__quien {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

.zihouse-gresenas__nombre {
	font-size: var(--zihouse-text-sm);
	font-weight: 600;
}

.zihouse-gresenas__nav {
	display: flex;
	gap: 0.5rem;
	margin-top: var(--zihouse-space-md);
}

.zihouse-gresenas__nav[hidden] {
	display: none;
}

@media (max-width: 48rem) {
	.zihouse-gresenas {
		padding-block: var(--zihouse-space-2xl);
	}

	.zihouse-gresenas__cabecera {
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zihouse-gresenas__tarjeta {
		transition: none;
	}

	.zihouse-gresenas__tarjeta:hover {
		transform: none;
	}
}
