/* Homepage Categories Navigation - Flipkart Style */
.homepage-categories-nav {
    background: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 2px solid #d0d0d0;
}

.homepage-categories-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--mobitez-purple) #f1f1f1;
    -webkit-overflow-scrolling: touch;
    max-width: 1400px;
    margin: 0 auto;
}

.homepage-categories-container::-webkit-scrollbar {
    height: 4px;
}

.homepage-categories-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.homepage-categories-container::-webkit-scrollbar-thumb {
    background: var(--mobitez-purple);
    border-radius: 2px;
}

.homepage-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    text-decoration: none;
    color: #212121;
    transition: all 0.2s;
    position: relative;
    min-width: 110px;
    border-bottom: 3px solid transparent;
    background-color: transparent;
}

.homepage-category-item:hover,
.homepage-category-item.active {
    background-color: rgba(74, 20, 140, 0.05);
    border-bottom-color: var(--mobitez-orange);
}

.homepage-category-item.active .homepage-category-name {
    color: var(--mobitez-purple);
    font-weight: 600;
}

.homepage-category-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.homepage-category-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
}

.homepage-category-icon-fallback {
    font-size: 32px;
    color: var(--mobitez-purple);
    transition: all 0.3s;
}

.homepage-category-item:hover .homepage-category-icon-fallback,
.homepage-category-item.active .homepage-category-icon-fallback {
    color: var(--mobitez-orange);
    transform: scale(1.1);
}

.homepage-category-name {
    font-size: 13px;
    font-weight: 500;
    color: #212121;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s;
    white-space: nowrap;
}

.homepage-category-item:hover .homepage-category-name {
    color: var(--mobitez-purple);
}

/* Hide navigation menu on homepage */
.homepage-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .homepage-categories-nav {
        padding: 12px 0;
        margin-top: 16px;
        /* Add spacing below header */
    }

    .homepage-categories-container {
        gap: 12px;
        /* Add gap between category items */
        padding-left: 16px;
        /* Shift categories to the left */
        padding-right: 12px;
        justify-content: flex-start;
    }

    .homepage-category-item {
        min-width: 80px;
        padding: 10px 6px;
        /* Adjusted padding for spacing */
        margin-right: 0;
        /* Remove margin, use gap instead */
    }

    .homepage-category-icon-wrapper {
        width: 56px;
        height: 56px;
    }

    .homepage-category-icon-fallback {
        font-size: 28px;
    }

    .homepage-category-name {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .homepage-categories-nav {
        margin-top: 16px;
        /* Ensure spacing below header */
    }

    .homepage-categories-container {
        gap: 12px;
        /* Add gap between category items */
        padding-left: 16px;
        /* Shift categories to the left */
        padding-right: 12px;
    }

    .homepage-category-item {
        min-width: 70px;
        padding: 8px 6px;
        /* Adjusted padding for spacing */
        margin-right: 0;
        /* Remove margin, use gap instead */
    }

    .homepage-category-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .homepage-category-icon-fallback {
        font-size: 24px;
    }

    .homepage-category-name {
        font-size: 10px;
    }
}