/* Growizards · Galeria de Tecidos */

.gw-tecido {
	--gw-gap: 12px;
	--gw-radius: 6px;
	--gw-thumb-size: 96px;
	width: 100%;
	box-sizing: border-box;
}

.gw-tecido *,
.gw-tecido *::before,
.gw-tecido *::after {
	box-sizing: border-box;
}

/* Imagem grande */
.gw-tecido__stage {
	width: 100%;
	overflow: hidden;
	border-radius: var(--gw-radius);
	background: #f2f0ec;
}

.gw-tecido__main {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: opacity 0.25s ease;
}

.gw-tecido__main.is-swapping {
	opacity: 0;
}

/* Miniaturas */
.gw-tecido__thumbs {
	list-style: none;
	margin: var(--gw-gap) 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--gw-gap);
}

.gw-tecido__thumb-item {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: var(--gw-thumb-size);
}

.gw-tecido__thumb {
	display: block;
	width: var(--gw-thumb-size);
	height: var(--gw-thumb-size);
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--gw-radius);
	background: #f2f0ec;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.gw-tecido__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gw-tecido__thumb:hover {
	transform: translateY(-2px);
}

.gw-tecido__thumb.is-active {
	border-color: #1f2937;
}

.gw-tecido__thumb:focus-visible {
	outline: 2px solid #1f2937;
	outline-offset: 2px;
}

/* Legenda por baixo da miniatura */
.gw-tecido__thumb-label {
	display: block;
	width: 100%;
	font-size: 13px;
	line-height: 1.25;
	color: #6b7280;
	text-align: center;
	word-break: break-word;
}

/* Responsivo */
@media (max-width: 600px) {
	.gw-tecido {
		--gw-thumb-size: 72px;
		--gw-gap: 8px;
	}

	.gw-tecido__thumb-label {
		font-size: 12px;
	}
}
