/* Perfectly Aligned Category Bar for Sub Dukan */
#categoryBar {
    background-color: #ffffff;
    padding: 8px 0 0 0;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    position: relative;
    z-index: 998;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}

.category-scroll-container {
    display: flex;
    /* Changed from center to space-between to align first/last icons to edges */
    justify-content: space-between; 
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    /* Matches the website's main container width and centering */
    max-width: 1240px; /* Adjust this to match your slider/header width exactly */
    margin: 0 auto;
    padding: 0; /* Removed padding so first/last items hit the edges */
}

/* Fallback for when there are fewer items than width */
.category-scroll-container::after {
    content: "";
    flex: 0 0 0;
}

@media (max-width: 1240px) {
    .category-scroll-container {
        justify-content: flex-start;
        padding: 0 15px; /* Add some breathing room on mobile */
        gap: 15px;
    }
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 80px;
    padding-bottom: 8px;
    position: relative;
    transition: all 0.2s ease;
}

/* --- ICON DESIGN --- */
.category-img-wrapper {
    width: 40px; 
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    padding: 6px;
    margin-bottom: 4px;
}

.category-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

/* --- ACTIVE STATE --- */
.category-item.active .category-img-wrapper {
    background-color: #fef4e6;
    box-shadow: 0 2px 6px rgba(244, 165, 28, 0.15);
}

.category-item.active .category-title {
    color: #f4a51c;
    font-weight: 600;
}

/* Bottom Line Indicator */
.category-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
}

.category-item.active::after {
    background-color: #f4a51c;
}

/* Hover Effect */
.category-item:hover .category-title {
    color: #f4a51c;
}

.category-item:hover .category-img-wrapper {
    background-color: #fff9f0;
}

/* --- Mobile Adjustments --- */
@media (max-width: 767px) {
    .category-item {
        min-width: 70px;
    }
    .category-img-wrapper {
        width: 34px;
        height: 34px;
        padding: 5px;
    }
    .category-title {
        font-size: 11px;
    }
}