/* 商品列表頁面樣式 */
.product-list-container {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 80px);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: var(--primary-color);
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    color: #666;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.product-list-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* 側邊欄篩選樣式 */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    color: var(--primary-dark);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list li:last-child {
    margin-bottom: 0;
}

.category-list a {
    display: block;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.category-list a:hover {
    background-color: #f0f7f0;
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-list li.active a {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.action-section {
    margin-top: 30px;
}

/* 主內容區樣式 */
.products-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

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

.search-box form {
    display: flex;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(77, 144, 77, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.results-info p {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

/* 商品網格樣式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-list .product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
}

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

.product-list .product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-list .product-card:hover .product-image {
    transform: scale(1.05);
}

.product-list .product-content {
    padding: 20px;
    position: relative;
}

.product-list .product-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.product-list .product-title {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-list .product-spec {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-list .product-origin,
.product-list .product-supplier {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.product-list .product-description {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-list .product-actions {
    display: flex;
    gap: 10px;
}

.product-list .product-actions .btn-detail,
.product-list .product-actions .btn-quote {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-list .product-actions .btn-detail {
    background: var(--primary-color);
    color: white;
}

.product-list .product-actions .btn-detail:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.product-list .product-actions .btn-quote {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.product-list .product-actions .btn-quote:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 分頁樣式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    display: inline-block;
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #f8fff8;
}

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

/* 空狀態樣式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 25px;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .product-list-content {
        grid-template-columns: 250px 1fr;
        gap: 25px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .product-list-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-sidebar {
        position: static;
        order: 2;
    }
    
    .products-main {
        order: 1;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .results-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .product-list-container {
        padding: 20px 0;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .products-main {
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .filters-sidebar {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-list .product-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
    
    .empty-state p {
        font-size: 15px;
    }
}