/* Contenedor general */
.abg-wrapper {
  margin: 1rem 0 2rem;
  text-align: center;
}

.abg-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  line-height: 1.2;
text-align: center;  	
}

/* Grid responsive */
.abg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  text-align: left; /* los libros se alinean normalmente */	
}

@media (max-width: 1024px) {
  .abg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .abg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .abg-grid { grid-template-columns: 1fr; }
}

/* Tarjeta */
.abg-card {
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s ease, transform .1s ease;
}

.abg-card:hover {
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

/* Miniatura */
.abg-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.abg-thumb img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  display: block;
}

/* Metadatos */
.abg-meta {
  display: grid;
  gap: 4px;
}

.abg-book {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.3;
}

.abg-author {
  color: #666;
  font-size: .9rem;
}

.abg-price {
  color: #111;
  font-weight: 600;
  font-size: .95rem;
}

/* Mensajes */
.abg-empty, .abg-error {
  padding: 12px;
  border-radius: 8px;
  background: #f8f8f8;
  border: 1px solid #eee;
  color: #444;
  font-size: .95rem;
}

/* Aviso afiliado */
.abg-disclaimer {
  margin-top: 10px;
  font-size: .85rem;
  color: #666;
 text-align: center;	
}
