/* ==========================================================================
   Custom header menu style — icon-above-text top navigation (Flipkart-style)
   Loaded after style-1.8.min.css so these rules take priority.
   Only affects the top-level category bar; mega-menu dropdown contents,
   the "second-category" / third-level links inside the panels, and the
   mobile nav are untouched.
   ========================================================================== */

.nav-main .navbar > .navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
}

.nav-main .navbar > .navbar-nav::-webkit-scrollbar {
    display: none;
}

.nav-main .navbar > .navbar-nav > .nav-item {
    flex: 0 0 auto;
}

/* pin "More" to the far right edge of the menu bar instead of trailing
   right after the last visible category */
.nav-main .navbar > .navbar-nav > .nav-item.menu-li-more {
    margin-left: auto;
}

/* since the button now sits at the right edge, open its panel leftward
   so it doesn't run off the viewport */
.nav-main .navbar > .navbar-nav > .nav-item.menu-li-more .dropdown-menu-more-items {
    left: auto;
    right: 0;
}

.nav-main .navbar ul .nav-item .nav-link.nav-main-category,
.nav-main .navbar ul .nav-item .nav-link.nav-main-category-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px 11px;
    margin-right: 0;
    text-align: center;
}

.nav-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-bottom: 5px;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nav-cat-icon i {
    color: #fff;
    font-size: 15px;
}

/* "More" button has no per-category color from the db, so it keeps a
   neutral fallback circle */
.nav-cat-icon-fallback {
    background-color: #6b7280;
}

.nav-cat-text {
    display: inline-block;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    line-height: 15px;
    font-weight: 500;
}

/* keep the caret small and tucked right after the label, not stacked */
.nav-main .navbar ul .nav-item .nav-link.nav-main-category.dropdown-toggle::after,
.nav-main .navbar ul .nav-item .nav-link.nav-main-category-more.dropdown-toggle::after {
    display: inline-block;
    margin-left: 4px;
    vertical-align: 1px;
    border-top-width: 4px;
    border-right-width: 3px;
    border-left-width: 3px;
    opacity: 0.6;
}

.nav-main .navbar > .navbar-nav > .nav-item:hover .nav-link.nav-main-category:before,
.nav-main .navbar > .navbar-nav > .nav-item:hover .nav-link.nav-main-category-more:before {
    height: 3px;
}

@media (max-width: 1100px) {
    .nav-cat-text {
        max-width: 72px;
    }
}
