/* ART451 Enhanced Design System - Professional Gallery Aesthetics */
/* This file enhances existing styling without breaking functionality */

/* Typography Enhancements */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fafafa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Enhanced Navigation Styling */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav {
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav__link {
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
    color: #374151;
}

.nav__link:hover {
    color: #111827;
}

.nav__link--active {
    color: #111827;
    font-weight: 600;
}

/* Enhanced Main Content */
.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 80px;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Homepage Enhancements */
.homepage-hero {
    padding: 4rem 0 6rem;
    text-align: center;
    background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #111827;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: #6b7280;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Featured Content Sections */
.featured-section {
    padding: 4rem 0;
}

.featured-section:nth-child(even) {
    background-color: #ffffff;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: #111827;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.featured-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.featured-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-card-content {
    padding: 1.5rem;
}

.featured-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.featured-card-excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.featured-card-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Store Page Enhancements */
.store-container {
    padding: 4rem 2rem;
}

.store-header {
    margin-bottom: 4rem;
}

.store-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    color: #111827;
    margin-bottom: 1rem;
}

.store-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 300;
}

.store-filters {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 3rem;
}

/* Carousel Media Enhancements - Video and GIF Support */
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-slide video:focus {
    outline: none;
}

/* GIF optimization for carousel */
.carousel-slide img[src$=".gif"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Video overlay controls (hidden by default for hero videos) */
.hero-video {
    pointer-events: none;
}

.hero-video::-webkit-media-controls {
    display: none !important;
}

.hero-video::-webkit-media-controls-panel {
    display: none !important;
}

.hero-video::-webkit-media-controls-play-button {
    display: none !important;
}

/* Media loading states */
.media-loading {
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

/* Enhanced Product Cards */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #6b7280;
}

.product-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artist-info {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    font-style: italic;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn--primary {
    background-color: #111827;
    color: #ffffff;
}

.btn--primary:hover {
    background-color: #000000;
    transform: translateY(-1px);
}

.btn--secondary {
    background-color: #6b7280;
    color: #ffffff;
}

.btn--secondary:hover {
    background-color: #4b5563;
}

.btn--outline {
    background-color: transparent;
    color: #6b7280;
    border-color: #d1d5db;
}

.btn--outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn--ghost {
    background-color: transparent;
    color: #6b7280;
    border: none;
    padding: 0.5rem;
}

.btn--ghost:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Enhanced Form Elements */
.form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

/* Enhanced Footer */
.footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 3rem 0 2rem;
}

.footer a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* Message Enhancements */
.messages-container {
    position: fixed;
    top: 90px;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.message {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #10b981;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message--error {
    border-left-color: #ef4444;
}

.message__close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    margin-left: auto;
    padding: 0.25rem;
}

.message__close:hover {
    color: #374151;
}

/* Loading Spinner Enhancement */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-spinner.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #111827;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }
    
    .page-container {
        padding: 0 1rem;
    }
    
    .store-container {
        padding: 2rem 1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .store-filters {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Content Management Admin Enhancements */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #fbbf24;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.content-admin-tools {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.featured-card:hover .content-admin-tools,
.product-card:hover .content-admin-tools {
    opacity: 1;
}

.admin-edit-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s ease;
}

.admin-edit-btn:hover {
    background: rgba(0, 0, 0, 1);
}

/* Cart Counter Enhancement */
.cart-count {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    min-width: 1.25rem;
    text-align: center;
    line-height: 1;
}

/* Enhanced Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.btn:focus,
.form-select:focus,
.nav__link:focus {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

/* Animation Utilities */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}