/* Products Page - Extends homepage.css */
@import url('homepage.css');

.products-page { padding: 30px 0 60px; }

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 24px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
}

.filter-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

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

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.filter-option input {
    cursor: pointer;
}

.filter-option .count {
    margin-left: auto;
    color: var(--text-light);
    font-size: 13px;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-input {
    flex: 1;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

/* Products Content */
.products-content {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.results-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.toolbar-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover, .view-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sort-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.products-grid.list-view {
    display: flex;
    flex-direction: column;
}

/* Product Card */
.product-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    background: var(--white);
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-btn:hover {
    background: var(--danger-color);
    color: white;
}

.product-content {
    padding: 16px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.stars { color: var(--warning-color); }
.rating-count { color: var(--text-light); }

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }
}
