/* ======================================================
   VARIÁVEIS GLOBAIS – PÁGINA DE LIVROS
====================================================== */
:root {
  --primaria: #7b2cbf;
  --primaria-dark: #5a189a;

  --texto: #111;
  --texto-suave: #555;

  --bg: #ffffff;
  --bg-cinza: #f4f4f4;

  --radius: 4px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CONTAINER GLOBAL */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TIPOGRAFIA */
body {
  font-family: "Inter", sans-serif;
  color: var(--texto);
  background: var(--bg);
}

h1, h2, h3, h4, .title {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
}


/* ======================================================
   TÍTULO DA PÁGINA
====================================================== */
.livros-listagem h2 {
  text-align: center;
  font-size: 1.9rem;
  color: var(--primaria);
  margin-bottom: 30px;
  margin-top: 40px;
}


/* ======================================================
   FORMULÁRIO DE BUSCA / FILTRO
====================================================== */
.filtro-busca {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filtro-busca input,
.filtro-busca select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  min-width: 220px;
  font-size: .95rem;
  color: var(--texto);
}

.btn-filtro {
  border: none;
  padding: 10px 22px;
  background: var(--primaria);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: .2s ease;
}

.btn-filtro i {
  font-size: .9rem;
}

.btn-filtro:hover {
  background: var(--primaria-dark);
}


/* ======================================================
   GRID DE LIVROS
====================================================== */
.livros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
}

.livros-listagem {
  padding-bottom: 80px;
}


/* ======================================================
   CARD DO LIVRO
====================================================== */
.livro-card {
  text-align: center;
  padding: 5px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.livro-capa {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 10px;
  transition: transform .2s ease-in-out;
}

.livro-capa:hover {
  transform: scale(1.04);
}

.livro-titulo {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--texto);
}

.livro-autor,
.livro-genero {
  font-size: .85rem;
  color: var(--texto-suave);
  margin-bottom: 3px;
}

.livro-card .btn-sm {
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  background: var(--primaria);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  transition: .2s;
}

.livro-card .btn-sm:hover {
  background: var(--primaria-dark);
}


/* ======================================================
   MENSAGEM DE SEM RESULTADOS
====================================================== */
.sem-resultado {
  text-align: center;
  color: var(--texto-suave);
  margin-top: 40px;
  font-size: 1rem;
}


/* ======================================================
   PAGINAÇÃO
====================================================== */
.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 45px 0 20px;
  flex-wrap: wrap;
}

.pag-btn,
.paginacao a {
  padding: 8px 14px;
  background: #f1f1f1;
  border-radius: var(--radius);
  color: var(--texto);
  text-decoration: none;
  font-size: .95rem;
  border: 1px solid #ddd;
  transition: .2s ease;
}

.pag-btn:hover,
.paginacao a:hover {
  background: var(--primaria);
  color: #fff;
}

.paginacao a.active {
  background: var(--primaria);
  color: #fff;
  border-color: var(--primaria-dark);
  font-weight: 600;
}


/* ======================================================
   RESPONSIVIDADE
====================================================== */
@media (max-width: 600px) {
  .livros-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .filtro-busca input,
  .filtro-busca select {
    min-width: 180px;
  }
}


/* ======================================================
   FOOTER — protegido
====================================================== */
footer,
.footer,
#footer {
  background: #1a1423 !important;
  color: #fff !important;
}
