/* Products Page Styles */

.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 60px 0 40px;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: var(--white);
}

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

/* Products Layout */
.products-page {
    padding: 0 0 80px;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Filters Sidebar */
.filters-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-section {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.filter-item:hover {
    background: var(--light-color);
}

.filter-item input[type="radio"],
.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.filter-item span {
    flex: 1;
    font-size: 0.95rem;
}

#resetFilters {
    width: 100%;
    margin-top: 10px;
}

/* Products Content */
.products-content {
    flex: 1;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: var(--light-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.view-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.results-count {
    font-weight: 600;
    color: var(--primary-color);
}

.results-count span {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

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

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 25px;
}

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

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

.products-grid.list-view .product-footer {
    border-top: none;
    padding-top: 0;
    margin-top: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter Toggle for Mobile */
.filter-toggle {
    display: none;
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.filter-toggle i {
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
    }
    
    .filters-sidebar.active {
        right: 0;
    }
    
    .filter-toggle {
        display: block;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }
    
    .products-grid.list-view .product-image {
        height: 250px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading i {
    font-size: 3rem;
    color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 5rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.no-results p {
    color: #718096;
    font-size: 1.1rem;
}