/**
 * Catalog Styles
 * Styles for the catalog page and PDF previews
 */

/* Catalog Grid */
.catalog-grid {
    margin-bottom: 2rem;
}

/* Catalog Item */
.catalog-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* PDF Preview */
.pdf-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

.pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* PDF Preview Modal */
#pdf-preview-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

#pdf-preview-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.preview-btn, .download-btn {
    transition: background-color 0.3s ease;
}

.preview-btn:hover, .download-btn:hover {
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    #pdf-preview-modal .relative {
        width: 95%;
        height: 90vh;
    }
}

/* Loading indicator for PDF previews */
.pdf-preview::before {
    content: "Loading PDF...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-size: 0.875rem;
}

.pdf-preview.loaded::before {
    display: none;
}

/* Category filters */
.catalog-categories {
    margin-bottom: 1.5rem;
}

.catalog-categories .category-filter {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.catalog-categories .category-filter:hover {
    background-color: #e5e7eb;
}

.catalog-categories .category-filter.active {
    background-color: #064039;
    color: white;
}

/* Search box */
.catalog-search {
    margin-bottom: 1.5rem;
}

.catalog-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    font-size: 1rem;
}

.catalog-search input:focus {
    outline: none;
    border-color: #064039;
    box-shadow: 0 0 0 3px rgba(6, 64, 57, 0.1);
}