.library-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(15, 23, 42, 0.7);
    font-weight: 600;
}

.library-breadcrumb a {
    color: #0f172a;
}

.library-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.library-category-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--category-color, #3b82f6) 25%, transparent);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.library-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.14);
    border-color: color-mix(in srgb, var(--category-color, #3b82f6) 45%, transparent);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--category-color, #3b82f6) 20%, white), color-mix(in srgb, var(--category-color, #3b82f6) 12%, white));
    color: var(--category-color, #1e3a8a);
    font-size: 1.7rem;
    box-shadow: 0 10px 18px rgba(47, 91, 255, 0.18);
}

.icon-badge.image {
    padding: 6px;
}

.icon-badge.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-info h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #0f172a;
}

.category-info p {
    margin: 0;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.9rem;
}

.category-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-pill {
    background: color-mix(in srgb, var(--category-color, #3b82f6) 15%, transparent);
    color: var(--category-color, #1e3a8a);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.library-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.library-file-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.library-file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.12);
}

.file-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(15, 23, 42, 0.06);
}

.library-file-card h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #0f172a;
}

.library-file-card p {
    margin: 0;
    color: rgba(15, 23, 42, 0.6);
    font-size: 0.85rem;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.6);
}

.file-price-discount {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 999px;
    padding: 2px 8px;
}

.file-price-discount strong {
    font-size: 0.78rem;
    color: #b91c1c;
}

.file-price-discount small {
    font-size: 0.72rem;
    color: rgba(15, 23, 42, 0.55);
    text-decoration: line-through;
}

.catalog-old-price {
    color: rgba(15, 23, 42, 0.48);
    text-decoration: line-through;
    font-size: 0.78rem;
}

.file-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.library-file-card.file-type-pdf .file-icon { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.library-file-card.file-type-word .file-icon { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.library-file-card.file-type-powerpoint .file-icon { background: rgba(234, 88, 12, 0.14); color: #c2410c; }
.library-file-card.file-type-excel .file-icon { background: rgba(22, 163, 74, 0.12); color: #15803d; }

@media (max-width: 768px) {
    .library-file-card {
        grid-template-columns: 1fr;
    }
}
