/* ==========================================================================
   3D BOOK FLIP ANIMATION
   ========================================================================== */

.book-card {
    perspective: 1500px;
    width: 280px;
    height: 400px;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
}

.book-card.large {
    width: 350px;
    height: 500px;
}

.book-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 10px 30px rgba(74, 44, 10, 0.2);
}

.book-card:hover .book-inner {
    transform: rotateY(-180deg);
}

.book-front, .book-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px 8px 8px 4px;
    overflow: hidden;
}

.book-front {
    background: #fff;
    z-index: 2;
}

.book-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-back {
    background: var(--secondary);
    color: var(--primary);
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(74, 44, 10, 0.1);
    z-index: 1;
}

.back-content h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.back-content p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Spine detail */
.book-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.2), transparent);
    z-index: 3;
}
