/* ============================================
   INSANELY BEAUTIFUL CATALOG UI
   Super Organized & Outstandingly Beautiful
   ============================================ */

/* Catalog Container */
.catalog-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--theme-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2rem;
    border: 2px solid var(--theme-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--theme-glow);
}

/* Catalog Header */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--theme-border);
}

.catalog-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--theme-glow);
}

.catalog-subtitle {
    color: var(--theme-text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Category Navigation */
.catalog-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid var(--theme-border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.catalog-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--theme-border);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    text-decoration: none;
    color: var(--theme-text);
    position: relative;
    overflow: hidden;
}

.catalog-category::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-category:hover::before {
    opacity: 0.1;
}

.catalog-category:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--theme-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 25px var(--theme-glow);
}

.catalog-category.active {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-color: var(--theme-primary);
    box-shadow: 0 0 30px var(--theme-glow);
    color: white;
}

.catalog-category.active::before {
    opacity: 0;
}

.catalog-category-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 10px var(--theme-glow));
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.catalog-category:hover .catalog-category-icon {
    transform: scale(1.15) rotate(5deg);
}

.catalog-category-name {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.catalog-category-count {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    position: relative;
    z-index: 1;
}

.catalog-category.active .catalog-category-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Catalog Toolbar */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.catalog-search {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.catalog-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--theme-border);
    border-radius: 0.75rem;
    color: var(--theme-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.catalog-search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1), 0 0 20px var(--theme-glow);
    background: rgba(255, 255, 255, 0.08);
}

.catalog-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.catalog-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.catalog-filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--theme-border);
    border-radius: 0.75rem;
    color: var(--theme-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--theme-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.catalog-filter-btn.active {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-color: var(--theme-primary);
    color: white;
    box-shadow: 0 0 20px var(--theme-glow);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.catalog-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--theme-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.catalog-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.catalog-item:hover::before {
    opacity: 0.1;
}

.catalog-item:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--theme-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--theme-glow);
}

.catalog-item-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.catalog-item:hover .catalog-item-image {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 8px 20px var(--theme-glow));
}

.catalog-item-info {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.catalog-item-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--theme-text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.catalog-item-description {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.catalog-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.catalog-item-price-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Catalog Pagination */
.catalog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--theme-border);
}

.catalog-page-btn {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--theme-border);
    border-radius: 0.75rem;
    color: var(--theme-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.catalog-page-btn:hover:not(.disabled):not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--theme-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.catalog-page-btn.active {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-color: var(--theme-primary);
    color: white;
    box-shadow: 0 0 20px var(--theme-glow);
}

.catalog-page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Inventory UI Enhancements */
.inventory-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border: 2px solid var(--theme-border);
    padding: 0.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.inventory-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px var(--theme-glow);
}

/* Catalog Stats */
.catalog-stats {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid var(--theme-border);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.catalog-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.catalog-stat-label {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.catalog-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading States */
.catalog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.catalog-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--theme-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.catalog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--theme-text-muted);
}

.catalog-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.catalog-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--theme-text);
}

.catalog-empty-text {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .catalog-container {
        padding: 1rem;
    }

    .catalog-title {
        font-size: 2rem;
    }

    .catalog-categories {
        gap: 0.75rem;
    }

    .catalog-category {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }

    .catalog-category-icon {
        width: 40px;
        height: 40px;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .catalog-toolbar {
        flex-direction: column;
    }

    .catalog-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-categories {
        gap: 0.5rem;
    }

    .catalog-category {
        min-width: 70px;
        padding: 0.5rem 0.75rem;
    }
}

/* Premium Animations */
@keyframes catalogItemAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.catalog-item {
    animation: catalogItemAppear 0.4s ease forwards;
}

.catalog-item:nth-child(1) { animation-delay: 0.05s; }
.catalog-item:nth-child(2) { animation-delay: 0.1s; }
.catalog-item:nth-child(3) { animation-delay: 0.15s; }
.catalog-item:nth-child(4) { animation-delay: 0.2s; }
.catalog-item:nth-child(5) { animation-delay: 0.25s; }
.catalog-item:nth-child(6) { animation-delay: 0.3s; }
.catalog-item:nth-child(7) { animation-delay: 0.35s; }
.catalog-item:nth-child(8) { animation-delay: 0.4s; }
