/* Sticky Horizontal Category Navigation - Premium Flipkart Style */
.sticky-category-nav {
    position: fixed;
    top: 55px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-category-nav .category-scroll-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 20px;
    gap: 4px;
}

.sticky-category-nav.hidden {
    transform: translateY(-100%);
}

.sticky-category-nav .category-scroll-container::-webkit-scrollbar {
    display: none;
}

.sticky-category-nav .category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: auto;
    text-decoration: none;
    color: #374151;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    background: transparent;
}

.sticky-category-nav .category-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-category-nav .category-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    transform: translateY(-2px);
}

.sticky-category-nav .category-item:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.sticky-category-nav .category-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
}

.sticky-category-nav .category-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.sticky-category-nav .category-icon {
    display: none;
}

.sticky-category-nav .category-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sticky-category-nav .category-item:hover .category-icon,
.sticky-category-nav .category-item.active .category-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.sticky-category-nav .category-item:hover .category-icon::after,
.sticky-category-nav .category-item.active .category-icon::after {
    opacity: 1;
}

.sticky-category-nav .category-name {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.02em;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.sticky-category-nav .category-item:hover .category-name,
.sticky-category-nav .category-item.active .category-name {
    color: #667eea;
    font-weight: 600;
}

/* Scroll indicators */
.sticky-category-nav .scroll-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sticky-category-nav .scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.sticky-category-nav .scroll-indicator.left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.95), transparent);
}

.sticky-category-nav .scroll-indicator.right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.95), transparent);
}

.sticky-category-nav .scroll-indicator i {
    font-size: 20px;
    color: #2874f0;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .sticky-category-nav {
        top: 56px;
    }

    .sticky-category-nav .category-scroll-container {
        max-width: 95%;
        padding: 8px 16px;
    }

    .sticky-category-nav .category-item {
        padding: 8px 14px;
    }

    .sticky-category-nav .category-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sticky-category-nav {
        top: 52px;
    }

    .sticky-category-nav .category-scroll-container {
        max-width: 92%;
        padding: 8px 12px;
    }

    .sticky-category-nav .category-item {
        padding: 6px 10px;
    }

    .sticky-category-nav .category-name {
        font-size: 11px;
    }
}
