.book-wrapper {
    perspective: 1000px;
}
.book {
    position: relative;
    width: 100%;
    height: 320px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    transform: rotateY(-5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book:hover {
    transform: rotateY(0deg) scale(1.02);
    box-shadow: 0 15px 25px rgba(0,0,0,0.35);
}
.book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* spine shadow */
.book::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
    border-radius: 4px 0 0 4px;
}

/* overlay content on cover */
.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.3); /* optional dim effect */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    color: #fff;
}
.book-overlay h5 {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    margin: 0 0 8px 0;
}
.book-overlay p {
    font-size: 14px;
    margin: 0 0 10px 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}
.book-overlay .book-btn {
    margin-top: auto;
    padding: 6px 12px;
    background: #ffc107;
    color: #000;
    font-weight: bold;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}
.book-overlay .book-btn:hover {
    background: #e0a800;
}