/* ================================================
   CATEGORY QUICK NAVIGATION STYLES
   Version: 2.0 - Responsive (Desktop: Wrap, Mobile: Scroll)
   ================================================ */

/* =====================================
   BASE STYLES (Desktop - Default)
   ===================================== */

.category-nav-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    /* NO position: sticky on desktop! */
}

.category-nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    /* IMPORTANT: Wrap ke 2 baris di desktop */
    justify-content: center;
    /* Center alignment */
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    /* NO overflow-x: auto on desktop! */
    /* NO overflow-y: hidden on desktop! */
}

.category-nav-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    border: 2px solid transparent;
}

.category-nav-btn:hover {
    background: linear-gradient(135deg, #b8941f 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.category-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}

.category-nav-btn.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border-color: #fff;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* =====================================
   MOBILE STYLES (≤ 768px)
   ===================================== */

@media (max-width: 768px) {
    .category-nav-container {
        position: sticky !important;
        /* Enable sticky on mobile */
        top: 70px;
        padding: 0.75rem 0;
        z-index: 100;
    }

    .category-nav-wrapper {
        flex-wrap: nowrap !important;
        /* Override: Single row */
        justify-content: flex-start;
        /* Left align for scroll */
        overflow-x: auto !important;
        /* Enable horizontal scroll */
        overflow-y: hidden;
        padding: 0.5rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #d4af37 #f5f0e8;
    }

    /* Custom scrollbar for mobile */
    .category-nav-wrapper::-webkit-scrollbar {
        height: 4px;
    }

    .category-nav-wrapper::-webkit-scrollbar-track {
        background: #f5f0e8;
    }

    .category-nav-wrapper::-webkit-scrollbar-thumb {
        background: #d4af37;
        border-radius: 10px;
    }

    .category-nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        /* Prevent shrinking */
    }
}

/* =====================================
   EXTRA SMALL MOBILE (≤ 480px)
   ===================================== */

@media (max-width: 480px) {
    .category-nav-container {
        top: 60px;
    }

    .category-nav-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }
}