/* Gallery Page Styles */

.gallery-page {
    padding-top: 80px;
    min-height: 100vh;
}

/* Header */
.gallery-header {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), transparent);
    padding: 4rem 2rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.gallery-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.gallery-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.gallery-hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.gallery-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Filter */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.filter-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.filter-btn.active {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--bg-primary);
}

/* Content */
.gallery-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.gallery-stats {
    color: var(--text-secondary);
}

.gallery-stats strong {
    color: var(--gold-primary);
}

.gallery-sort select {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    cursor: pointer;
}

.gallery-sort select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Grid */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.artwork-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.artwork-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.artwork-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.artwork-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.artwork-card:hover .artwork-image img {
    transform: scale(1.05);
}

.artwork-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.artwork-card:hover .artwork-overlay {
    opacity: 1;
}

.artwork-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.artwork-tag {
    padding: 0.25rem 0.5rem;
    background: rgba(201, 169, 98, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--gold-light);
}

.artwork-info {
    padding: 1.5rem;
}

.artwork-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.artwork-artist {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.artwork-artist img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.artwork-artist span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.artwork-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artwork-price {
    font-size: 1.1rem;
    color: var(--gold-primary);
    font-weight: 600;
}

.artwork-score {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gold-light);
    font-size: 0.9rem;
}

/* Loading */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.pagination button.active {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
    color: var(--bg-primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Artwork Modal */
.artwork-modal-content {
    max-width: 1000px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.artwork-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.artwork-detail-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.artwork-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.artwork-detail-info h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.artwork-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.meta-label {
    color: var(--text-muted);
}

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

.meta-value.price {
    color: var(--gold-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.artwork-actions {
    display: flex;
    gap: 1rem;
}

.artwork-actions button {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
}

.artwork-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.artwork-description h3 {
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.artwork-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .artwork-grid {
        grid-template-columns: 1fr;
    }
    
    .artwork-detail {
        grid-template-columns: 1fr;
    }
    
    .gallery-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .gallery-hero h1 {
        font-size: 2rem;
    }
}
