/**
 * Collections Gallery Styles
 * 
 * @package tailor-theme
 */

/* Collections Gallery Container */
.collections-gallery {
    padding: 2rem 0;
    min-height: 60vh;
}

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

.collections-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.collections-header .page-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}


/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 5px;
    margin-bottom: 3rem;
}

.collection-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.collection-item:hover img {
    transform: scale(1.02);
}

.collection-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.collection-lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-item:hover .collection-lightbox-img {
    transform: scale(1.05);
}

/* Loading States */
.collections-loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #725534;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.collections-loading p {
    color: #6c757d;
    font-size: 1rem;
}

/* Load More Button */
.collections-load-more {
    text-align: center;
    margin: 2rem 0;
}

#load-more-btn {
    padding: 1rem 2rem;
    background: #fc0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

#load-more-btn:hover:not(:disabled) {
    background: #fc0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

#load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No More Items */
.collections-no-more {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 1rem;
}

/* Error Messages */
.collections-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

.error-message {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .collections-gallery {
        padding: 1rem 0;
    }
    
    .collections-header .page-title {
        font-size: 2rem;
    }
    
    
    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .collection-info {
        padding: 1rem;
    }
    
    .collection-title {
        font-size: 1.1rem;
    }
    
    .collection-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .collections-header .page-title {
        font-size: 1.75rem;
    }
    
    .collections-header .page-description {
        font-size: 1rem;
    }
    
}

/* Animation for new items */
.collection-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Smooth scrolling for load more */
.collections-grid {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
#load-more-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .collection-item {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .collection-item,
    .collection-lightbox-img,
    #load-more-btn {
        transition: none;
    }
    
    .collection-item {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}
