/* ===== 桌面端浮动筛选组件样式 - 侧滑菜单版（防抖动优化）===== */
@media (min-width: 769px) {
    .desktop-floating-filter {
        position: fixed;
        bottom: 30px;
        left: 30px;
        z-index: 1002;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    body.filter-collapsed .desktop-floating-filter {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .filter-bar-wrapper {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    body.filter-collapsed .filter-bar-wrapper {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* 其余样式保持不变 */
    .floating-filter-trigger {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--black, #000);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transition: all 0.2s ease;
    }
    .floating-filter-trigger:hover {
        background: var(--red, #e63946);
        transform: scale(1.02);
    }

    .floating-filter-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100%;
        background: white;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1003;
        display: flex;
        flex-direction: column;
        border-right: 1px solid #e0e0e0;
    }

    .floating-filter-panel.active {
        transform: translateX(0);
    }

    .floating-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #eee;
        background: #fafafa;
    }
    .floating-panel-header strong {
        font-size: 1.1rem;
        color: #000;
    }
    .close-floating-panel {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        line-height: 1;
        color: #666;
    }
    .close-floating-panel:hover {
        color: var(--red);
    }

    .floating-filter-buttons {
        flex: 1;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
    }

    .floating-filter-buttons .filter-btn {
        background: #f0f0f0;
        border: none;
        padding: 10px 16px;
        border-radius: 40px;
        cursor: pointer;
        font-size: 0.9rem;
        text-align: left;
        transition: all 0.2s;
    }

    .floating-filter-buttons .filter-btn.active {
        background: var(--black);
        color: white;
    }

    .floating-filter-buttons .filter-btn.hot-model {
        background: var(--red);
        color: white;
    }

    .mobile-filter-container {
        display: none;
    }
}

/* ===== 移动端样式 ===== */
@media (max-width: 768px) {
    .filter-bar-wrapper .filter-buttons,
    .filter-bar-wrapper .filter-label {
        display: none;
    }
    .desktop-floating-filter {
        display: none !important;
    }

    .mobile-filter-container {
        display: block;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid #e0e0e0;
        position: sticky;
        top: 80px;
        z-index: 1099;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    .mobile-filter-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 40px;
        padding: 10px 16px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.2s;
    }
    .mobile-filter-trigger .trigger-icon {
        font-size: 1.2rem;
    }
    .mobile-filter-trigger .trigger-label {
        font-weight: 500;
        color: #333;
    }
    .mobile-filter-trigger .selected-model-name {
        margin-left: auto;
        color: var(--red);
        font-weight: 600;
        max-width: 150px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .mobile-filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    .mobile-filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    .mobile-filter-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: white;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
    }
    .mobile-filter-panel.active {
        transform: translateX(0);
    }
    .mobile-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 16px;
        border-bottom: 1px solid #eee;
        background: #fff;
    }
    .mobile-panel-header h4 {
        margin: 0;
        font-size: 1.2rem;
    }
    .close-mobile-panel {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        color: #666;
    }
    .mobile-filter-buttons {
        flex: 1;
        padding: 20px 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow-y: auto;
    }
    .mobile-filter-buttons .filter-btn {
        background: #f0f0f0;
        border: none;
        padding: 10px 16px;
        border-radius: 40px;
        text-align: left;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    .mobile-filter-buttons .filter-btn.active {
        background: var(--black);
        color: white;
    }
    .mobile-filter-buttons .filter-btn.hot-model {
        background: var(--red);
        color: white;
    }

    /* ===== 修改点：移动端卡片底部布局修正（与桌面端一致）===== */
    .wheel-card .wheel-colors {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 10px 12px;
    }
    .wheel-card .wheel-rating {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12px;
    }
    .wheel-card .wheel-rating .star-filled,
    .wheel-card .wheel-rating .star-half,
    .wheel-card .wheel-rating .star-empty {
        font-size: 14px;
    }
    .wheel-card .wheel-color-swatches {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 1;
    }
    .wheel-card .wheel-color-swatches .color-swatch {
        width: 22px;
        height: 22px;
    }
    /* 无评分时，颜色圆标单独靠右 */
    .wheel-card .wheel-colors:has(.wheel-color-swatches:only-child) {
        justify-content: flex-end;
    }
    /* ===== 修改结束 ===== */
}

/* 卡片内 wheel-colors 布局：左侧评分，右侧颜色圆标靠右（桌面端默认） */
.wheel-card .wheel-colors {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.wheel-rating {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.4;
}
.wheel-rating .star-filled,
.wheel-rating .star-half,
.wheel-rating .star-empty {
    font-size: 16px;
    letter-spacing: 1px;
}
.wheel-rating .star-filled {
    color: #f5b042;
}
.wheel-rating .star-half {
    color: #f5b042;
}
.wheel-rating .star-empty {
    color: #ddd;
}
.wheel-rating .rating-number {
    margin-left: 6px;
    font-size: 13px;
    color: #666;
}
/* 移除无评分时的显示样式（已不再使用） */
.wheel-rating.no-rating {
    display: none;
}

/* 右侧颜色圆标容器：靠右排列 */
.wheel-color-swatches {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}
.wheel-color-swatches .color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wheel-color-swatches .color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e63946;
}
.wheel-color-swatches .color-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000;
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}
.pagination-ajax {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
}
.pagination-ajax li {
    display: inline-block;
}
.pagination-ajax a,
.pagination-ajax span {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f0f0;
    color: #333;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.pagination-ajax a:hover {
    background: #e63946;
    color: #fff;
}
.pagination-ajax .current {
    background: #000;
    color: #fff;
    cursor: default;
}