/**
 * Estante de livros: capas com título e ficha (página inicial e /livros/).
 */

.estante {
	display: grid;
	grid-auto-columns: minmax(9.5rem, 1fr);
	grid-auto-flow: column;
	gap: 1.5rem;
	margin: 0;
	padding: 0 0 0.5rem;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.estante > li {
	scroll-snap-align: start;
}

@media (min-width: 64rem) {
	.estante {
		grid-auto-flow: row;
		grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
		overflow: visible;
	}
}

.livro__link {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	color: var(--edi-azul-noite);
	text-decoration: none;
}

.livro__capa {
	display: block;
	aspect-ratio: 2 / 3;
	border-radius: 3px;
	background: var(--edi-branco);
	box-shadow: var(--edi-sombra);
	overflow: hidden;
	transition: transform 260ms ease, box-shadow 260ms ease;
}

.livro__capa img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.livro__link:hover .livro__capa {
	transform: translateY(-4px);
	box-shadow: 0 2px 4px rgb(15 26 51 / 8%), 0 16px 32px rgb(15 26 51 / 16%);
}

.livro__titulo {
	font-family: var(--edi-fonte-titulo);
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.2;
}

.livro__ficha {
	margin: 0.3rem 0 0;
	color: var(--edi-cinza);
	font-size: 0.85rem;
}
