/* Products Page */
.products-page {
    padding: 2rem 0;
}

.products-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.filters-header h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.btn-reset {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-reset:hover {
    color: #4f46e5;
}

/* Filter Group */
.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    transition: var(--transition);
}

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

.filter-label:hover {
    color: var(--primary-color);
}

/* Price Filter */
.price-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.price-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.slider-price {
    width: 100%;
    height: 6px;
    cursor: pointer;
}

.price-display {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Products Section */
.products-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-header h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

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

.sort-controls label {
    margin-bottom: 0;
    font-weight: 500;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--danger-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: capitalize;
    margin-bottom: 0.3rem;
}

.product-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.4rem;
}

.product-rating {
    font-size: 0.9rem;
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.btn-view-details {
    flex-grow: 1;
    padding: 0.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-view-details:hover {
    background-color: #7c3aed;
}

.btn-add-cart {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background-color: #4f46e5;
}

/* Empty State */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .products-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .filters-sidebar {
        position: relative;
        top: auto;
    }

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

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .products-container {
        padding: 0;
    }

    .filters-sidebar {
        padding: 1rem;
        margin: 0 0 1rem 0;
    }

    .products-section {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1.1rem;
    }
}
