.category-navbar {
    position: sticky;
    top: 60px;
    z-index: 999;
    background: #f4f4f4;
    padding: 20px 0;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 100px;
}

.category-navbar.hidden {
    transform: translateY(-100%);
}

/* Bouton hamburger (caché sur desktop) */
.navbar-toggle {
    display: none;
    position: relative;
    background: #fff;
    border: 2px solid #333;
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 12px;
    margin-left: 20px;
    z-index: 1001;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.navbar-toggle:hover {
    background: #f8f8f8;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.navbar-toggle:active {
    transform: scale(0.95);
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation hamburger -> X */
.navbar-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 20px;
}

.category-container a {
    text-transform: uppercase;
    text-decoration: none;
    color: black;
    font-weight: 500;
    font-size: 19.6px;
    transition: color 0.2s, transform 0.2s;
}

.category-container a:hover {
    color: var(--primary-hover);
    transform: scale(1.05);
}

/* ========== RESPONSIVE ========== */

/* Tablette large : réduire taille police et espacement */
@media (max-width: 1200px) {
    .category-container {
        gap: 20px;
    }

    .category-container a {
        font-size: 17px;
    }
}

/* Tablette : réduire encore */
@media (max-width: 900px) {
    .category-navbar {
        padding: 15px 0;
        margin-bottom: 60px;
    }

    .category-container {
        gap: 15px;
    }

    .category-container a {
        font-size: 15px;
    }
}

/* Mobile : menu hamburger avec dropdown */
@media (max-width: 768px) {
    .search-filters {
        margin: 0 !important;
    }

    .navbar-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .category-navbar {
        padding: 12px 0;
        margin-bottom: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .category-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #f4f4f4;
        padding: 0;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 998;
    }

    .category-container.open {
        max-height: calc(100vh - 60px);
        opacity: 1;
        padding: 20px 0;
        overflow-y: auto;
        background: #f4f4f4;
    }

    .category-container a {
        padding: 18px 30px;
        width: 100%;
        text-align: center; /* Centrer le texte */
        border-bottom: 1px solid #d0d0d0;
        font-size: 16px;
        display: block;
        box-sizing: border-box;
    }

    .category-container a:last-child {
        border-bottom: none;
    }

    .category-container a:hover {
        background: #e0e0e0;
        transform: none;
    }

    .category-container a:active {
        background: #d8d8d8;
    }
}

@media (max-width: 480px) {
    .navbar-toggle {
        margin-left: 15px;
        padding: 8px 10px;
    }

    .hamburger-line {
        width: 24px;
        height: 2.5px;
        margin: 4px 0;
    }

    .category-container a {
        font-size: 15px;
        padding: 12px 20px;
    }
}
