/* Product List Page Styles */
.product-list-container {
    min-height: calc(100vh - 200px);
}

.filters-sidebar {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.filter-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.filter-body {
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-control {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.filter-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: white;
}

.price-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-range .filter-control {
    flex: 1;
}

.price-separator {
    color: #6c757d;
    font-weight: 600;
}

.products-header {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.products-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.products-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-button {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-button:hover {
    border-color: #007bff;
    color: #007bff;
}

.view-button.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.products-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.products-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

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

.product-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card.list-view {
    display: flex;
    height: 200px;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-card.grid-view .product-image {
    height: 200px;
}

.product-card.list-view .product-image {
    width: 200px;
    height: 100%;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.product-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.category {
    background: rgba(0, 123, 255, 0.9);
    color: white;
}

.product-badge.verified {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.product-badge.featured {
    background: rgba(255, 193, 7, 0.9);
    color: #333;
}

.product-body {
    padding: 1rem;
    flex: 1;
}

.product-card.list-view .product-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-card.list-view .product-description {
    flex: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #28a745;
}

.product-unit {
    color: #6c757d;
    font-size: 0.8rem;
}

.product-supplier {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-card.list-view .product-actions {
    justify-content: flex-end;
}

.btn-view-details {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

.btn-contact-supplier {
    background: white;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-contact-supplier:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-link {
    background: white;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}

.page-link.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.page-link.disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #e9ecef;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .product-card.list-view {
        height: auto;
        flex-direction: column;
    }
    
    .product-card.list-view .product-image {
        width: 100%;
        height: 200px;
    }
    
    .product-card.list-view .product-body {
        padding: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-view-details,
    .btn-contact-supplier {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .products-grid.grid-view {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .view-controls {
        align-self: flex-end;
    }
}

/* Filter Animation */
.filter-group {
    animation: slideInUp 0.3s ease-out;
}

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

/* Product Card Hover Effects */
.product-card {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Loading States */
.product-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
} 