/* Artwork Details Modal */
.artwork-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.artwork-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-modal:hover {
    color: #666666;
    transform: scale(1.1);
}

.modal-body {
    display: flex;
    height: 100%;
    max-height: 90vh;
}

.artwork-image-container {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
    padding: 20px;
}

.modal-artwork-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.modal-artwork-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.image-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artwork-image-container:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.artwork-details {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    max-height: 90vh;
    background: white;
}

.artwork-title {
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.artwork-meta {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    color: #333;
    font-weight: 500;
}


.artwork-description {
    margin-bottom: 2rem;
}

.artwork-description h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.artwork-description p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.artwork-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: #000;
    color: white;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #999;
    color: #333;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        width: 100%;
        margin: 1rem;
    }
    
    .modal-body {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .artwork-image-container {
        min-height: 300px;
        max-height: 50vh;
    }
    
    .artwork-details {
        padding: 20px;
        max-height: 50vh;
    }
    
    .artwork-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .artwork-meta {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .artwork-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .artwork-details {
        padding: 15px;
    }
    
    .artwork-title {
        font-size: 1.5rem;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Loading state */
.modal-artwork-image.loading {
    opacity: 0.5;
    background: #f0f0f0;
}

/* Error state */
.modal-artwork-image.error {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}
