/* 分类详情页面响应式样式 */

/* 桌面端 (992px以下) */
@media (max-width: 992px) {
    .category-header {
        padding: 3rem 0 2.5rem;
    }

    .category-info h1 {
        font-size: 2rem;
    }

    .category-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .stat {
        min-width: 100px;
        padding: 0.8rem 1.2rem;
    }

    .stat span:first-child {
        font-size: 1.75rem;
    }
}

/* 平板设备 (768px以下) */
@media (max-width: 768px) {
    .category-header {
        padding: 4rem 0;
        min-height: 200px;
    }

    .category-header .container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .category-icon {
        margin: 0 auto;
    }

    .category-info {
        text-align: center;
    }

    .category-info h1 {
        font-size: 2rem;
    }

    .category-info p {
        margin: 0 auto;
    }

    .category-stats {
        width: 100%;
        justify-content: center;
        margin: 0 auto;
    }

    .stat {
        min-width: 110px;
    }

    /* 筛选区域响应式调整 */
    .filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .filter-dropdown {
        flex: none;
        width: 100%;
        position: relative;
    }

    .search-container {
        grid-column: 1 / -1;
        flex: none;
        width: 100%;
    }

    .filter-dropdown .filter-select {
        width: 100%;
        max-height: 38px;
        position: relative;
        z-index: 2;
    }

    /* 修复下拉列表样式 */
    .filter-dropdown select {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }

    /* 自定义下拉列表样式 */
    .filter-dropdown .filter-select option {
        position: relative;
        left: 0;
        width: 100%;
        padding: 8px 12px;
        background-color: #fff;
        border: none;
        font-size: 14px;
    }

    .prompts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* 手机设备 (480px以下) */
@media (max-width: 480px) {
    .category-header {
        padding: 2.5rem 0 2rem;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    .category-info h1 {
        font-size: 1.75rem;
    }

    .category-info p {
        font-size: 1rem;
    }

    .category-stats {
        gap: 1rem;
    }

    .stat {
        min-width: 90px;
        padding: 0.7rem 1rem;
    }

    .stat span:first-child {
        font-size: 1.5rem;
    }

    .stat span:last-child {
        font-size: 0.8rem;
    }

    /* 筛选区域移动端优化 */
    .filter-section {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .filter-row {
        gap: 0.75rem;
    }

    .filter-dropdown {
        position: relative;
    }

    .filter-dropdown label,
    .search-container label {
        font-size: 0.8rem;
        display: block;
        margin-bottom: 4px;
    }

    .filter-dropdown .filter-select {
        width: 100%;
        max-width: 150px;
        /* 限制下拉框最大宽度 */
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
        background-position: right 6px center;
        /* 调整下拉箭头位置 */
        background-size: 14px;
        /* 调整下拉箭头大小 */
    }

    /* 确保下拉列表在框的正下方 */
    .filter-select {
        position: relative;
    }

    .filter-select option {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
        width: auto;
        min-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 修复搜索框样式 */
    .search-input-wrapper {
        position: relative;
    }

    .search-input-wrapper input {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.4rem 2rem 0.4rem 0.8rem;
    }

    .search-input-wrapper button {
        right: 8px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-options {
        flex-direction: column;
        gap: 0.8rem;
    }

    .filter-dropdown {
        width: 100%;
    }
}