/* Container Buku */
.card-ebook {
    width: 170px;
    position: relative;
    background: #fff;
    border-radius: 2px 8px 8px 2px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Shadow berlapis biar lebih halus & dalam */
    box-shadow: 
        5px 5px 15px rgba(0,0,0,0.15), 
        10px 10px 25px rgba(0,0,0,0.1);
    z-index: 2;
    perspective: 1000px;
}

/* Gambar Cover dengan Efek Punggung */
.img-wrapper-ebook {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 2px 6px 6px 2px;
    z-index: 3;
    background: #f8f9fa;
}

.img-wrapper-ebook::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Pantulan cahaya diagonal */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 50%
    );
    z-index: 5;
    pointer-events: none;
}

/* Garis Punggung Buku (Spine Line) */
.img-wrapper-ebook::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 14px; /* Sedikit lebih lebar */
    height: 100%;
    /* Gradasi lebih kontras buat efek lekukan hardcover */
    background: linear-gradient(to right, 
        rgba(0,0,0,0.3) 0%, 
        rgba(0,0,0,0.1) 15%, 
        rgba(255,255,255,0.1) 40%, 
        rgba(0,0,0,0) 100%);
    z-index: 6;
}

/* Efek Tebal Buku di Samping (Isi Kertas) */
/* 🟢 Efek Tebal Buku Samping (Garis Vertikal Sejajar) */
.card-ebook::after {
    content: "";
    position: absolute;
    top: 1px;
    right: -8px; /* Ketebalan samping */
    width: 100%;
    height: 98%;
    
    /* Warna dasar kertas (Broken White) */
    background-color: #bfbfbf; 
    
    /* 🟢 KUNCI UTAMA: Garis-garis Vertikal (Serat Halaman) */
    background-image: 
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 1px,        /* Warna kertas */
            rgba(0,0,0,0.06) 1px,   /* Warna garis halus vertikal */
            rgba(0,0,0,0.06) 2px    /* Jarak antar serat kertas */
        );
        
    border: 1px solid #dcdcdc; 
    z-index: 1;
    border-radius: 0 9px 9px 0;
    
    /* Efek bayangan tipis di antara kertas & cover */
    box-shadow: inset 2px 0 5px rgba(0,0,0,0.05);
}

/* Info Container di Bawah */
.ebook-info-container {
    width: 170px;
    margin-top: 15px;
    padding: 0 4px;
}

.category-text-ebook {
    color: #ff6b6b;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.title-text-ebook {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Efek Hover: Miring & Angkat Sedikit */
.card-ebook:hover {
    transform: rotateY(-20deg) translateY(-10px) translateX(12px);
}

.badge-harga-ebook {
    position: absolute;
    top: 10px;
    right: -10px; /* Sedikit keluar biar pop-out */
    z-index: 10;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}