/* 产品列表页面响应式优化样式 */

/* 确保在所有屏幕尺寸下每行显示适当数量的产品 */
@media (min-width: 1200px) {
    #products-grid .product-item {
        width: calc(33.333% - 1.333rem);
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    #products-grid .product-item {
        width: calc(33.333% - 1.333rem);
        flex: 0 0 auto;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #products-grid .product-item {
        width: calc(33.333% - 1rem);
        flex: 0 0 auto;
    }
}

/* 在小屏幕设备上保持响应式 */
@media (max-width: 767px) {
    #products-grid .product-item {
        width: 100%;
        flex: 0 0 auto;
        margin-right: 0;
    }
    
    /* 产品卡片样式已移至product-card-optimized.css文件中 */
}

/* 超小屏幕设备优化 */
@media (max-width: 576px) {
    #products-grid {
        gap: 0.75rem !important;
    }
    
    #products-grid .product-item {
        padding: 0 0.25rem;
    }
    
    /* 产品卡片样式已移至product-card-optimized.css文件中 */
}

/* 中等屏幕设备优化 */
@media (min-width: 576px) and (max-width: 767px) {
    #products-grid {
        gap: 1rem !important;
    }
    
    .product-card .product-image {
        height: 200px !important;
    }
    
    .product-card .card-body {
        padding: 1rem !important;
    }
}

/* 大屏幕设备优化 */
@media (min-width: 1400px) {
    #products-grid .product-item {
        width: calc(33.333% - 1.5rem);
        flex: 0 0 auto;
    }
    
    .product-card .product-image {
        height: 220px !important;
    }
}

/* 超大屏幕设备优化 */
@media (min-width: 1600px) {
    #products-grid .product-item {
        width: calc(33.333% - 1.6rem);
        flex: 0 0 auto;
    }
    
    .product-card .product-image {
        height: 240px !important;
    }
}

/* 产品卡片在不同屏幕尺寸下的优化 */
@media (max-width: 992px) {
    .filter-card {
        margin-bottom: 1.5rem;
    }
    
    .search-results-info {
        text-align: center;
    }
    
    .search-results-info .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .view-toggle-group {
        justify-content: center;
    }
    
    .pagination {
        margin-top: 1.5rem;
    }
}

/* 筛选区域响应式优化 */
@media (max-width: 768px) {
    .filter-card .card-header h5 {
        font-size: 1.1rem;
    }
    
    .filter-card .form-label {
        font-size: 0.9rem;
    }
    
    .filter-card .form-control,
    .filter-card .form-select {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }
    
    .filter-card .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* 面包屑导航响应式优化 */
@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .breadcrumb-item {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}