/**
 * Outfit Catalog - Custom Styles
 * Version: 2.9.0
 */

/* Force grid layout - LARGE images as main focus */
#catalogGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 900px) {
    #catalogGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* Max 3 columns - keep outfits BIG */

/* Outfit Card */
.outfit-card {
    animation: fadeInScale 0.3s ease-out;
    transition: all 0.2s ease;
}

.outfit-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(100, 108, 255, 0.3);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger animation for grid items */
#catalogGrid .outfit-card:nth-child(1) { animation-delay: 0.0s; }
#catalogGrid .outfit-card:nth-child(2) { animation-delay: 0.05s; }
#catalogGrid .outfit-card:nth-child(3) { animation-delay: 0.1s; }
#catalogGrid .outfit-card:nth-child(4) { animation-delay: 0.15s; }
#catalogGrid .outfit-card:nth-child(5) { animation-delay: 0.2s; }
#catalogGrid .outfit-card:nth-child(6) { animation-delay: 0.25s; }
#catalogGrid .outfit-card:nth-child(7) { animation-delay: 0.3s; }
#catalogGrid .outfit-card:nth-child(8) { animation-delay: 0.35s; }
#catalogGrid .outfit-card:nth-child(9) { animation-delay: 0.4s; }
#catalogGrid .outfit-card:nth-child(10) { animation-delay: 0.45s; }

/* Outfit card image styles are in shared tailwind.css */

.outfit-card img[src*="placeholder"] {
    opacity: 0.5;
}

/* Modal backdrop animation */
#productModal > div:first-child {
    animation: fadeIn 0.2s ease;
}

/* Modal content animation */
#productModal > div:last-child {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Product card hover in modal */
#productModalBody .card-base {
    transition: all 0.2s ease;
}

#productModalBody .card-base:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.2);
}

/* Hidden product indicator */
#productModalBody .card-base.border-red-500\/50 {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.05), transparent);
}

/* Date filter select styling */
#dateFilter {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Pagination buttons */
#paginationControls button:not(:disabled):hover {
    transform: translateY(-1px);
}

#paginationControls button:disabled {
    cursor: not-allowed;
}

/* Premium badge styling */
.outfit-card .bg-purple-600 {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mobile - single column for maximum size */
@media (max-width: 640px) {
    #catalogGrid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        max-width: 400px;
        margin: 0 auto;
    }
    
    #productModal > div:last-child {
        border-radius: 0.75rem;
    }
    
    #productModalBody .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Skeleton loading state */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
