/* Products Page Styles */
.products-page {
	margin-top: 120px;
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-layout {
    display: flex;
    gap: 30px;
}

/* Sidebar */
.products-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.clear-filters {
    color: #dc3545;
    font-size: 13px;
    text-decoration: none;
}

.categories-list {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.category-item {
    margin-bottom: 15px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.category-link:hover,
.category-item.active .category-link {
    color: #dc3545;
}

.category-count,
.subcategory-count {
    color: #999;
    font-size: 12px;
    font-weight: normal;
}

.subcategories-list {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid #f0f0f0;
}

.subcategory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.subcategory-link:hover,
.subcategory-link.active {
    color: #dc3545;
}

/* Products Main */
.products-main {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.products-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #333;
}

.products-count {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sort label {
    color: #666;
}

.products-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.badge-new {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    color: #333;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #ffc107;
    font-size: 12px;
}

.reviews {
    color: #999;
    font-size: 11px;
}

.add-to-cart {
    width: calc(100% - 30px);
    margin: 0 15px 15px 15px;
    padding: 10px;
    background: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.add-to-cart:hover {
    background: #dc3545;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.page-dots {
    padding: 8px 4px;
    color: #999;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.no-products-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #c82333;
}

/* Responsive */
@media (max-width: 992px) {
    .products-layout {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 16px;
    }
}