/* 
 * 立即修复：Shop by Category 水平排列
 * 只修改必要部分，不破坏现有布局
 */

/* 1. 强制水平排列 - 这是关键！ */
#cat-slider .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    transform: translate3d(0px, 0px, 0px) !important;
}

/* 2. 确保滑块水平排列 */
#cat-slider .swiper-slide {
    flex: 0 0 auto !important;
    width: 180px !important;
    height: auto !important;
    margin-right: 30px !important;
    display: block !important;
    float: none !important;
}

/* 3. 添加水平滚动（如果内容超出容器） */
#cat-slider .swiper-wrapper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: #3498db #f0f0f0 !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 20px !important;
}

/* 4. 保持原有图片尺寸 */
#cat-slider .cat-img {
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto !important;
}

#cat-slider .cat-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 5. 滚动条样式 */
#cat-slider .swiper-wrapper::-webkit-scrollbar {
    height: 6px !important;
}

#cat-slider .swiper-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0 !important;
    border-radius: 3px !important;
}

#cat-slider .swiper-wrapper::-webkit-scrollbar-thumb {
    background: #3498db !important;
    border-radius: 3px !important;
}

/* 6. 响应式调整 */
@media (min-width: 768px) {
    #cat-slider .swiper-slide {
        width: 200px !important;
    }
    #cat-slider .cat-img {
        width: 170px !important;
        height: 170px !important;
    }
}

@media (min-width: 1200px) {
    #cat-slider .swiper-slide {
        width: 240px !important;
    }
    #cat-slider .cat-img {
        width: 210px !important;
        height: 210px !important;
    }
}

/* 7. 确保容器宽度足够 */
#cat-slider {
    width: 100% !important;
    overflow: visible !important;
}

/* 8. 防止垂直排列的任何可能性 */
#cat-slider .swiper-wrapper,
#cat-slider .swiper-slide {
    display: flex !important;
    flex-direction: column !important;
}

/* 9. 内容居中 */
#cat-slider .cat-content {
    text-align: center !important;
    margin-top: 15px !important;
}

/* 10. 禁用自动滑动（通过CSS） */
#cat-slider .swiper-wrapper {
    animation: none !important;
    transition: none !important;
}