/* Custom CSS for Artwork Management System */

/* Global Styles */
:root {
    --primary-color: #1a2456; /* Dark blue */
    --secondary-color: #f7d63a; /* Yellow */
    --accent-color: #f44336; /* Red/Pink */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-underline {
    height: 3px;
    width: 80px;
    background-color: var(--secondary-color);
    margin: 15px 0 30px;
}

.page-title-banner {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: white;
    margin-bottom: 40px;
    text-align: center;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
}

/* Artwork Cards */
.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.artwork-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artwork-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.artwork-image {
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.artwork-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.artwork-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

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

.artwork-overlay-content {
    text-align: center;
    color: white;
}

.artwork-category {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 10px;
}

.view-artwork {
    display: inline-block;
    padding: 8px 20px;
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.view-artwork:hover {
    background-color: var(--secondary-color);
}

.artwork-sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sold-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 30px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 5px;
    transform: rotate(-15deg);
}

.artwork-info {
    padding: 20px;
}

.artwork-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.artwork-artist {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.artwork-artist a {
    color: var(--accent-color);
    text-decoration: none;
}

.artwork-artist a:hover {
    text-decoration: underline;
}

.artwork-description {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.artwork-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.artwork-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-purchase {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-purchase:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Artist Cards */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.artist-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.artist-profile {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.artist-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.artist-info {
    flex-grow: 1;
}

.artist-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.artist-bio {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-view-artist {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-view-artist:hover {
    background-color: var(--accent-color);
    color: white;
}

.artist-artwork-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    margin-top: auto;
}

.count-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.count-label {
    font-size: 14px;
    color: var(--text-color);
}

/* Filters */
.artwork-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.filter-btn {
    padding: 8px 20px;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filters-container {
    margin-bottom: 30px;
}

.filter-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.sorting-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sorting-options label {
    margin-right: 10px;
}

/* Artwork Detail Page */
.artwork-detail {
    margin-bottom: 60px;
}

.artwork-gallery {
    position: relative;
    margin-bottom: 30px;
}

.artwork-single-image {
    width: 100%;
    position: relative;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    border-radius: var(--border-radius);
}

.artwork-single-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.artwork-gallery-swiper {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: auto;
}

.artwork-meta {
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.artwork-category .category-label {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 15px;
}

.artwork-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.artist-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.artist-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-name {
    font-size: 16px;
    font-weight: 600;
}

.artwork-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.artwork-details {
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 10px;
}

.detail-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 5px;
}

.artwork-price-section {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.price {
    margin-bottom: 15px;
}

.price-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 5px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.purchase-options {
    margin-top: 20px;
}

.btn-purchase {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-purchase:hover {
    background-color: var(--accent-color);
}

.related-artworks {
    margin-top: 60px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Artist Detail Page */
.artist-detail {
    margin-bottom: 60px;
}

.artist-profile {
    margin-bottom: 50px;
}

.artist-image-container {
    text-align: center;
}

.artist-profile-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
}

.artist-bio-container {
    margin-top: 20px;
}

.artist-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
}

.stat-count {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-color);
}

.artist-artworks-section {
    margin-top: 40px;
}

/* Artwork Submission Form */
.artwork-submission-form {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

.submission-steps {
    position: relative;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: #ccc;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
}

.step.active .step-number {
    background-color: var(--primary-color);
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.step.active .step-label {
    color: var(--primary-color);
}

.step-connector {
    flex-grow: 1;
    height: 2px;
    background-color: #ccc;
    margin: 0 10px;
}

.step-content {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.payment-method-options {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.profile-image-preview,
.artwork-images-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-image-preview img,
.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.review-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
}

.review-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.review-item {
    margin-bottom: 10px;
    display: flex;
}

.review-label {
    font-weight: 600;
    width: 120px;
    flex-shrink: 0;
}

.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-image img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.submission-terms {
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.submission-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    color: #4CAF50;
    margin-bottom: 20px;
}

.success-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Checkout and Payment Pages */
.checkout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.checkout-artwork {
    flex: 1;
    min-width: 300px;
}

.checkout-form {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

.payment-methods {
    margin-top: 20px;
}

.payment-method-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.payment-method-item:hover,
.payment-method-item.active {
    border-color: var(--primary-color);
}

.payment-method-item-header {
    display: flex;
    align-items: center;
}

.payment-method-radio {
    margin-right: 10px;
}

.payment-method-title {
    font-weight: 600;
    flex-grow: 1;
}

.payment-method-description {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.order-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.proof-upload {
    margin-top: 20px;
}

.proof-preview {
    margin-top: 15px;
    max-width: 300px;
}

.proof-preview img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.confirmation-container {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.confirmation-icon {
    color: #4CAF50;
    margin-bottom: 20px;
}

.order-details {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    text-align: left;
}

.confirmation-actions {
    margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .artists-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .step-indicators {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .step-connector {
        display: none;
    }
    
    .artist-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .artwork-detail .row {
        flex-direction: column;
    }
    
    .checkout-container {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .artworks-grid {
        grid-template-columns: 1fr;
    }
    
    .artists-grid {
        grid-template-columns: 1fr;
    }
}

/* Add new styles for CTA sections */

/* Artist CTA Section on artworks page */
.artist-cta-section {
    background-color: var(--light-bg-color);
    padding: 5rem 0;
    margin-top: 4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.artist-cta-section .cta-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.artist-cta-section .cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.artist-cta-section .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.artist-cta-section .btn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
}

/* Join Artists CTA on artists page */
.join-artists-cta {
    background-color: var(--light-bg-color);
    background-image: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.9)), 
                       url('../images/patterns/pattern-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
    margin-top: 4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.join-artists-cta .cta-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.join-artists-cta .cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.join-artists-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.join-artists-cta .btn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
}

/* Responsive adjustments for CTA sections */
@media (max-width: 768px) {
    .artist-cta-section,
    .join-artists-cta {
        padding: 3rem 1.5rem;
    }
    
    .artist-cta-section .cta-title,
    .join-artists-cta .cta-title {
        font-size: 1.75rem;
    }
    
    .artist-cta-section .cta-description,
    .join-artists-cta .cta-description {
        font-size: 1rem;
    }
    
    .artist-cta-section .btn,
    .join-artists-cta .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .artist-cta-section .cta-buttons,
    .join-artists-cta .cta-buttons {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal-backdrop {
    opacity: 0.5 !important; /* Semi-transparent backdrop */
    z-index: 1040;
}

.artwork-modal {
    z-index: 1050;
}

.artwork-modal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.artwork-modal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.artwork-modal .modal-title {
    color: var(--primary-color);
    font-weight: 700;
}

.artwork-modal-image {
    width: 100%;
    height: 400px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
}

.artwork-modal-info {
    padding: 20px;
}

.artwork-modal-category {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.artwork-modal-artist-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

@media (max-width: 767px) {
    .artwork-modal-image {
        height: 300px;
    }
    
    .artwork-modal-info {
        padding: 15px;
    }
}

/* Ensure modals remain visible and interactive */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important; /* Prevent content shifting */
}

.modal {
    pointer-events: auto;
}

.modal.show .modal-dialog {
    transform: none !important;
}
