/* Mobile Category Chips - Horizontal Scrollable */

.mobile-category-chips {
    display: none;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    margin-bottom: 16px; /* Add spacing below */
}

.mobile-category-chips__container {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.mobile-category-chips__container::-webkit-scrollbar {
    display: none;
}

/* Category Chip */
.mobile-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-category-chip:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.mobile-category-chip.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.mobile-category-chip.active .mobile-category-chip__icon {
    color: #2563eb !important;
}

/* Chip Icon */
.mobile-category-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mobile-category-chip__icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Chip Label */
.mobile-category-chip__label {
    line-height: 1;
}

/* Chip Count */
.mobile-category-chip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.mobile-category-chip.active .mobile-category-chip__count {
    background: #2563eb;
    color: #ffffff;
}

/* Fade effect at edges to indicate scrollability */
.mobile-category-chips::before,
.mobile-category-chips::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
}

.mobile-category-chips::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.mobile-category-chips::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

/* Show on mobile only */
@media (max-width: 768px) {
    .mobile-category-chips {
        display: block;
    }
}

/* Touch scroll momentum */
.mobile-category-chips__container {
    /* Removed scroll-snap for smoother scrolling */
}

/* Animation for initial load */
@keyframes chipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-category-chip {
    animation: chipFadeIn 0.3s ease backwards;
}

.mobile-category-chip:nth-child(1) { animation-delay: 0.05s; }
.mobile-category-chip:nth-child(2) { animation-delay: 0.1s; }
.mobile-category-chip:nth-child(3) { animation-delay: 0.15s; }
.mobile-category-chip:nth-child(4) { animation-delay: 0.2s; }
.mobile-category-chip:nth-child(5) { animation-delay: 0.25s; }
.mobile-category-chip:nth-child(n+6) { animation-delay: 0.3s; }

/* Accessibility */
.mobile-category-chip:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
