/* ===========================================
   Library Item Details Page
   =========================================== */
.library-detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.library-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.86rem;
}

.library-detail-breadcrumb a {
    color: #c7d2fe;
    text-decoration: none;
}

.library-detail-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .library-detail-layout {
        grid-template-columns: 1fr;
    }
}

.detail-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(47, 91, 255, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.detail-card + .detail-card {
    margin-top: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.meta-box {
    background: rgba(47, 91, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.meta-value {
    font-weight: 700;
    color: var(--text-primary);
}

.library-old-price {
    display: inline-block;
    margin-inline-start: 6px;
    color: rgba(15, 23, 42, 0.55);
    text-decoration: line-through;
    font-size: 0.75rem;
    font-weight: 600;
}

.library-pdf-viewer {
    background: #0b1120;
    border-radius: 18px;
    overflow: hidden;
    min-height: 620px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    position: relative;
}

.library-pdf-viewer .pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.library-pdf-viewer .pdf-left,
.library-pdf-viewer .pdf-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.library-pdf-viewer .pdf-btn {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8rem;
}

.library-pdf-viewer .pdf-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.library-pdf-viewer .pdf-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 16px;
    background: #0b1120;
    min-height: 520px;
    position: relative;
}

.library-pdf-viewer .preview-watermark,
.image-preview .preview-watermark {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 72px;
    height: 72px;
    object-fit: contain;
    opacity: 0.22;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    user-select: none;
}

.library-pdf-viewer canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}

.library-pdf-viewer .pdf-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #e2e8f0;
    text-align: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.65);
}

.preview-placeholder {
    border: 1px dashed rgba(47, 91, 255, 0.35);
    border-radius: 18px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(47, 91, 255, 0.04);
}

.image-preview {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(47, 91, 255, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    text-align: center;
    position: relative;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-actions .action-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.detail-actions .action-btn.ghost {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    border: 1px solid rgba(47, 91, 255, 0.12);
}
