:root { --main-color: #ba141d; --text-dark: #333; }

/* 1. إصلاح صفحة الكتاب الواحدة */
.eprcen-book-container {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* إجبار المحتوى على أخذ العرض الكامل */
.single-eprcen_book .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important; /* حل مشكلة الاليمنتور */
}

/* زر التحميل */
.eprcen-dl-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--main-color);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
    margin-bottom: 20px;
}
.eprcen-dl-btn:hover { background: #333; color: #fff; }

/* 2. تصميم الشبكة في الرئيسية (الشورت كود) */
.eprcen-lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    direction: rtl;
    padding: 20px 0;
}

.eprcen-book-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.eprcen-book-item:hover { transform: translateY(-5px); border-color: var(--main-color); }

.book-img { height: 280px; overflow: hidden; background: #f9f9f9; }
.book-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.eprcen-book-item:hover .book-img img { transform: scale(1.05); }

.book-txt { padding: 15px; text-align: center; }
.book-txt h3 { font-size: 1rem; margin-bottom: 10px; line-height: 1.4; height: 45px; overflow: hidden; }
.book-txt h3 a { color: var(--text-dark); text-decoration: none; }

.read-more-book {
    color: var(--main-color);
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.read-more-book:hover { border-bottom-color: var(--main-color); }