/* Products Page Specific Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1d4f91 0%, #2d5fa1 100%);
    color: #fff;
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.breadcrumb a {
    color: #b3d9ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: #b3d9ff;
}

/* Product Categories */
.product-categories {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: #1d4f91;
    box-shadow: 0 15px 40px rgba(29, 79, 145, 0.2);
}

.category-icon {
    font-size: 3.5rem;
    color: #1d4f91;
    margin-bottom: 1.5rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.category-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Product Filter */
.product-filter {
    padding: 40px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    outline: none;
    font-size: 1rem;
}

.search-box button {
    background: #1d4f91;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #2d5fa1;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
}

.filter-options select:focus {
    border-color: #1d4f91;
}

/* Products Section */
.products-section {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(29, 79, 145, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 2rem;
}

.load-more .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-options {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .breadcrumb {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-icon {
        font-size: 3rem;
    }
    
    .filter-options {
        flex-direction: column;
    }
}

/* Animation for category cards */
.category-card {
    animation: fadeInUp 0.6s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product item animations */
.product-item {
    animation: fadeInUp 0.6s ease-out;
}

.product-item:nth-child(1) { animation-delay: 0.1s; }
.product-item:nth-child(2) { animation-delay: 0.2s; }
.product-item:nth-child(3) { animation-delay: 0.3s; }
.product-item:nth-child(4) { animation-delay: 0.4s; }
.product-item:nth-child(5) { animation-delay: 0.5s; }
.product-item:nth-child(6) { animation-delay: 0.6s; }

/* Hover effects for interactive elements */
.category-card:hover .category-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(29, 79, 145, 0.2);
}

.filter-options select:hover {
    border-color: #1d4f91;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1d4f91;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
