* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.2;
  padding: 16px;
  font-size: 0.94rem;
}
header {
  text-align: center;
  margin-bottom: 12px;
  padding: 4px 0;
}
header h1 {
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.25px;
  color: #1e40af;
}
main {
  max-width: 720px;
  margin: 0 auto;
}
.section {
  margin-bottom: 40px;
}
h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #343434;
  position: relative;
  padding-bottom: 8px;
}
h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: #1e40af;
  border-radius: 1px;
}
p {
  margin-bottom: 12px;
  color: #333;
  font-weight: 400;
}

/* Enlace de acción sobrio */
.cta-link {
  display: inline-block;
  background-color: #1e40af;       /* Azul intenso como fondo */
  color: #ffffff;                  /* Texto blanco para contraste */
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;               /* Espaciado tipo botón */
  border-radius: 6px;              /* Esquinas redondeadas */
  transition: background-color 0.3s, transform 0.2s;
}

.cta-link:hover {
  background-color: #1a3a99;       /* Oscurece ligeramente al pasar el mouse */
  transform: scale(1.02);          /* Efecto sutil de crecimiento */
}
/* Catálogo minimalista */
#catalogo-container .error {
  color: #d32f2f;
}
.catalog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 16px;
}
@media (min-width: 768px) {
  .catalog-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.book-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.book-images {
  position: relative;
  width: 100%;
  padding-top: 133%; /* 3:4 */
}
.book-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}
.book-img.primary {
  opacity: 1;
}
.book-img.secondary {
  opacity: 0;
}
.book-action {
  display: block;
  color: #1e40af;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
  padding: 6px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.2s;
}
.book-action:hover {
  background: #f0f5ff;
  border-color: #dbeafe;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 48px;
  padding: 20px 0;
  color: #666;
  font-size: 0.88rem;
  border-top: 1px solid #eee;
}
