.navbar-details{
    display: flex;
    flex-direction: column;
}

.nav-bar-details-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 30px;
    padding: 10px;
    justify-items: start;
    max-height: 175px;
    overflow-y: hidden;
    transition: max-height 0.5s ease-in-out;

}

.nav-bar-details-categories.extended {
    max-height:1000px;
}


.category-svg{
    position: relative;
    width: 100%;
    text-align: center;
    bottom: 15px;
    max-height: 2px;

}

.category-svg > div{
 margin-top: 10px;
}


.category-svg svg{
    width: 35px;
    height: 35px;
    color: var(--color-primary);
    cursor: pointer;
}


.nav-bar-details-categories a {
    text-decoration: none;
    color: var(--color-primary-link);
}

.category-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 10px;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    box-shadow: 3px 5px 5px rgba(0,0,0,0.1);

    width: 150px;
    max-width: 160px;
    height: 150px;

    font-size: 14px;
    line-height: 1.3;

    transition: all 0.5s ease-in-out;
}

.category-item span{
    color: var(--color-primary);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    
    /* Обводка текста: */
    text-shadow: 
        -1px -1px 0 #000000,  
         1px -1px 0 #000000,
        -1px  1px 0 #000000,
         1px  1px 0 #000000;
    
}

.category-item:hover {
    background-color: var(--color-primary);
    background-image: none !important;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(44, 125, 246, 0.5);
}

.category-item:hover a {
    color: #fff; /* При наведении белый */
}


.category-item:hover span{
    color: black;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    
    /* Обводка текста: */
    text-shadow: 
        -1px -1px 0 #fff,  
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
    
}
