/* Loader and AJAX styles */
.section-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
    width: 100%;
    height: 300px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #343a40;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.section-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-height: 200px;
    opacity: 1;
}

.section-content.loading {
    opacity: 0.6;
    transform: scale(0.98);
}

/* Modern Hero Section Styles */
.modern-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.modern-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.02"/><circle cx="50" cy="10" r="1" fill="%23000" opacity="0.02"/><circle cx="10" cy="50" r="1" fill="%23000" opacity="0.02"/><circle cx="90" cy="30" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Artist Profile Container */
.artist-profile-container {
    position: relative;
    margin-bottom: 20px;
}

.artist-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.modern-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.modern-avatar:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.08);
}

.verification-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: 3px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.verification-indicator i {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.commission-status {
    margin-top: 15px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
}

.status-badge i {
    font-size: 12px;
}

/* Artist Info Panel */
.artist-info-panel {
    padding: 20px 0;
}

.artist-name-section {
    margin-bottom: 35px;
}

.artist-display-name {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.artist-specialty {
    font-size: 1.4rem;
    color: #4a5568;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.artist-location-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
    font-weight: 500;
}

.artist-location-info i {
    color: #e53e3e;
    font-size: 16px;
}

/* Artist Metrics */
.artist-metrics {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.metric-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 25px;
    text-align: center;
    min-width: 120px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.metric-card:hover::before {
    transform: translateX(0);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.metric-card.featured {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #744210;
    border: none;
}

.metric-card.featured::before {
    background: linear-gradient(90deg, #d69e2e, #b7791f);
}

.metric-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    line-height: 1;
}

.metric-card.featured .metric-number {
    color: #744210;
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card.featured .metric-label {
    color: #744210;
}

/* Responsive Design */
@media (max-width: 992px) {
    .modern-hero-section {
        padding: 40px 0;
    }
    
    .artist-display-name {
        font-size: 2.5rem;
    }
    
    .modern-avatar {
        width: 140px;
        height: 140px;
    }
    
    .artist-metrics {
        justify-content: center;
        margin-top: 25px;
    }
}

@media (max-width: 768px) {
    .modern-hero-section {
        padding: 30px 0;
    }
    
    .artist-display-name {
        font-size: 2rem;
        text-align: center;
    }
    
    .artist-specialty {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .artist-location-info {
        justify-content: center;
    }
    
    .modern-avatar {
        width: 120px;
        height: 120px;
    }
    
    .metric-card {
        min-width: 100px;
        padding: 15px 20px;
    }
    
    .metric-number {
        font-size: 1.8rem;
    }
    
    .artist-metrics {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .artist-display-name {
        font-size: 1.8rem;
    }
    
    .artist-specialty {
        font-size: 1.1rem;
    }
    
    .artist-location-info {
        font-size: 1rem;
    }
}

/* Global Styles */
.artist-page {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    background-color: #fff;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 70px;
    background-color: #000;
}

/* Hero Section */
.artist-hero-wrapper {
    background-color: #000;
    border-radius: 10px;
    padding: 60px 40px;
    margin-top: 40px;
    margin-bottom: 40px;
    color: #fff;
    opacity: 1;
    transform: translateY(0);
}

.artist-avatar-container {
    position: relative;
    margin-bottom: 30px;
}

.artist-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.verification-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #fff;
    color: #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.artist-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.artist-specialization {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.artist-location {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.artist-location i {
    margin-right: 8px;
}

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

.stat-item {
    text-align: center;
    padding: 10px;
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* About Section */
.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.about-tabs {
    margin-top: 40px;
}

.nav-tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    padding: 12px 20px;
    border: none;
    color: #666;
    font-weight: 500;
    position: relative;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: #000;
    font-weight: 600;
    background: transparent;
}

.nav-tabs .nav-link.active:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background-color: #000;
}

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    line-height: 1.7;
}

/* Gallery Section */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.gallery-title {
    font-size: 28px;
    font-weight: 700;
}

.gallery-filters {
    display: flex;
    gap: 15px;
}

.filter-btn {
    background: #f5f5f5;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #000;
    color: #fff;
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.artwork-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artwork-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.artwork-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.product-image-link {
    position: relative;
    display: block;
}

.artwork-info {
    padding: 20px;
}

.artwork-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #000;
    text-decoration: none;
}

.artwork-price {
    font-weight: 700;
    font-size: 18px;
    color: #000;
}

.artwork-meta {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.load-more {
    display: block;
    width: 200px;
    margin: 40px auto 0;
    padding: 12px 0;
    text-align: center;
    border: 2px solid #000;
    background: transparent;
    color: #000;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more:hover {
    background: #000;
    color: #fff;
}

/* Commission Banner */
.commission-banner {
    background: linear-gradient(135deg, #000, #333);
    border-radius: 10px;
    padding: 40px;
    margin: 60px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.commission-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.commission-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 600px;
}

.commission-background {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    opacity: 0.1;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
}

/* Responsive */
@media (max-width: 992px) {
    .artist-name {
        font-size: 2.5rem;
    }

    .artwork-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .artist-hero-wrapper {
        padding: 40px 20px;
    }

    .artist-avatar {
        width: 150px;
        height: 150px;
    }

    .artist-stats {
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 0 0 50%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }

    .artwork-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

.badge-black {
    background-color: #000;
    color: #fff;
}

/* Sold Artworks Section */
.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.sold-badge {
    background-color: #cc0000;
    color: white;
    font-weight: 700;
    padding: 10px 30px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    transform: rotate(-15deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.sold-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cc0000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.artwork-card .sold-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    position: relative;
}

.pagination-counter {
    position: absolute;
    right: 0;
    color: #777;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination li {
    margin: 0;
}

.pagination .page-item .page-link {
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background-color: #000;
    border-color: #000;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pagination .page-item .page-link:hover:not(.disabled):not(.active) {
    background-color: #f2f2f2;
    border-color: #999;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
    pointer-events: none;
    background-color: #f9f9f9;
    border-color: #ddd;
}

/* Add subtle transition effects */
.artwork-grid {
    transition: opacity 0.3s ease;
    position: relative;
    margin-bottom: 1.5rem;
}

/* Add additional spacing to paginations */
.pagination-section {
    padding-bottom: 3rem;
}

/* Consistent product card heights */
.product-card {
    height: 100%;
    transition: transform 0.3s ease;
}

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

/* Improved ellipsis styling */
.pagination .page-item.ellipsis .page-link {
    background-color: transparent;
    border: none;
    color: #6c757d;
}

/* Ensure consistent sizing for all pagination links */
.pagination .page-link {
    min-width: 40px;
    text-align: center;
}

/* Loading spinner for pagination */
.pagination-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Fade in animation for artwork cards */
.artwork-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.artwork-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Current page indicator */
.pagination .page-item.active .page-link {
    position: relative;
}

.pagination .page-item.active .page-link:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #000;
}

/* Mobile pagination styles */
@media (max-width: 576px) {
    .pagination .mobile-hidden {
        display: none;
    }

    .pagination .page-item:not(.active):not(:first-child):not(:last-child) {
        display: none;
    }

    .pagination-info {
        text-align: center;
        font-size: 0.9rem;
        color: #6c757d;
        margin-top: 0.5rem;
    }

    .pagination .page-link {
        padding: 0.75rem 1rem;
        min-width: 45px;
    }

    .pagination-container {
        flex-direction: column;
        align-items: center;
    }

    .pagination-counter {
        position: static;
        margin-top: 1rem;
    }
}

/* Alternative mobile view with simplified controls */
.pagination-simple {
    display: none;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

@media (max-width: 576px) {
    .pagination-simple {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .page-btn {
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
        color: #333;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .page-btn:disabled {
        opacity: 0.5;
        pointer-events: none;
        box-shadow: none;
    }

    .page-btn:hover:not(:disabled) {
        background-color: #f2f2f2;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .pagination-counter {
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
        font-weight: 500;
    }

    .pagination .page-item {
        margin: 0 2px;
    }
}

/* Accessibility improvements */
.page-link:focus,
.page-btn:focus,
.cta-btn:focus,
.social-link:focus,
.filter-btn:focus {
    outline: 2px solid #0066ff;
    outline-offset: 2px;
    box-shadow: none;
}

/* Skip to content link for keyboard users */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px 15px;
    background-color: #000;
    color: #fff;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Enhanced animations */
.section-title {
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-title.animate {
    opacity: 1;
    transform: translateX(0);
}

.artist-hero-wrapper.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth slide-in effect for tabs */
.tab-pane.fade {
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-pane.fade.show {
    transform: translateY(0);
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .pagination .page-item.active .page-link {
        border: 2px solid #000;
    }

    .artist-hero-wrapper {
        border: 2px solid #000;
    }

    .pagination .page-link,
    .page-btn {
        border: 2px solid #333;
    }

    .artwork-title,
    .artwork-price {
        text-decoration: underline;
    }
}

/* Reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Product card styling */
.product-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    position: relative;
    height: 100%;
}

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

.product-img-container {
    height: 250px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.product-info {
    padding: 15px;
    background-color: white;
}

.product-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

.product-price {
    font-weight: 700;
    color: #343a40;
    margin-bottom: 8px;
}

.product-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Sold Badge */
.sold-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

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

.sold-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-title a:hover {
    text-decoration: underline;
}

.product-grid {
    margin-left: -10px;
    margin-right: -10px;
    transition: all 0.3s ease;
}

.product-grid>div {
    padding-left: 10px;
    padding-right: 10px;
}

/* Commission Button Styles */
.artist-actions {
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff445a, #ff6a3d);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 68, 90, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e63347, #e85f35);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 51, 71, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}