.intro-section {
  padding: 50px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg,  #93278f, #9a529a, #00a1de);
}

.intro-container {
  max-width: 900px;
  background: rgba(255, 255, 255, 0.1); /* fondo translúcido */
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  color: #fff;
}


.intro-container h3 {
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 18px;
}


/* ----- Contenedor del estante ----- */
.shelf {
  margin: 36px auto 72px;
  padding: 0 16px 18px;
  max-width: 1280px;
  position: relative;
}

/* Título + botones */
.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.shelf-header h2 {
  font-weight: 700;
  font-size: 1.4rem;
}

/* Botones laterales */
.shelf-actions {
  display: flex; gap: 8px;
}
.shelf-btn {
  border: 0;
  width: 38px; height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  display: grid; place-items: center;
  transition: transform .15s ease, background .2s ease;
  backdrop-filter: blur(3px);
}
.shelf-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.32); }

/* Viewport + track horizontal */
.shelf-viewport {
  overflow: hidden; /* oculta scroll */
  position: relative;
}
.shelf-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 180px); /* ancho de cada libro */
  gap: 18px;
  align-items: end;
  padding: 10px 2px 18px;
  transform: translateZ(0);
  will-change: transform;
}

/* Card de libro */
.book-card{
  display: flex;
  flex-direction: column;
}
.book-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.book-cover {
  width: 100%;
  aspect-ratio: 3 / 4.4;               /* proporción de portada */
  background: linear-gradient(#e9ecef, #dfe4ea);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 12px rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.book-link:hover .book-cover {
  transform: translateY(-4px) rotate(-.2deg);
  box-shadow: 0 12px 18px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.22);
}
:root{
  --title-lines: 3;      /* cuántas líneas máximas permites en el título */
  --title-lh: 1.25;      /* line-height del título */
}
.book-meta{
  margin-top: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: calc(var(--title-lines) * 1em * var(--title-lh) + 1.6em);
}
.book-title{
  font-size: .95rem;
  font-weight: 700;
  line-height: var(--title-lh);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: var(--title-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(var(--title-lines) * 1em * var(--title-lh));
}
.book-info{
  font-size: .8rem;
  opacity: .8;
  margin-top: auto;   /* empuja hacia abajo */
  line-height: 1.2;
}


/* “Tabla” del estante (look madera) */
.shelf-wood {
  position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 18px; border-radius: 10px;
  background: linear-gradient(180deg, #7a4e2a, #5e3a1d);
  box-shadow: 0 6px 16px rgba(0,0,0,.35) inset, 0 12px 24px rgba(0,0,0,.25);
}

/* Responsive */
@media (max-width: 768px) {
  .shelf-track { grid-auto-columns: minmax(130px, 160px); gap: 14px; }
  .shelf-header h2 { font-size: 1.15rem; }
}
