.busca-livro-container {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.busca-livro-sidebar {
  flex: 0 0 300px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  height: fit-content;
  position: sticky;
  top: 20px;
}
.busca-livro-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}
.busca-livro-controls button {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  background: #ffffff;
  color: #666;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}
.busca-livro-controls button:hover {
  border-color: #007cba;
  color: #007cba;
  transform: translateY(-1px);
}
.busca-livro-controls button.active {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
  border-color: #007cba;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}
.busca-livro-filters { display: flex; flex-direction: column; gap: 20px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-weight: 600; color: #333; font-size: 14px; }
.search-input,
.filter-select {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafafa;
}
.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #007cba;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}
.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.checkbox-item:hover { background: #f5f5f5; }
.checkbox-item input[type="checkbox"] { margin: 0; accent-color: #007cba; width: 16px; height: 16px; }
.checkbox-item span { font-size: 14px; color: #333; font-weight: 500; }
.checkbox-item input[type="checkbox"]:checked + span { font-weight: 600; color: #007cba; }
.checkbox-item input[type="checkbox"][value="todas"]:checked + span { color: #005a87; font-weight: 700; }

/* Adicionado: Estilo para o aviso de busca */
.search-notice { font-size: 12px; color: #777; margin-top: 5px; display: block; font-style: italic; }

/* Adicionado: Estilo para o botão buscar movido */
.filter-group .btn-buscar {
    margin-top: 10px; padding: 12px 16px; border: 2px solid #e0e0e0; background: #ffffff;
    color: #666; border-radius: 8px; font-weight: 500; cursor: pointer;
    transition: all 0.3s ease; font-size: 14px; width: 100%;
}
.filter-group .btn-buscar:hover { border-color: #007cba; color: #007cba; transform: translateY(-1px); }

.busca-livro-content { flex: 1; min-height: 400px; position: relative; }
.loading-spinner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: #666;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid #f0f0f0;
  border-top: 4px solid #007cba; border-radius: 50%;
  animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.livros-grid { display: flex; flex-direction: column; gap: 15px; padding: 10px; }
.livro-item {
  background: white; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
}
.livro-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.livro-link { display: flex; align-items: center; text-decoration: none; color: inherit; padding: 15px; gap: 15px; }
.livro-thumbnail-container {
  flex-shrink: 0; width: 120px; height: 150px; overflow: hidden;
  border-radius: 6px; background: #f8f8f8;
}

/* ALTERADO: object-fit para 'contain' para não cortar a imagem */
.livro-thumbnail {
  width: 100%; height: 100%; object-fit: contain; transition: transform 0.2s ease;
}

.livro-item:hover .livro-thumbnail { transform: scale(1.05); }
.no-image {
  display: flex; align-items: center; justify-content: center; height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  color: #999; font-size: 12px; text-align: center;
}
.livro-content { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.livro-title {
  margin: 0; font-size: 16px; font-weight: 600; color: #1a1a1a; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.livro-author { font-size: 13px; color: #007cba; font-weight: 500; font-style: italic; }
.load-more-container { display: flex; justify-content: center; padding: 30px 0; }
.load-more-btn {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%); color: white; border: none;
  padding: 15px 30px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}
.load-more-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4); }
.no-results {
  text-align: center; padding: 60px 20px; color: #666; background: white;
  border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .busca-livro-container { flex-direction: column; gap: 20px; padding: 15px; }
  .busca-livro-sidebar { flex: none; position: static; }
  .livro-thumbnail-container { width: 60px; height: 75px; }
}
.livros-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.livro-item-list { background: white; border-radius: 6px; border: 1px solid #f0f0f0; transition: all 0.2s ease; }
.livro-item-list:hover { background: #f8f9fa; border-color: #007cba; transform: translateX(5px); }
.livro-link-list { display: block; text-decoration: none; color: inherit; padding: 12px 16px; }
.livro-title-list { font-size: 15px; font-weight: 500; color: #1a1a1a; line-height: 1.4; display: inline; }
.livro-author-list { font-size: 13px; color: #007cba; font-style: italic; }
.livro-item-list:hover .livro-title-list { color: #007cba; }