.pustaka-detail-wrap { padding: 40px 0 64px; background: #f8fafc; }

.pustaka-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

/* top card: cover + meta */
.pustaka-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    display: flex;
    gap: 28px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.pustaka-detail-cover {
    width: 110px;
    height: 140px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    flex-shrink: 0;
}
.ebook-cover    { background: #dbeafe; color: #1d4ed8; }
.ejournal-cover { background: #d1fae5; color: #065f46; }

.pustaka-detail-info { flex: 1; }
.pustaka-detail-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 16px;
}
.pustaka-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.pustaka-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #475569;
}
.pustaka-detail-meta-item i {
    width: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}
.pustaka-detail-meta-item a {
    color: var(--primary);
    text-decoration: none;
}
.pustaka-detail-meta-item a:hover { text-decoration: underline; }

.pustaka-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.pustaka-btn-download:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.ejournal-btn { background: #0d7a55; }
.ejournal-btn:hover { background: #09573c; }

/* content section */
.pustaka-detail-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px;
}
.pustaka-detail-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.pustaka-detail-section-title i { color: var(--primary); }
.pustaka-detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
}
.pustaka-detail-content p { margin-bottom: 12px; }

/* sidebar */
.pustaka-detail-sidebar {
    position: sticky;
    top: 20px;
}
.pustaka-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    margin: 0 0 14px;
}
.pustaka-related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.pustaka-related-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    text-decoration: none;
    transition: box-shadow .18s, border-color .18s;
}
.pustaka-related-item:hover {
    box-shadow: 0 4px 14px rgba(15,76,129,.1);
    border-color: #bcd0e8;
    text-decoration: none;
}
.pustaka-related-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ebook-cover-sm    { background: #dbeafe; color: #1d4ed8; }
.ejournal-cover-sm { background: #d1fae5; color: #065f46; }

.pustaka-related-body { flex: 1; min-width: 0; }
.pustaka-related-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pustaka-related-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pustaka-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.pustaka-back-link:hover { text-decoration: underline; }

@media (max-width: 991px) {
    .pustaka-detail-layout { grid-template-columns: 1fr; }
    .pustaka-detail-sidebar { position: static; }
}
@media (max-width: 600px) {
    .pustaka-detail-card { flex-direction: column; }
    .pustaka-detail-cover { width: 80px; height: 100px; font-size: 32px; }
}
