.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 20px;
    margin: 0 auto;
    padding: 10px;
}

.category-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex: 0 0 calc(25% - 40px);
    width: 100%;
    box-sizing: border-box;
}

.category-link:hover {
    text-decoration: none;
}

.category-link:hover .category-item {
    border-color: #4c9ed9;
    background-color: #f5f5ff;
}

.category-link:hover .category-title {
    color: #23527c;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #eef;
    text-align: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 260px;
    background-color: #fff;
    overflow: hidden;
    padding: 10px;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.category-title {
    margin: 0;
    padding: 10px 10px 20px;
    color: #337ab7;
}

@media (max-width: 768px) {
    .category-link {
        flex: 0 0 calc(50% - 30px);
    }
}

@media (max-width: 480px) {
    .category-grid {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .category-link {
        flex: 0 0 90%;
    }
}