/* ============================================
   TechBuy - Subcategories Filter Pills
   ============================================ */

.tb-subcategories {
    margin-bottom: 24px;
    position: relative;
}

.tb-subcategories__scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tb-subcategories__scroll::-webkit-scrollbar {
    display: none;
}

/* Individual pill */
.tb-subcat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1.5px solid #e8e8e8;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.tb-subcat:hover {
    background: #e8f0fe;
    border-color: #4a90d9;
    color: #1a56db;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.15);
}

/* Active pill */
.tb-subcat--active,
.tb-subcat--active:hover {
    background: #1a56db;
    border-color: #1a56db;
    color: #fff;
    box-shadow: 0 2px 10px rgba(26, 86, 219, 0.3);
}

/* Subcategory thumbnail */
.tb-subcat__img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.tb-subcat--active .tb-subcat__img {
    border-color: rgba(255, 255, 255, 0.4);
}

.tb-subcat__name {
    line-height: 1;
}

/* Fade edges for scroll indication */
.tb-subcategories::after {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 12px;
    width: 40px;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.tb-subcategories.has-overflow::after {
    opacity: 1;
}

#subcategories .swiper {

    padding: 5px 0;
}

/* Responsive */
@media (max-width: 767px) {
    .tb-subcat {
        padding: 6px 14px;
        font-size: 13px;
        gap: 6px;
    }

    .tb-subcat__img {
        width: 24px;
        height: 24px;
    }

    .tb-subcategories {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
}
