/* static/css/catalog.css */
.view-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sorting-select, .per-page-select {
    min-width: 200px;
}

.filter-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-scroll::-webkit-scrollbar {
    width: 5px;
}

.filter-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.filter-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.artwork-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.artwork-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.artwork-image {
    height: 250px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}

.sold-artwork .artwork-image {
    filter: brightness(0.85) saturate(0.8);
}

.sold-artwork .card-title {
    color: #6c757d !important;
}

.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.filter-card.sticky-top {
    top: 110px; 
    z-index: 1010;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

.form-check-input:checked#show_available_only {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label[for="show_available_only"] {
    color: #0d6efd;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 992px) {
    .filter-card.sticky-top {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 1.5rem;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sorting-select, .per-page-select {
        width: 100%;
        min-width: unset;
    }
    
    .artwork-image {
        height: 200px;
    }
    
    .filter-card {
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .artwork-image {
        height: 180px;
    }
}

.badge.bg-primary {
    padding: 0.5em 0.8em;
}

.remove-filter:hover {
    opacity: 0.8;
}

.pagination .page-link {
    color: #495057;
    border: 1px solid #dee2e6;
    margin: 0 3px;
    border-radius: 4px;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.filter-toggle-btn {
    display: none;
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .filter-toggle-btn {
        display: inline-flex;
    }
    
    .filter-card {
        display: none;
    }
    
    .filter-card.show {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}