/* ========================================
   Product Archive Page Styles
   W3C Validated - Replaces inline styles
   ======================================== */

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--neutral-200, #e9ecef);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

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

.product-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-card-excerpt {
    color: var(--text-secondary, #6c757d);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary, #6c757d);
    margin-bottom: 1rem;
}

.product-card-category {
    background: var(--primary-light, #e3f2fd);
    color: var(--primary, #004d99);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-card-link {
    color: var(--primary, #004d99);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.product-card-link:hover {
    color: var(--primary-dark, #003d7a);
    text-decoration: underline;
}

/* Category Filter */
.category-filter {
    background: var(--neutral-50, #f8f9fa);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--neutral-200, #e9ecef);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.category-item {
    background: white;
    border: 1px solid var(--neutral-300, #dee2e6);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item:hover,
.category-item.active {
    background: var(--primary, #004d99);
    color: white;
    border-color: var(--primary, #004d99);
}

.category-item-count {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Toggle Button */
.toggle-categories-btn {
    background: var(--primary, #004d99);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.toggle-categories-btn:hover {
    background: var(--primary-dark, #003d7a);
}

.show-less-text {
    display: none;
}

/* Hidden Categories */
.category-item.hidden {
    display: none;
}

/* Accessibility */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Styles */
.product-card:focus-within {
    outline: 2px solid var(--primary, #004d99);
    outline-offset: 2px;
}

.category-item:focus {
    outline: 2px solid var(--primary, #004d99);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .product-card-content {
        padding: 1rem;
    }
    
    .product-card-title {
        font-size: 1.125rem;
    }
} 