/* Products Page Styles */

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.products-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    position: relative;
    padding-right: 1.5rem;
}

.filter-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    right: 0;
    height: 16px;
    width: 16px;
    background-color: #eee;
    border-radius: 3px;
    transition: all 0.3s;
}

.filter-item:hover input ~ .checkmark {
    background-color: #ccc;
}

.filter-item input:checked ~ .checkmark {
    background-color: #e74c3c;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-item input:checked ~ .checkmark:after {
    display: block;
}

.filter-item .checkmark:after {
    right: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.price-inputs input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    text-align: center;
}

.apply-price-filter {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.3s;
}

.apply-price-filter:hover {
    background: #c0392b;
}

.clear-filters {
    width: 100%;
    padding: 0.75rem;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
}

.clear-filters:hover {
    background: #e9ecef;
    color: #333;
}

/* Products Content */
.products-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    color: #666;
    font-weight: 500;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.view-btn:first-child {
    border-radius: 5px 0 0 5px;
}

.view-btn:last-child {
    border-radius: 0 5px 5px 0;
}

.view-btn.active,
.view-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.products-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

.products-grid.list-view .product-image {
    width: 200px;
    height: 150px;
}

.products-grid.list-view .product-info {
    flex: 1;
}

.products-grid.list-view .product-actions {
    align-self: end;
    min-width: 150px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e74c3c;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    gap: 0.25rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    font-family: inherit;
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
}

.pagination button.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    margin: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Product Card Animations */
.product-card {
    animation: fadeInUp 0.5s ease-out;
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 1rem;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .products-header > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        padding: 1rem;
    }
    
    .products-grid.list-view {
        grid-template-columns: 1fr;
    }
    
    .products-grid.list-view .product-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-section {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}