/* ============================================
   Products Page Styles
   ============================================ */

/* ============================================
   Products Hero Section
   ============================================ */

.products-hero {
    background: linear-gradient(135deg, var(--color-bg-warm) 0%, var(--color-bg-alt) 100%);
    padding: var(--space-4xl) 0 var(--space-3xl);
    border-bottom: 1px solid var(--color-border);
}

.products-hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.products-hero-title {
    font-size: var(--text-5xl);
    text-align: center;
    margin-bottom: var(--space-md);
}

.products-hero-subtitle {
    text-align: center;
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Products Controls
   ============================================ */

.products-controls {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) var(--space-3xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-base);
    background: white;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-group label {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.filter-group select {
    padding: var(--space-md) var(--space-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-base);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 180px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* ============================================
   Products Grid Section
   ============================================ */

.products-grid-section {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-pure);
}

.results-header {
    margin-bottom: var(--space-2xl);
}

.results-count {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.results-count strong {
    color: var(--color-text-primary);
}

.active-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
}

.active-filter button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.active-filter button i {
    width: 14px;
    height: 14px;
}

/* ============================================
   All Products Grid
   ============================================ */

.all-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

/* Reusing product card styles from main style.css */
.product-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Stagger animations */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }

/* ============================================
   No Results
   ============================================ */

.no-results {
    text-align: center;
    padding: var(--space-5xl) var(--space-lg);
}

.no-results i {
    width: 80px;
    height: 80px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.no-results h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.no-results p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* ============================================
   Load More
   ============================================ */

.load-more {
    text-align: center;
    padding-top: var(--space-2xl);
}

/* ============================================
   Products CTA Section
   ============================================ */

.products-cta {
    padding: var(--space-4xl) 0;
    background: var(--color-bg-warm);
    border-top: 1px solid var(--color-border);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.cta-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Loading Spinner
   ============================================ */

.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-bg-alt);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .all-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .products-hero-title {
        font-size: var(--text-3xl);
    }

    .products-hero-subtitle {
        font-size: var(--text-base);
    }

    .all-products-grid {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
