/* Contenedor principal: Rejilla adaptativa */
.biblioteca-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Estructura de cada tarjeta de libro */
.libro-tarjeta {
    display: flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 180px; /* Altura fija para que todas las tarjetas cuadren perfectamente */
}

/* Bloque izquierdo: La Portada */
.libro-portada-wrapper {
    flex: 0 0 120px; /* Ancho fijo para la imagen de portada */
    background: #f7fafc;
}
.libro-portada-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta la imagen sin deformarla */
    display: block;
}

/* Bloque derecho: Textos */
.libro-datos-wrapper {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tipografías y control de desborde */
.libro-titulo {
    font-size: 16px;
    margin: 0 0 4px 0;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Corta el título con puntos si es larguísimo */
}
.libro-titulo a {
    color: #2d3748;
    text-decoration: none;
}
.libro-titulo a:hover {
    color: #3182ce;
}

.libro-autor {
    font-size: 13px;
    color: #718096;
    margin: 0 0 8px 0;
}
.libro-autor a {
    color: #718096;
    text-decoration: none;
}

.libro-sinopsis {
    font-size: 12px;
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
}

/* Estilo para el botón inferior "Ver más" */
.btn-biblioteca-vermas {
    display: inline-block;
    padding: 10px 24px;
    background-color: #3182ce;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s ease;
}
.btn-biblioteca-vermas:hover {
    background-color: #2b6cb0;
}